text
stringlengths
52
99.8k
--Tuning tips: If your car tends to oversteer, increase the ratio of friction towards the front (E.G. .65 front .6 rear), do the opposite in case of understeer
-- A state object which follows another state object using spring simulation. export type Spring<T> = StateObject<T> & Dependent & { -- kind: "Spring" (add this when Luau supports singleton types) -- Uncomment when ENABLE_PARAM_SETTERS is enabled -- setPosition: (Spring<T>, newValue: Animatable) -> (), -- setVelocity: (Spring<T>, newValue: Animatable) -> (), -- addVelocity: (Spring<T>, deltaValue: Animatable) -> () }
-- Connect 'MoveToFinished' event to the 'onWaypointReached' function human.MoveToFinished:Connect(onWaypointReached)
-------- OMG HAX r = game:service("RunService") local damage = 5 local slash_damage = 12 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 UnsheathSound = Instance.new("Sound") UnsheathSound.SoundId = "rbxasset://sounds\\unsheath.wav" UnsheathSound.Parent = sword UnsheathSound.Volume = 1 function isTurbo(character) return character:FindFirstChild("PirateHat") ~= nil end function blow(hit) local humanoid = hit.Parent:findFirstChild("Humanoid") local vCharacter = Tool.Parent local vPlayer = game.Players:playerFromCharacter(vCharacter) local hum = vCharacter:findFirstChild("Humanoid") -- non-nil if tool held by a character if humanoid~=nil and humanoid ~= hum and hum ~= nil then -- final check, make sure sword is in-hand local right_arm = vCharacter:FindFirstChild("Right Arm") if (right_arm ~= nil) then local joint = right_arm:FindFirstChild("RightGrip") if (joint ~= nil and (joint.Part0 == sword or joint.Part1 == sword)) then tagHumanoid(humanoid, vPlayer) if (isTurbo(vCharacter) == true) then humanoid:TakeDamage(damage * 1.5) else humanoid:TakeDamage(damage) end wait(1) untagHumanoid(humanoid) end end end end function tagHumanoid(humanoid, player) local creator_tag = Instance.new("ObjectValue") creator_tag.Value = player creator_tag.Name = "creator" creator_tag.Parent = humanoid end function untagHumanoid(humanoid) if humanoid ~= nil then local tag = humanoid:findFirstChild("creator") if tag ~= nil then tag.Parent = nil end end end function attack() damage = slash_damage SlashSound:play() local anim = Instance.new("StringValue") anim.Name = "toolanim" anim.Value = "Slash" anim.Parent = Tool end function swordUp() Tool.GripForward = Vector3.new(-1,0,0) Tool.GripRight = Vector3.new(0,1,0) Tool.GripUp = Vector3.new(0,0,1) end function swordOut() Tool.GripForward = Vector3.new(0,0,1) Tool.GripRight = Vector3.new(0,-1,0) Tool.GripUp = Vector3.new(-1,0,0) end Tool.Enabled = true function onActivated() if not Tool.Enabled then return end Tool.Enabled = false local character = Tool.Parent; local humanoid = character.Humanoid if humanoid == nil then print("Humanoid not found") return end attack() wait(.5) Tool.Enabled = true end function onEquipped() UnsheathSound:play() end script.Parent.Activated:connect(onActivated) script.Parent.Equipped:connect(onEquipped) connection = sword.Touched:connect(blow)
--//both of you, dance like you want to win! local SSS = game:GetService("ServerScriptService") local TS = game:GetService("TweenService") local Global = require(SSS.Server.Scripts.Server.CoreSystems.Modules.Global) local Deb = false local Status = false local function Toggle() if not Deb then if not Status then --open Deb = true script.Parent.Sound.vaultdooropen:Play() if script.Parent.Vault.Door.VaultHandle:FindFirstChild("Motor") then TS:Create(script.Parent.Vault.Door.VaultHandle.Motor.HingeConstraint, TweenInfo.new(2), {AngularVelocity = -30}):Play() end wait(1.8) if script.Parent.Vault.Door.VaultHandle:FindFirstChild("Motor") then TS:Create(script.Parent.Vault.Door.VaultHandle.Motor.HingeConstraint, TweenInfo.new(4), {AngularVelocity = 0}):Play() end for i = 7,11 do Global.TweenModelBounceOut(script.Parent["Bar"..i].Bar, script.Parent["Bar"..i].ToGo.CFrame, true, .15) end wait(.9) for i = 1,3 do Global.TweenModelBounceOut(script.Parent["Bar"..i].Bar, script.Parent["Bar"..i].ToGo.CFrame, true, .375) end wait(1) for i = 4,6 do Global.TweenModelBounceOut(script.Parent["Bar"..i].Bar, script.Parent["Bar"..i].ToGo.CFrame, true, .375) end wait(.7) script.Parent.Vault.Door.VaultHandle.Motor.Anchored = true Global.TweenModel(script.Parent.Vault.Door, script.Parent.Vault.ToGo.CFrame, true, 6.5) wait(7) Status = true Deb = false else Deb = true script.Parent.Sound.vaultdoorclose:Play() Global.TweenModel(script.Parent.Vault.Door, script.Parent.Vault.Org.CFrame, true, 6.5) script.Parent.Vault.Door.VaultHandle.Motor.Anchored = false wait(1.3) if script.Parent.Vault.Door.VaultHandle:FindFirstChild("Motor") then TS:Create(script.Parent.Vault.Door.VaultHandle.Motor.HingeConstraint, TweenInfo.new(2), {AngularVelocity = 30}):Play() end wait(1.8) if script.Parent.Vault.Door.VaultHandle:FindFirstChild("Motor") then TS:Create(script.Parent.Vault.Door.VaultHandle.Motor.HingeConstraint, TweenInfo.new(4), {AngularVelocity = 0}):Play() end for i = 7,11 do Global.TweenModelBounceOut(script.Parent["Bar"..i].Bar, script.Parent["Bar"..i].Org.CFrame, true, .15) end wait(1.2) for i = 1,3 do Global.TweenModelBounceOut(script.Parent["Bar"..i].Bar, script.Parent["Bar"..i].Org.CFrame, true, .375) end wait(.75) for i = 4,6 do Global.TweenModelBounceOut(script.Parent["Bar"..i].Bar, script.Parent["Bar"..i].Org.CFrame, true, .375) end wait(3.5) Status = false Deb = false end end end script.Parent.ClickDetector.MouseClick:Connect(Toggle)
--SECOND DOOR local LMLOP2 = script.Parent.Door2.Left.LockMechanisms.LM.CFrame local LMLTGP2 = script.Parent.Door2.Left.LockMechanisms.LMToGo.CFrame local RMLOP2 = script.Parent.Door2.Right.LockMechanisms.LM.CFrame local RMLTGP2 = script.Parent.Door2.Right.LockMechanisms.LMToGo.CFrame local LDOP2 = script.Parent.Door2.Left.LeftDoor.CFrame local LDTGP2 = script.Parent.Door2.Left.ToGoPos.CFrame local RDOP2 = script.Parent.Door2.Right.RightDoor.CFrame local RDTGP2 = script.Parent.Door2.Right.ToGoPos.CFrame local function Cycle() script.Parent.LockShowA.BrickColor = BrickColor.new("Bright red") script.Parent.LockShow2A.BrickColor = BrickColor.new("Bright red") script.Parent.LockShowC.BrickColor = BrickColor.new("Bright red") script.Parent.LockShowB.BrickColor = BrickColor.new("Bright red") script.Parent.LockShow2B.BrickColor = BrickColor.new("Bright red") script.Parent.Fan1.Part.HingeConstraint.AngularVelocity=120 script.Parent.Fan2.Part.HingeConstraint.AngularVelocity=120 script.Parent.Fan1.Part.Smoke.Enabled=true script.Parent.Fan2.Part.Smoke.Enabled=true script.Parent.Airlocc.Sound:Play() wait(3) script.Parent.Fan1.Part.HingeConstraint.AngularVelocity=0 script.Parent.Fan2.Part.HingeConstraint.AngularVelocity=0 wait(2) script.Parent.Fan1.Part.Smoke.Enabled=false script.Parent.Fan2.Part.Smoke.Enabled=false script.Parent.LockShowA.BrickColor = BrickColor.new("Bright green") script.Parent.LockShow2A.BrickColor = BrickColor.new("Bright green") script.Parent.LockShowC.BrickColor = BrickColor.new("Bright green") script.Parent.LockShowB.BrickColor = BrickColor.new("Bright green") script.Parent.LockShow2B.BrickColor = BrickColor.new("Bright green") wait(1) end local function CloseAll() local Main = "N/A" if DoorStatusA == "Opened" then script.Parent.Frame1.Union.OpenClose:Play() Globals.TweenModel(script.Parent.Door1.Left, LDOP,false,5.2) Globals.TweenModel(script.Parent.Door1.Right,RDOP,true,5.2) Globals.TweenModel(script.Parent.Door1.Left.LockMechanisms, LMLOP,false,1) Globals.TweenModel(script.Parent.Door1.Right.LockMechanisms,RMLOP,true,1) DoorStatusA = "Closed" end if DoorStatusB == "Opened" then script.Parent.Frame.Union.OpenClose:Play() Globals.TweenModel(script.Parent.Door2.Left, LDOP2,false,5.2) Globals.TweenModel(script.Parent.Door2.Right,RDOP2,true,5.2) Globals.TweenModel(script.Parent.Door2.Left.LockMechanisms, LMLOP2,false,1) Globals.TweenModel(script.Parent.Door2.Right.LockMechanisms,RMLOP2,true,1) DoorStatusB = "Closed" end end local function OpenAll() local Main = "N/A" if DoorStatusA == "Closed" then Globals.TweenModel(script.Parent.Door1.Left.LockMechanisms, LMLTGP,false,1) Globals.TweenModel(script.Parent.Door1.Right.LockMechanisms,RMLTGP,true,1) script.Parent.Frame1.Union.OpenClose:Play() Globals.TweenModel(script.Parent.Door1.Left, LDTGP,false,5.2) Globals.TweenModel(script.Parent.Door1.Right,RDTGP,true,5.2) DoorStatusA = "Opened" end if DoorStatusB == "Closed" then Globals.TweenModel(script.Parent.Door2.Left.LockMechanisms, LMLTGP2,false,1) Globals.TweenModel(script.Parent.Door2.Right.LockMechanisms,RMLTGP2,true,1) script.Parent.Frame.Union.OpenClose:Play() Globals.TweenModel(script.Parent.Door2.Left, LDTGP2,false,5.2) Globals.TweenModel(script.Parent.Door2.Right,RDTGP2,true,5.2) DoorStatusB = "Opened" end end local function OpenDoor1() if DoorStatusA == "Closed" then script.Parent.LockShowA.BrickColor = BrickColor.new("Deep orange") script.Parent.LockShow2A.BrickColor = BrickColor.new("Deep orange") script.Parent.LockShowC.BrickColor = BrickColor.new("Deep orange") script.Parent.LockShowB.BrickColor = BrickColor.new("Bright red") script.Parent.LockShow2B.BrickColor = BrickColor.new("Bright red") Globals.TweenModel(script.Parent.Door1.Left.LockMechanisms, LMLTGP,false,1) Globals.TweenModel(script.Parent.Door1.Right.LockMechanisms,RMLTGP,true,1) script.Parent.Frame1.Union.OpenClose:Play() Globals.TweenModel(script.Parent.Door1.Left, LDTGP,false,5.2) Globals.TweenModel(script.Parent.Door1.Right,RDTGP,true,5.2) DoorStatusA = "Opened" script.Parent.LockShowA.BrickColor = BrickColor.new("Bright green") script.Parent.LockShow2A.BrickColor = BrickColor.new("Bright green") script.Parent.LockShowC.BrickColor = BrickColor.new("Bright green") script.Parent.LockShowB.BrickColor = BrickColor.new("Bright green") script.Parent.LockShow2B.BrickColor = BrickColor.new("Bright green") end end local function CloseDoor1() if DoorStatusA == 'Opened' then script.Parent.LockShowA.BrickColor = BrickColor.new("Deep orange") script.Parent.LockShow2A.BrickColor = BrickColor.new("Deep orange") script.Parent.LockShowC.BrickColor = BrickColor.new("Deep orange") script.Parent.LockShowB.BrickColor = BrickColor.new("Bright red") script.Parent.LockShow2B.BrickColor = BrickColor.new("Bright red") script.Parent.Frame1.Union.OpenClose:Play() Globals.TweenModel(script.Parent.Door1.Left, LDOP,false,5.2) Globals.TweenModel(script.Parent.Door1.Right,RDOP,true,5.2) Globals.TweenModel(script.Parent.Door1.Left.LockMechanisms, LMLOP,false,1) Globals.TweenModel(script.Parent.Door1.Right.LockMechanisms,RMLOP,true,1) DoorStatusA = "Closed" script.Parent.LockShowA.BrickColor = BrickColor.new("Bright green") script.Parent.LockShow2A.BrickColor = BrickColor.new("Bright green") script.Parent.LockShowC.BrickColor = BrickColor.new("Bright green") script.Parent.LockShowB.BrickColor = BrickColor.new("Bright green") script.Parent.LockShow2B.BrickColor = BrickColor.new("Bright green") end end local function OpenDoor2() if DoorStatusB == "Closed" then script.Parent.LockShowB.BrickColor = BrickColor.new("Deep orange") script.Parent.LockShow2B.BrickColor = BrickColor.new("Deep orange") script.Parent.LockShowC.BrickColor = BrickColor.new("Deep orange") script.Parent.LockShowA.BrickColor = BrickColor.new("Bright red") script.Parent.LockShow2A.BrickColor = BrickColor.new("Bright red") Globals.TweenModel(script.Parent.Door2.Left.LockMechanisms, LMLTGP2,false,1) Globals.TweenModel(script.Parent.Door2.Right.LockMechanisms,RMLTGP2,true,1) script.Parent.Frame.Union.OpenClose:Play() Globals.TweenModel(script.Parent.Door2.Left, LDTGP2,false,5.2) Globals.TweenModel(script.Parent.Door2.Right,RDTGP2,true,5.2) DoorStatusB = "Opened" script.Parent.LockShowB.BrickColor = BrickColor.new("Bright green") script.Parent.LockShow2B.BrickColor = BrickColor.new("Bright green") script.Parent.LockShowC.BrickColor = BrickColor.new("Bright green") script.Parent.LockShowA.BrickColor = BrickColor.new("Bright green") script.Parent.LockShow2A.BrickColor = BrickColor.new("Bright green") end end local function CloseDoor2() script.Parent.LockShowB.BrickColor = BrickColor.new("Deep orange") script.Parent.LockShow2B.BrickColor = BrickColor.new("Deep orange") script.Parent.LockShowC.BrickColor = BrickColor.new("Deep orange") script.Parent.LockShowA.BrickColor = BrickColor.new("Bright red") script.Parent.LockShow2A.BrickColor = BrickColor.new("Bright red") script.Parent.Frame.Union.OpenClose:Play() Globals.TweenModel(script.Parent.Door2.Left, LDOP2,false,5.2) Globals.TweenModel(script.Parent.Door2.Right,RDOP2,true,5.2) Globals.TweenModel(script.Parent.Door2.Left.LockMechanisms, LMLOP2,false,1) Globals.TweenModel(script.Parent.Door2.Right.LockMechanisms,RMLOP2,true,1) DoorStatusB = "Closed" script.Parent.LockShowB.BrickColor = BrickColor.new("Bright green") script.Parent.LockShow2B.BrickColor = BrickColor.new("Bright green") script.Parent.LockShowC.BrickColor = BrickColor.new("Bright green") script.Parent.LockShowA.BrickColor = BrickColor.new("Bright green") script.Parent.LockShow2A.BrickColor = BrickColor.new("Bright green") end
--[[ TheNexusAvenger Applies a winter theme to Skylands. --]]
--[[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 ]] --Automatic Settings Tune.AutoShiftMode = "RPM" --[[ [Modes] "Speed" : Shifts based on wheel speed "RPM" : Shifts based on RPM ]] Tune.AutoUpThresh = -200 --Automatic upshift point (relative to peak RPM, positive = Over-rev) Tune.AutoDownThresh = 1400 --Automatic downshift point (relative to peak RPM, positive = Under-rev) --Gear Ratios Tune.FinalDrive = 3.20 -- Gearing determines top speed and wheel torque Tune.Ratios = { -- Higher ratio = more torque, Lower ratio = higher top speed --[[Reverse]] 3.42 , -- Copy and paste a ratio to add a gear --[[Neutral]] 0 , -- Ratios can also be deleted --[[ 1 ]] 3.75 , -- Reverse, Neutral, and 1st gear are required --[[ 2 ]] 2.38 , --[[ 3 ]] 1.72 , --[[ 4 ]] 1.34 , --[[ 5 ]] 1.11 , --[[ 6 ]] .78 , } Tune.FDMult = 1 -- Ratio multiplier (Change this value instead of FinalDrive if car is struggling with torque ; Default = 1)
--[[ss1.Touched:connect(function() if IsOpen.Value == false then OtherDir.Value = false opendoor() wait(TimeDelay) closedoor() end end)]] trigger.Changed:Connect(function() if trigger.Value == true and IsOpen.Value == false then opendoor() elseif trigger.Value == false and IsOpen.Value == true then closedoor() end end)
--// SS3 controls for AC6 by Itzt, originally for 2014 Infiniti QX80. i don't know how to tune ac lol wait(0.1) local player = game.Players.LocalPlayer local HUB = script.Parent.HUB local limitButton = HUB.Name local FE = game.Workspace.FilteringEnabled local lightOn = false local Camera = game.Workspace.CurrentCamera local cam = script.Parent.nxtcam.Value local carSeat = script.Parent.CarSeat.Value local mouse = game.Players.LocalPlayer:GetMouse() local windows = false local handler = carSeat:WaitForChild('Filter') local winfob = HUB.Parent.Music local pal = false local palpal = HUB.Parent.Palette local red = 0 local green = 0 local blue = 1 local debounce = false
--[[ Used to catch any errors that may have occurred in the promise. ]] function Promise.prototype:catch(failureCallback) return self:andThen(nil, failureCallback) end
-- initialize to idle playAnimation("idle", 0.1, Humanoid) pose = "Standing" while Figure.Parent ~= nil do local _, time = wait(0.1) move(time) end
-- debounce=false -- end end me.Touched:connect(Hit)
--[[Susupension]] Tune.SusEnabled = true -- works only in with PGSPhysicsSolverEnabled, defaults to false when PGS is disabled --Front Suspension Tune.FSusDamping = 400 -- Spring Dampening Tune.FSusStiffness = 17000 -- Spring Force Tune.FSusLength = 1.9 -- Resting Suspension length (in studs) Tune.FSusMaxExt = .15 -- Max Extension Travel (in studs) Tune.FSusMaxComp = .05 -- Max Compression Travel (in studs) Tune.FSusAngle = 75 -- Suspension Angle (degrees from horizontal) Tune.FWsBoneLen = 6 -- Wishbone Length Tune.FWsBoneAngle = 3 -- Wishbone angle (degrees from horizontal) Tune.FAnchorOffset = { -- Suspension anchor point offset (relative to center of wheel) --[[Lateral]] -.4 , -- positive = outward --[[Vertical]] -.5 , -- positive = upward --[[Forward]] 0 } -- positive = forward --Rear Suspension Tune.RSusDamping = 400 -- Spring Dampening Tune.RSusStiffness = 17000 -- Spring Force Tune.RSusLength = 2.1 -- Resting Suspension length (in studs) Tune.RSusMaxExt = .15 -- Max Extension Travel (in studs) Tune.RSusMaxComp = .05 -- Max Compression Travel (in studs) Tune.RSusAngle = 80 -- Suspension Angle (degrees from horizontal) Tune.RWsBoneLen = 5 -- Wishbone Length Tune.RWsBoneAngle = 2 -- Wishbone angle (degrees from horizontal) Tune.RAnchorOffset = { -- Suspension anchor point offset (relative to center of wheel) --[[Lateral]] -.4 , -- positive = outward --[[Vertical]] -.5 , -- positive = upward --[[Forward]] 0 } -- positive = forward --Aesthetics Tune.SusVisible = true -- Spring Visible Tune.WsBVisible = false -- Wishbone Visible Tune.SusRadius = .2 -- Suspension Coil Radius Tune.SusThickness = .1 -- Suspension Coil Thickness Tune.SusColor = "Bronze" -- Suspension Color [BrickColor] Tune.SusCoilCount = 8 -- Suspension Coil Count Tune.WsColor = "Black" -- Wishbone Color [BrickColor] Tune.WsThickness = .1 -- Wishbone Rod Thickness
--Creates both buffer and non-buffer rockets. function RocketCreator:CreateRocket(IsBufferRocket) --Create the base parts and mesh. local Rocket = Instance.new("Part") Rocket.Name = "Rocket" Rocket.Size = Vector3.new(1,1,4) Rocket.CanCollide = false local Mesh = Instance.new("SpecialMesh") Mesh.Name = "RocketMesh" Mesh.MeshId = "http://www.roblox.com/asset/?id=94690081" Mesh.TextureId = "http://www.roblox.com/asset/?id=94689966" Mesh.Parent = Rocket if IsBufferRocket then --If it is a buffer rocket, add the effects, physics, and scripts. Mesh.Scale = Vector3.new(2.5,2.5,2) local Fire = Instance.new("Fire") Fire.Heat = 5 Fire.Size = 2 Fire.Parent = Rocket local Light = Instance.new("PointLight") Light.Name = "Light" Light.Color = Color3.new(1,170/255,0) Light.Range = 10 Light.Shadows = true Light.Parent = Rocket local BodyGyro = Instance.new("BodyGyro") BodyGyro.MaxTorque = Vector3.new(10^99,10^99,10^99) BodyGyro.Parent = Rocket local RocketPropulsion = Instance.new("BodyVelocity") RocketPropulsion.MaxForce = Vector3.new(10^99,10^99,10^99) RocketPropulsion.Parent = Rocket local SwooshSound = Instance.new("Sound") SwooshSound.Name = "SwooshSound" SwooshSound.MaxDistance = 10000 SwooshSound.Looped = true SwooshSound.SoundId = "rbxasset://sounds/Rocket whoosh 01.wav" SwooshSound.Volume = 1 SwooshSound.Parent = Rocket local NewRocketScript = RocketScript:Clone() NewRocketScript.Disabled = false NewRocketScript.Parent = Rocket PlayerDamagerScript:Clone().Parent = NewRocketScript ConfigurationScript:Clone().Parent = NewRocketScript end return Rocket end return RocketCreator
--[[Misc]] Tune.LoadDelay = 1.0 -- Delay before initializing chassis (in seconds) Tune.AutoStart = true -- Set to false if using manual ignition plugin Tune.AutoFlip = true -- Set to false if using manual flip plugin Tune.AutoUpdate = true -- Automatically applies minor updates to the chassis if any are found. -- Will NOT apply major updates, but will notify you of any. -- Set to false to mute notifications, or if using modified Drive.
--script.Parent.Parent.Parent:FindFirstChild("A-Chassis Tune"):WaitForChild('A-Chassis Interface') handler = script.Parent handler.OnServerEvent:Connect(function(plr, side) print('received') handler:FireClient(game.Players:WaitForChild(plr.Name)) if side == 'front' then airbags.FL.Transparency = 0 airbags.FR.Transparency = 0 end if side == 'frontleft' then airbags.FL.Transparency = 0 airbags.FR.Transparency = 0 airbags.L.Transparency = 0 end if side == 'left' then airbags.L.Transparency = 0 airbags.R.Transparency = 0 end if side == 'frontright' then airbags.FR.Transparency = 0 airbags.FL.Transparency = 0 airbags.R.Transparency = 0 end if side == 'right' then airbags.R.Transparency = 0 airbags.L.Transparency = 0 end if side == 'restore' then airbags.FL.Transparency = 1 airbags.FR.Transparency = 1 airbags.R.Transparency = 1 airbags.L.Transparency = 1 end end)
-- Read the comments below to set your admin commands to your liking -- local Banned = {"Put Name Here"} --Put the person you want to bans name here, or use the command ";ban [Player]"
-- -- The "process.env" object has a bunch of particularities: first, it does not -- -- directly extend from Object; second, it converts any assigned value to a -- -- string; and third, it is case-insensitive in Windows. We use a proxy here to -- -- mimic it (see https://nodejs.org/api/process.html#process_process_env).
--[=[ Fired when the Merch Booth is closed. This fires when either the catalog or item detail view are closed. @prop merchBoothClosed RBXScriptSignal @within MerchBooth @client ]=] uiStatesEvents.merchBoothClosed = Instance.new("BindableEvent")
--<< Returns hit, position, normal, time >> function raycast(model, start, vector, brickFunction) local hit, normal, time = raycastRecursive(model, start, vector, brickFunction, vector.unit, dot(start, vector.unit)) if (dot(normal, vector) > 0) then normal = -normal end return hit, start + time * vector, normal.unit, time end function raycastRecursive(model, start, vector, brickFunction, unitVec, startDist) if (model.className == "Part") or (model.className == "Seat") or (model.className =="SpawnLocation") then local range = model.Size.magnitude / 2 local dist = dot(model.Position, unitVec) - startDist if (dist + range > 0) and (dist - range < vector.magnitude) and ((dist * unitVec + start - model.Position).magnitude < range) and brickFunction(model) then local halfSize = model.Size / 2 if (model.Shape == Enum.PartType.Ball) then local time, timeMax = getLineSphereCollide(start, vector, model.Position, halfSize.x) if (time < 1) and (time >= 0) then return model, (time * vector + start - model.Position), time else return nil, Vector3.new(0, 0, 0), 1 end elseif (model.Shape == Enum.PartType.Block) then local time = 1 local cf = model.CFrame - model.Position local xvec = cf * Vector3.new(1, 0, 0) local yvec = cf * Vector3.new(0, 1, 0) local zvec = cf * Vector3.new(0, 0, 1) local xspd = -dot(xvec, vector) local yspd = -dot(yvec, vector) local zspd = -dot(zvec, vector) local xmin, xmax, ymin, ymax, zmin, zmax = -1 local dotProd = dot(xvec, start - model.Position) if (xspd ~= 0) then xmin = (dotProd - halfSize.x) / xspd xmax = (dotProd + halfSize.x) / xspd if (xmax < xmin) then local swap = xmin xmin = xmax xmax = swap end else if (math.abs(dotProd) < halfSize.x) then xmax = 1 xmin = 0 else return nil, Vector3.new(0, 0, 0), 1 end end local dotProd = dot(yvec, start - model.Position) if (yspd ~= 0) then ymin = (dotProd - halfSize.y) / yspd ymax = (dotProd + halfSize.y) / yspd if (ymax < ymin) then local swap = ymin ymin = ymax ymax = swap end else if (math.abs(dotProd) < halfSize.y) then ymax = 1 ymin = 0 else return nil, Vector3.new(0, 0, 0), 1 end end local dotProd = dot(zvec, start - model.Position) if (zspd ~= 0) then zmin = (dotProd - halfSize.z) / zspd zmax = (dotProd + halfSize.z) / zspd if (zmax < zmin) then local swap = zmin zmin = zmax zmax = swap end else if (math.abs(dotProd) < halfSize.z) then zmax = 1 zmin = 0 else return nil, Vector3.new(0, 0, 0), 1 end end if (xmin <= ymax) and (xmax >= ymin) and (xmin <= zmax) and (xmax >= zmin) and (zmin <= ymax) and (zmax >= ymin) then local normal = xvec local min = xmin if (ymin > min) then min = ymin normal = yvec end if (zmin > min) then min = zmin normal = zvec end if (min >= 0) and (min < 1) then time = min elseif (xmax > 0) and (ymax > 0) and (zmax > 0) and (min < 0) then time = 0 normal = Vector3.new(0, 0, 0) end return model, normal, time else return nil, Vector3.new(0, 0, 0), 1 end else -- Cylinder local time = 1 local cf = model.CFrame - model.Position local xvec = cf * Vector3.new(1, 0, 0) local xspd = -dot(xvec, vector) local xmin, xmax = -1 local dotProd = dot(xvec, start - model.Position) if (xspd ~= 0) then xmin = (dotProd - halfSize.x) / xspd xmax = (dotProd + halfSize.x) / xspd if (xmax < xmin) then local swap = xmin xmin = xmax xmax = swap end else if (math.abs(dotProd) < halfSize.x) then xmax = 1 xmin = 0 else return nil, Vector3.new(0, 0, 0), 1 end end local relVec = cf:pointToObjectSpace(vector) * Vector3.new(0, 1, 1) local relPos = model.CFrame:pointToObjectSpace(start) * Vector3.new(0, 1, 1) local rmin, rmax = getLineSphereCollide(relPos, relVec, Vector3.new(0, 0, 0), halfSize.y) if (xmin <= rmax) and (xmax >= rmin) and (rmax > 0) then local normal = xvec local min = xmin if (rmin > min) then min = rmin normal = cf * (relPos + relVec * min) end if (min >= 0) and (min < 1) then time = min elseif (xmax > 0) and (rmax > 0) and (min < 0) then time = 0 normal = Vector3.new(0, 0, 0) end return model, normal, time else return nil, Vector3.new(0, 0, 0), 1 end return nil, Vector3.new(0, 0, 0), 1 end end return nil, Vector3.new(0, 0, 0), 1 elseif (model.className=="Model") or (model.className=="Workspace") or (model.className=="Hat") or (model.className == "Tool") then local children=model:GetChildren() local time=1 local normal=Vector3.new(0, 0, 0) local hit=nil for n = 1, #children do if children[n]~= nil then local newHit, newNormal, newTime = raycastRecursive(children[n], start, vector, brickFunction, unitVec, startDist) if (newTime < time) then time = newTime hit = newHit normal = newNormal end end end return hit, normal, time else return nil, Vector3.new(0, 0, 0), 1 end end
--Electric Music-- local function AttachParticleControl(source_part) local prtc = nil local function Start() prtc = script.Bolt:clone() prtc.Parent = source_part end local function Update() end local function Stop() if prtc ~= nil then prtc:destroy() prtc = nil end end return {Start = Start, Update = Update, Stop = Stop} end return AttachParticleControl
-- Location: game.ReplicatedStorage.Consume -- Synapse Decompiler -- Purchase Here: https://brack4712.xyz/synapse/purchase/ wait(0.5) Tool = script.Parent local play = game.Players.LocalPlayer local char = play.Character local root = char:WaitForChild("HumanoidRootPart") local hum = char:WaitForChild("Humanoid") local inair = false char.Humanoid.FreeFalling:connect(function() inair = true end) char.Humanoid.Running:connect(function() inair = false end) function weldTogether(x, y) local W = Instance.new("Weld") W.Part0 = x W.Part1 = y local CJ = CFrame.new(x.Position) local C0 = x.CFrame:inverse() * CJ local C1 = y.CFrame:inverse() * CJ W.C0 = C0 W.C1 = C1 W.Parent = x return W end en = true function onButton1Down(mouse) if en == true and inair == false and root.Position.y > 1 then en = false local point = root.Position + mouse.Hit.lookVector * 100 local can = Tool.Handle:clone() can.Anchored = true can.CFrame = CFrame.new(root.Position, point) local nm = Instance.new("IntValue") nm.Name = "Speed" nm.Value = -10000 if hum:findFirstChild("Effects") then nm.Parent = hum:findFirstChild("Effects") end can.Parent = root Tool.Handle.Transparency = 1 can.Fuse:Play() local weld = weldTogether(can, root) wait(5) weld:Destroy() can.Fuse:Stop() can.Boom:Play() if hum then hum.Sit = true end root.Velocity = CFrame.new(root.Position, point).lookVector * 250 local e = Instance.new("Explosion") e.BlastPressure = 0 e.Position = (can.CFrame * CFrame.new(0, 0, 2)).p e.Parent = can wait(1) nm.Parent = nil can:Destroy() wait(10) Tool.Handle.Transparency = 0 en = true end end function Equip(mouse) mouse.Icon = "rbxasset://textures\\GunCursor.png" mouse.Button1Down:connect(function() onButton1Down(mouse) end) end function Unequip(mouse) end script.Parent.Equipped:connect(Equip) script.Parent.Unequipped:connect(Unequip)
--[[Controls]] local _CTRL = _Tune.Controls local Controls = Instance.new("Folder",script.Parent) Controls.Name = "Controls" for i,v in pairs(_CTRL) do local a=Instance.new("StringValue",Controls) a.Name=i a.Value=v.Name a.Changed:connect(function() if i=="MouseThrottle" or i=="MouseBrake" then if a.Value == "MouseButton1" or a.Value == "MouseButton2" then _CTRL[i]=Enum.UserInputType[a.Value] else _CTRL[i]=Enum.KeyCode[a.Value] end else _CTRL[i]=Enum.KeyCode[a.Value] end end) end --Deadzone Adjust local _PPH = _Tune.Peripherals for i,v in pairs(_PPH) do local a = Instance.new("IntValue",Controls) a.Name = i a.Value = v a.Changed:connect(function() a.Value=math.min(100,math.max(0,a.Value)) _PPH[i] = a.Value end) end --Input Handler function DealWithInput(input,IsRobloxFunction) if (UserInputService:GetFocusedTextBox()==nil) and not _InControls then --Ignore when UI Focus --Shift Down [Manual Transmission] if _IsOn and (input.KeyCode ==_CTRL["ContlrShiftDown"] or (_MSteer and input.KeyCode==_CTRL["MouseShiftDown"]) or ((not _MSteer) and input.KeyCode==_CTRL["ShiftDown"])) and (_TMode=="Semi" or (_TMode=="Manual" and (not _ClutchOn))) and input.UserInputState == Enum.UserInputState.Begin then if _CGear == 0 and (_TMode=="Auto" or not _ClPressing) then _ClutchOn = true end if _CGear ~= 0 and (_CGear ~= ((#_Tune.Ratios-3)-(#_Tune.Ratios-2))) then _GThrotShift = 0 wait(_Tune.ShiftTime/2) _GThrotShift = 1 end _CGear = math.max(_CGear-1,-1) _ClutchOn = true --Shift Up [Manual Transmission] elseif _IsOn and (input.KeyCode ==_CTRL["ContlrShiftUp"] or (_MSteer and input.KeyCode==_CTRL["MouseShiftUp"]) or ((not _MSteer) and input.KeyCode==_CTRL["ShiftUp"])) and (_TMode=="Semi" or (_TMode=="Manual" and (not _ClutchOn))) and input.UserInputState == Enum.UserInputState.Begin then if _CGear == 0 and (_TMode=="Auto" or not _ClPressing) then _ClutchOn = true end if (_CGear ~= 0) and (_CGear ~= #_Tune.Ratios-2) then _GThrotShift = 0 wait(_Tune.ShiftTime) _GThrotShift = 1 end _CGear = math.min(_CGear+1,#_Tune.Ratios-2) _ClutchOn = true --Toggle Clutch elseif _IsOn and (input.KeyCode ==_CTRL["ContlrClutch"] or (_MSteer and input.KeyCode==_CTRL["MouseClutch"]) or ((not _MSteer) and input.KeyCode==_CTRL["Clutch"])) and _TMode=="Manual" then if input.UserInputState == Enum.UserInputState.Begin then _ClutchOn = false _ClPressing = true elseif input.UserInputState == Enum.UserInputState.End then _ClutchOn = true _ClPressing = false end --Toggle PBrake elseif _IsOn and input.KeyCode ==_CTRL["ContlrPBrake"] or (_MSteer and input.KeyCode==_CTRL["MousePBrake"]) or ((not _MSteer) and input.KeyCode==_CTRL["PBrake"]) then if input.UserInputState == Enum.UserInputState.Begin then _PBrake = not _PBrake elseif input.UserInputState == Enum.UserInputState.End then if car.DriveSeat.Velocity.Magnitude>5 then _PBrake = false end end --Toggle Transmission Mode elseif (input.KeyCode == _CTRL["ContlrToggleTMode"] or input.KeyCode==_CTRL["ToggleTransMode"]) and input.UserInputState == Enum.UserInputState.Begin then local n=1 for i,v in pairs(_Tune.TransModes) do if v==_TMode then n=i break end end n=n+1 if n>#_Tune.TransModes then n=1 end _TMode = _Tune.TransModes[n] --Throttle elseif _IsOn and ((not _MSteer) and (input.KeyCode==_CTRL["Throttle"] or input.KeyCode == _CTRL["Throttle2"])) or ((((_CTRL["MouseThrottle"]==Enum.UserInputType.MouseButton1 or _CTRL["MouseThrottle"]==Enum.UserInputType.MouseButton2) and input.UserInputType == _CTRL["MouseThrottle"]) or input.KeyCode == _CTRL["MouseThrottle"])and _MSteer) then if input.UserInputState == Enum.UserInputState.Begin then _GThrot = 1 else _GThrot = _Tune.IdleThrottle/100 end --Brake elseif ((not _MSteer) and (input.KeyCode==_CTRL["Brake"] or input.KeyCode == _CTRL["Brake2"])) or ((((_CTRL["MouseBrake"]==Enum.UserInputType.MouseButton1 or _CTRL["MouseBrake"]==Enum.UserInputType.MouseButton2) and input.UserInputType == _CTRL["MouseBrake"]) or input.KeyCode == _CTRL["MouseBrake"])and _MSteer) then if input.UserInputState == Enum.UserInputState.Begin then _GBrake = 1 else _GBrake = 0 end --Steer Left elseif (not _MSteer) and (input.KeyCode==_CTRL["SteerLeft"] or input.KeyCode == _CTRL["SteerLeft2"]) then if input.UserInputState == Enum.UserInputState.Begin then _GSteerT = -1 _SteerL = true else if _SteerR then _GSteerT = 1 else _GSteerT = 0 end _SteerL = false end --Steer Right elseif (not _MSteer) and (input.KeyCode==_CTRL["SteerRight"] or input.KeyCode == _CTRL["SteerRight2"]) then if input.UserInputState == Enum.UserInputState.Begin then _GSteerT = 1 _SteerR = true else if _SteerL then _GSteerT = -1 else _GSteerT = 0 end _SteerR = false end --Toggle Mouse Controls elseif input.KeyCode ==_CTRL["ToggleMouseDrive"] then if input.UserInputState == Enum.UserInputState.End then _MSteer = not _MSteer _GThrot = _Tune.IdleThrottle/100 _GBrake = 0 _GSteerT = 0 _ClutchOn = true end --Toggle TCS elseif _Tune.TCSEnabled and _IsOn and input.KeyCode == _CTRL["ToggleTCS"] or input.KeyCode == _CTRL["ContlrToggleTCS"] then if input.UserInputState == Enum.UserInputState.End then _TCS = not _TCS end --Toggle ABS elseif _Tune. ABSEnabled and _IsOn and input.KeyCode == _CTRL["ToggleABS"] or input.KeyCode == _CTRL["ContlrToggleABS"] then if input.UserInputState == Enum.UserInputState.End then _ABS = not _ABS end end --Variable Controls if input.UserInputType.Name:find("Gamepad") then --Gamepad Steering if input.KeyCode == _CTRL["ContlrSteer"] then if input.Position.X>= 0 then local cDZone = math.min(.99,_Tune.Peripherals.ControlRDZone/100) if math.abs(input.Position.X)>cDZone then _GSteerT = (input.Position.X-cDZone)/(1-cDZone) else _GSteerT = 0 end else local cDZone = math.min(.99,_Tune.Peripherals.ControlLDZone/100) if math.abs(input.Position.X)>cDZone then _GSteerT = (input.Position.X+cDZone)/(1-cDZone) else _GSteerT = 0 end end --Gamepad Throttle elseif _IsOn and input.KeyCode == _CTRL["ContlrThrottle"] then _GThrot = math.max(_Tune.IdleThrottle/100,input.Position.Z) --Gamepad Brake elseif input.KeyCode == _CTRL["ContlrBrake"] then _GBrake = input.Position.Z end end else _GThrot = _Tune.IdleThrottle/100 _GSteerT = 0 _GBrake = 0 if _CGear~=0 then _ClutchOn = true end end end UserInputService.InputBegan:connect(DealWithInput) UserInputService.InputChanged:connect(DealWithInput) UserInputService.InputEnded:connect(DealWithInput)
--[=[ Use to test that the right padding between the given GuiObject or Rect and the other GuiObject or Rect. The last argument is optional. If nil, the matcher will pass only if the difference **right** edge of the given GuiObject or Rect and the **right** edge of the other GuiObject or Rect is zero or positive. ```lua -- Jest expect(instanceA).toBeInsideLeftOf(instanceB) expect(instanceA).toBeInsideLeftOf(instanceB, 10) expect(instanceA).toBeInsideLeftOf(instanceB, NumberRange.new(0, 10)) ``` ```lua -- TestEZ expect(instanceA).to.be.insideLeftOf(instanceB) expect(instanceA).to.be.insideLeftOf(instanceB, 10) expect(instanceA).to.be.insideLeftOf(instanceB, NumberRange.new(0, 10)) ``` @tag inside @within CollisionMatchers2D ]=] local function insideLeftOf(a: GuiObject | Rect, b: GuiObject | Rect, distance: number | NumberRange) local aRect = toRect(a) local bRect = toRect(b) local distanceFromSide = -(aRect.Max - bRect.Max) if distance then if typeof(distance) == "number" then distance = NumberRange.new(distance) end return returnValue( distance.Min <= distanceFromSide.X and distance.Max >= distanceFromSide.X, "Was within range", "Was not within range ( " .. tostring(distance) .. ")" ) else return returnValue(distanceFromSide.X >= 0, "Was not right of the element", "Was too far right of the element") end end return insideLeftOf
--// Check if they own a Pass that is given on Spawn local OnSpawn = function(Player) for Index, PassTable in pairs(Passes) do if Owns:Invoke(Player, PassTable.Name) == true then Give(Player, PassTable.Give, false) end end end
-- -- -- -- -- -- -- --DIRECTION SCROLL-- -- -- -- -- -- -- -- Lift:WaitForChild("Direction").Changed:connect(function(val) if val == 1 then This.Display.ARW1.U1.BrickColor = BrickColor.new("Institutional white") This.Display.ARW1.U2.BrickColor = BrickColor.new("Institutional white") This.Display.ARW1.M1.BrickColor = BrickColor.new("Institutional white") This.Display.ARW1.M2.BrickColor = BrickColor.new("Institutional white") This.Display.ARW1.D1.BrickColor = BrickColor.new("Cyan") This.Display.ARW1.D2.BrickColor = BrickColor.new("Cyan") elseif val == -1 then This.Display.ARW1.U1.BrickColor = BrickColor.new("Cyan") This.Display.ARW1.U2.BrickColor = BrickColor.new("Cyan") This.Display.ARW1.M1.BrickColor = BrickColor.new("Institutional white") This.Display.ARW1.M2.BrickColor = BrickColor.new("Institutional white") This.Display.ARW1.D1.BrickColor = BrickColor.new("Institutional white") This.Display.ARW1.D2.BrickColor = BrickColor.new("Institutional white") else This.Display.ARW1.U1.BrickColor = BrickColor.new("Cyan") This.Display.ARW1.U2.BrickColor = BrickColor.new("Cyan") This.Display.ARW1.M1.BrickColor = BrickColor.new("Cyan") This.Display.ARW1.M2.BrickColor = BrickColor.new("Cyan") This.Display.ARW1.D1.BrickColor = BrickColor.new("Cyan") This.Display.ARW1.D2.BrickColor = BrickColor.new("Cyan") end end)
--// Damage Settings BaseDamage = 80; -- Torso Damage LimbDamage = 60; -- Arms and Legs ArmorDamage = 58; -- How much damage is dealt against armor (Name the armor "Armor") HeadDamage = 200; -- If you set this to 100, there's a chance the player won't die because of the heal script
--Made by Luckymaxer Debris = game:GetService("Debris") RunService = game:GetService("RunService") Character = script.Parent Humanoid = Character:FindFirstChild("Humanoid") Smoke = script:FindFirstChild("Smoke") function DestroyScript() Debris:AddItem(script, 0.5) end if not Smoke or not Humanoid or Humanoid.Health > 0 then return end PartsEffected = {} for i, v in pairs(Character:GetChildren()) do if v:IsA("BasePart") and v.Transparency < 1 then v.Velocity = (v.Velocity + (CFrame.Angles((math.random(-360, 360) * 0.01), (math.random(-360, 360) * 0.01), (math.random(-360, 360) * 0.01)).lookVector * math.random(1, 5))) v.RotVelocity = Vector3.new((math.random(-360, 360) * 0.01), (math.random(-360, 360) * 0.01), (math.random(-360, 360) * 0.01)) for ii, vv in pairs(v:GetChildren()) do if vv:IsA("ParticleEmitter") then vv:Destroy() end end local SmokeEffect = Smoke:Clone() SmokeEffect.Enabled = true SmokeEffect.Parent = v table.insert(PartsEffected, {Part = v, Smoke = SmokeEffect}) end end FadeLoop = RunService.Stepped:connect(function(Time, Step) if #PartsEffected == 0 then if FadeLoop then FadeLoop:disconnect() return end else for i, v in pairs(PartsEffected) do if v.Part.Transparency < 1 then v.Part.Transparency = (v.Part.Transparency + 0.01) if v.Part.Transparency >= 1 then v.Smoke.Enabled = false Debris:AddItem(v.Part, 4) end else table.remove(PartsEffected, i) end end end end)
----------------- --| Constants |-- ----------------- local COOLDOWN = .7 -- Seconds until tool can be used again
-- API facing functions events.getCanvases.OnInvoke = getCanvases(contexts, services) events.placeArt.OnInvoke = placeArt(contexts, services) events.removeAllArt.OnInvoke = removeAllArt(contexts, services)
------------------------------------------- local weld2 = Instance.new("Weld") weld2.Part0 = torso weld2.Parent = torso weld2.Part1 = arms[2] weld2.C1 = CFrame.new(-0.4, 1.25, 0.5) * CFrame.fromEulerAnglesXYZ(math.rad(90),-0.25,0) --Right leg arms[2].Name = "RDave" arms[2].CanCollide = true welds[2] = weld2
-- Don't mess with anything below kthx -- return {Settings,{Banned,Mods,Admins,SuperAdmins,Owners},Custom_Commands}
-- constants local VERSION = 1 local PROPERTY_ID = configuration.GOOGLE_ANALYTICS_TRACKING_ID local PLACE_ID = game.PlaceId
--[=[ @param name string @param inboundMiddleware ClientMiddleware? @param outboundMiddleware ClientMiddleware? @return ClientRemoteSignal Returns a new ClientRemoteSignal that mirrors the matching RemoteSignal created by ServerComm with the same matching `name`. ```lua local mySignal = clientComm:GetSignal("MySignal") -- Listen for data from the server: mySignal:Connect(function(message) print("Received message from server:", message) end) -- Send data to the server: mySignal:Fire("Hello!") ``` ]=] function ClientComm:GetSignal( name: string, inboundMiddleware: Types.ClientMiddleware?, outboundMiddleware: Types.ClientMiddleware? ) return Comm.GetSignal(self._instancesFolder, name, inboundMiddleware, outboundMiddleware) end
-- Reload animation function reload() if not reloading then reloading=true; updateAmmo() local reloadTime = tankStats.ReloadTime.Value; Loaded = false local Timer = 0 for i = 7, 1, -1 do wait(reloadTime/8); Timer = Timer + 1 if Timer >= 2 and Loaded == false then GUI.ReloadSound:Play() Loaded = true end end wait(reloadTime/8); if Timer >= 7 then GUI.Loaded.Visible = true Timer = 0 reloading = false; end end end function fire() if reloading then return end; local APAmmo = tankStats.APAmmo; local HEAmmo = tankStats.HEAmmo; if currRound.Value == "AP" and APAmmo.Value <= 0 then return end if currRound.Value == "HE" and HEAmmo.Value <= 0 then return end if currRound.Value == "AP" then APAmmo.Value = APAmmo.Value - 1; else HEAmmo.Value = HEAmmo.Value - 1; end GUI.Loaded.Visible = false local fireScript = tankStats["Fire" .. currRound.Value]:clone(); fireScript.Parent = parts; fireScript.Disabled = false; reload(GUI); end
--Common functions local function StringSplit(s, delimiter) local spl = {} for match in (s..delimiter):gmatch("(.-)"..delimiter) do table.insert(spl, match) end return spl end
-- -- -- -- -- -- -- --DIRECTION SCROLL-- -- -- -- -- -- -- -- while wait() do -- -- -- -- -- -- -- --DIRECTION SCROLL-- -- -- -- -- -- -- -- if Lift:WaitForChild("Direction").Value == 1 then This.Display.ARW1.U.BrickColor = BrickColor.new(ActiveARWColour) This.Display.ARW1.U.Material = "Neon" This.Display.ARW1.D.BrickColor = BrickColor.new(InactiveColour) This.Display.ARW1.D.Material = "SmoothPlastic" elseif Lift:WaitForChild("Direction").Value == -1 then This.Display.ARW1.U.BrickColor = BrickColor.new(InactiveColour) This.Display.ARW1.U.Material = "SmoothPlastic" This.Display.ARW1.D.BrickColor = BrickColor.new(ActiveARWColour) This.Display.ARW1.D.Material = "Neon" else This.Display.ARW1.U.BrickColor = BrickColor.new(InactiveColour) This.Display.ARW1.U.Material = "SmoothPlastic" This.Display.ARW1.D.BrickColor = BrickColor.new(InactiveColour) This.Display.ARW1.D.Material = "SmoothPlastic" end if Lift:WaitForChild("Mode").Value ~= "fire" then This.Legend.SurfaceGui.OOS.TextColor3 = Color3.fromRGB(54, 54, 54) else This.Legend.SurfaceGui.OOS.TextColor3 = Color3.fromRGB(255, 170, 0) end if Lift.Car.Sensor:FindFirstChild("Overloaded") then if Lift.Car.Sensor.Overloaded.Value == true then This.Legend.SurfaceGui.FULL.TextColor3 = Color3.fromRGB(255, 170, 0) else This.Legend.SurfaceGui.FULL.TextColor3 = Color3.fromRGB(54, 54, 54) end end end
-- Maid object: local Maid = { -- _cleanup_tasks = {}, -- _is_cleaned = false, } Maid.__index = Maid function Maid:AddCleanupTask(task) if self._is_cleaned == true then PerformCleanupTask(task) return function() end elseif type(task) == "function" then table.insert(self._cleanup_tasks, task) elseif typeof(task) == "RBXScriptConnection" then table.insert(self._cleanup_tasks, task) elseif typeof(task) == "Instance" then table.insert(self._cleanup_tasks, task) elseif type(task) == "table" then if type(task.Destroy) == "function" then table.insert(self._cleanup_tasks, task) elseif type(task.Disconnect) == "function" then table.insert(self._cleanup_tasks, task) else error("[MadworkMaid]: Received object table as cleanup task, but couldn't detect a :Destroy() method") end else error("[MadworkMaid]: Cleanup task of type \"" .. typeof(task) .. "\" not supported") end return function(...) self:RemoveCleanupTask(task) PerformCleanupTask(task, ...) end end function Maid:RemoveCleanupTask(task) local cleanup_tasks = self._cleanup_tasks local index = table.find(cleanup_tasks, task) if index ~= nil then table.remove(cleanup_tasks, index) end end function Maid:CleanupOfOne(task, ...) self:RemoveCleanupTask(task) PerformCleanupTask(task, ...) end function Maid:Cleanup(...) for _, task in ipairs(self._cleanup_tasks) do PerformCleanupTask(task, ...) end self._cleanup_tasks = {} self._is_cleaned = true end
-- Play music track AudioPlayerModule.playAudio("Main_Background_Theme")
----------------------------------------------------------------[SS6] TO ADJUST ANY OF THE STEERING OPTIONS, GO TO LINE 66 "--change" ssl = carSeat.Parent.Parent.LW.WheelML ssr = carSeat.Parent.Parent.RW.WheelMR strlckL = 1 strlckR = 1 strspd = script.Parent.Storage.SteerSpeed.Value strprg = 0 maxlockL = carSeat.Storage.SteeringAngle.Value maxlockR = carSeat.Storage.SteeringAngle.Value m = false occ = false n = false steer = 0 if carSeat.Steer == 1 then strlckL = math.rad(maxlockL+4) strlckR = math.rad(maxlockR+6) elseif carSeat.Steer == -1 then strlckL = math.rad(maxlockL+6) strlckR = math.rad(maxlockR+4) end while wait() do spd = carSeat.Velocity.Magnitude steer = (steer+((carSeat.Steer-steer)*strspd)) carSeat.Parent.Parent.LW.WheelML.Gyro.cframe = carSeat.Parent.ref.CFrame * CFrame.Angles(0,((-1*steer)*strlckL)*(strprg/(spd+strprg)),0) carSeat.Parent.Parent.RW.WheelMR.Gyro.cframe = carSeat.Parent.ref.CFrame * CFrame.Angles(0,((-1*steer)*strlckR)*(strprg/(spd+strprg)),0) carSeat.Parent.Parent.LW.ML.HingeConstraint.MotorMaxTorque = 0 carSeat.Parent.Parent.RW.MR.HingeConstraint.MotorMaxTorque = 0 if carSeat.Throttle == 0 then strspd = script.Parent.Storage.SteerSpeed.Value*4.3 end ssl.Gyro.D = damp ssl.Gyro.maxTorque = Vector3.new(0,maxtq,0) ssl.Gyro.P = pw ssr.Gyro.D = damp ssr.Gyro.maxTorque = Vector3.new(0,maxtq,0) ssr.Gyro.P = pw if spd < 140 then strprg = 160 else strprg = 80*ty end if carSeat.Storage.Mode == "City" then ty = 0.005 else ty = 1 end if script.Parent.Storage.CurrentGear.Value == 2 and carSeat.Steer == 0 then damp = 800 maxtq = 30000 pw = 100000 else damp = 1000 --change maxtq = 3000 --change pw = 10000 --change end --if script.Parent.Storage.CurrentGear.Value == 2 and carSeat.Steer == 0 then --if m == false then -- m = true occ = true n = true
----- hot tap handler for i, v in pairs(hotTap:GetChildren()) do if v:FindFirstChild("ClickDetector") then v.ClickDetector.MouseClick:Connect(function() if hotOn.Value == false then hotOn.Value = true faucet.ParticleEmitter.Enabled = true waterSound:Play() hotTap:SetPrimaryPartCFrame(hotTap.PrimaryPart.CFrame * CFrame.Angles(math.rad(45),0,0)) else hotOn.Value = false if coldOn.Value == false then faucet.ParticleEmitter.Enabled = false waterSound:Stop() end hotTap:SetPrimaryPartCFrame(hotTap.PrimaryPart.CFrame * CFrame.Angles(math.rad(-45),0,0)) end end) end end
-- Implements Javascript's `Map.prototype.forEach` as defined below -- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/forEach function Map:forEach<K, V>(callback: callbackFn<K, V> | callbackFnWithThisArg<K, V>, thisArg: Object?): () if typeof(callback) ~= "function" then error("callback is not a function") end return Array.forEach(self._array, function(key: K) local value: V = self._map[key] :: V if thisArg ~= nil then (callback :: callbackFnWithThisArg<K, V>)(thisArg, value, key, self) else (callback :: callbackFn<K, V>)(value, key, self) end end) end function Map:has(key): boolean return self._map[key] ~= nil end function Map:keys() return self._array end function Map:values() return Array.map(self._array, function(key) return self._map[key] end) end function Map:entries() return Array.map(self._array, function(key) return { key, self._map[key] } end) end function Map:ipairs() return ipairs(self:entries()) end function Map.__index(self, key) local mapProp = rawget(Map, key) if mapProp ~= nil then return mapProp end return Map.get(self, key) end function Map.__newindex(table_, key, value) table_:set(key, value) end local function coerceToMap(mapLike: Map<any, any> | Table<any, any>): Map<any, any> return instanceOf(mapLike, Map) and mapLike :: Map<any, any> -- ROBLOX: order is preservered or Map.new(Object.entries(mapLike)) -- ROBLOX: order is not preserved end local function coerceToTable(mapLike: Map<any, any> | Table<any, any>): Table<any, any> if not instanceOf(mapLike, Map) then return mapLike end -- create table from map return Array.reduce(mapLike:entries(), function(tbl, entry) tbl[entry[1]] = entry[2] return tbl end, {}) end return { Map = Map, coerceToMap = coerceToMap, coerceToTable = coerceToTable, }
-- This is the attack surface. It's imperitative that it is minimized as much as possible.
-- Either a constant value of type T, or a state object containing type T. export type CanBeState<T> = StateObject<T> | T
--[[ Runs the fire animation. --]] function EggCreator:PlayLaunchAnimation() --Launch the arm. ReleaseMotor.DesiredAngle = 3 wait(ANIMATION_TIME) Egg.Transparency = 1 --Delay the animation. wait(ANIMATION_DELAY_TIME) --Reset the arm. ReleaseMotor.DesiredAngle = 0 wait(ANIMATION_TIME) --Reset the egg. wait(RELOAD_TIME - (2* ANIMATION_TIME) - ANIMATION_DELAY_TIME) Egg.Transparency = 0 end return EggCreator
--[[Run]] --Print Version local ver=require(car["A-Chassis Tune"].README) print("Novena: AC6T Loaded - Build "..ver) --Runtime Loops -- ~60 c/s game["Run Service"].Stepped:connect(function() --Steering Steering() --RPM RPM() --Suspension if not workspace:PGSIsEnabled() and _Tune.SusEnabled then Suspension() end --Power Engine() --Update External Values _IsOn = script.Parent.IsOn.Value _InControls = script.Parent.ControlsOpen.Value script.Parent.Values.Gear.Value = _CGear script.Parent.Values.RPM.Value = _RPM script.Parent.Values.Boost.Value = (_Boost/2)*_TPsi script.Parent.Values.Horsepower.Value = _HP script.Parent.Values.HpNatural.Value = _NH script.Parent.Values.HpBoosted.Value = _BH*(_Boost/2) script.Parent.Values.Torque.Value = _HP * _Tune.EqPoint / _RPM script.Parent.Values.TqNatural.Value = _NT script.Parent.Values.TqBoosted.Value = _BT*(_Boost/2) script.Parent.Values.TransmissionMode.Value = _TMode script.Parent.Values.Throttle.Value = _GThrot*_GThrotShift script.Parent.Values.Brake.Value = _GBrake script.Parent.Values.SteerC.Value = _GSteerC*(1-math.min(car.DriveSeat.Velocity.Magnitude/_Tune.SteerDecay,1-(_Tune.MinSteer/100))) script.Parent.Values.SteerT.Value = _GSteerT script.Parent.Values.PBrake.Value = _PBrake script.Parent.Values.TCS.Value = _TCS script.Parent.Values.TCSActive.Value = _TCSActive script.Parent.Values.TCSAmt.Value = 1-_TCSAmt script.Parent.Values.ABS.Value = _ABS script.Parent.Values.ABSActive.Value = _ABSActive script.Parent.Values.MouseSteerOn.Value = _MSteer script.Parent.Values.Velocity.Value = car.DriveSeat.Velocity end) --15 c/s while wait(.0667) do --Automatic Transmission if _TMode == "Auto" then Auto() end --Flip if _Tune.AutoFlip then Flip() end end
--[[Weight and CG]] Tune.Weight = 3214 -- Total weight (in pounds) Tune.WeightBSize = { -- Size of weight brick (dimmensions in studs ; larger = more stable) --[[Width]] 6 , --[[Height]] 4 , --[[Length]] 15 } Tune.WeightDist = 51 -- Weight distribution (0 - on rear wheels, 100 - on front wheels, can be <0 or >100) Tune.CGHeight = .8 -- Center of gravity height (studs relative to median of all wheels) Tune.WBVisible = false -- Makes the weight brick visible --Unsprung Weight Tune.FWheelDensity = .1 -- Front Wheel Density Tune.RWheelDensity = .1 -- Rear Wheel Density Tune.FWLgcyDensity = 1 -- Front Wheel Density [PGS OFF] Tune.RWLgcyDensity = 1 -- Rear Wheel Density [PGS OFF] Tune.AxleSize = 2 -- Size of structural members (larger = MORE STABLE / carry more weight) Tune.AxleDensity = .1 -- Density of structural members
--Handles the ball being touched. local function SlingshotBallHit(TouchPart) if TouchPart.Name == "Handle" or not TouchPart.Parent then return end local HitHumanoid = TouchPart.Parent:FindFirstChild("Humanoid") if HitHumanoid and HitHumanoid.Parent ~= LastHitCharacter then if SLINGSHOT_START_DAMAGE == CurrentDamage and TouchPart.Parent == FiredCharacter then return end LastHitCharacter = HitHumanoid.Parent PlayerDamager:DamageHumanoid(GetReflectedByPlayer() or FiredPlayer,HitHumanoid,CurrentDamage,GetDamageName()) else if not TouchPart.CanCollide then return end CurrentDamage = CurrentDamage/1.42 if CurrentDamage < 1 and TouchConnection then TouchConnection:disconnect() TouchConnection = nil SlingshotBall:Destroy() end end end
-- Make signal strict setmetatable(Signal, { __index = function(_tb, key) error(("Attempt to get Signal::%s (not a valid member)"):format(tostring(key)), 2) end, __newindex = function(_tb, key, _value) error(("Attempt to set Signal::%s (not a valid member)"):format(tostring(key)), 2) end, }) return { new = Signal.new, }
-------- OMG HAX r = game:service("RunService") local damage = 10 local slash_damage = 10 local lunge_damage = 20 sword = script.Parent.Handle Tool = script.Parent local SlashSound = Instance.new("Sound") SlashSound.SoundId = "http://www.roblox.com/asset/?id=11998777" SlashSound.Parent = sword local LungeSound = Instance.new("Sound") LungeSound.SoundId = "http://www.roblox.com/asset/?id=11998796" LungeSound.Parent = sword local UnsheathSound = Instance.new("Sound") UnsheathSound.SoundId = "http://www.roblox.com/asset/?id=11998770" UnsheathSound.Parent = sword function blow(hit) local humanoid = hit.Parent:findFirstChild("Humanoid") local vCharacter = Tool.Parent local vPlayer = game.Players:playerFromCharacter(vCharacter) local hum = vCharacter:findFirstChild("Humanoid") -- non-nil if tool held by a character if humanoid~=nil and humanoid ~= hum and hum ~= nil then -- final check, make sure sword is in-hand local right_arm = vCharacter:FindFirstChild("Right Arm") if (right_arm ~= nil) then local joint = right_arm:FindFirstChild("RightGrip") if (joint ~= nil and (joint.Part0 == sword or joint.Part1 == sword)) then tagHumanoid(humanoid, vPlayer) humanoid:TakeDamage(damage) wait(1) untagHumanoid(humanoid) end end end end function tagHumanoid(humanoid, player) local creator_tag = Instance.new("ObjectValue") creator_tag.Value = player creator_tag.Name = "creator" creator_tag.Parent = humanoid end function untagHumanoid(humanoid) if humanoid ~= nil then local tag = humanoid:findFirstChild("creator") if tag ~= nil then tag.Parent = nil end end end function attack() damage = slash_damage SlashSound:play() Tool.Parent.Torso["Right Shoulder"].MaxVelocity = 0.7 Tool.Parent.Torso["Right Shoulder"].DesiredAngle = 3.6 wait(.1) Tool.Parent.Torso["Right Shoulder"].MaxVelocity = 1 end function lunge() damage = lunge_damage LungeSound:play() local anim = Instance.new("StringValue") anim.Name = "toolanim" anim.Value = "Lunge" anim.Parent = Tool local force = Instance.new("BodyVelocity") force.velocity = Vector3.new(0,80,0) force.Parent = Tool.Parent.Torso wait(.25) force.velocity = (Tool.Parent.Torso.CFrame.lookVector * 120) + Vector3.new(0, 60,0) --swordOut() wait(.5) force.Parent = nil wait(.5) --swordUp() damage = slash_damage end function swordUp() Tool.GripForward = Vector3.new(-1,0,0) Tool.GripRight = Vector3.new(0,1,0) Tool.GripUp = Vector3.new(0,0,1) end function swordOut() Tool.GripForward = Vector3.new(0,0,1) Tool.GripRight = Vector3.new(0,-1,0) Tool.GripUp = Vector3.new(-1,0,0) end function swordAcross() -- parry end Tool.Enabled = true local last_attack = 0 function onActivated() if not Tool.Enabled then return end Tool.Enabled = false local character = Tool.Parent; local humanoid = character.Humanoid if humanoid == nil then print("Humanoid not found") return end t = r.Stepped:wait() if (t - last_attack < .2) then lunge() else attack() end last_attack = t --wait(.5) Tool.Enabled = true end function onEquipped() UnsheathSound:play() end script.Parent.Activated:connect(onActivated) script.Parent.Equipped:connect(onEquipped) connection = sword.Touched:connect(blow)
-- -- Monster:Initialize() Monster:InitializeUnique() while true do if not Monster:IsAlive() then if Data.IsDead == false then Data.IsDead = true Data.TimeOfDeath = tick() Self.Died:Fire() end if Data.IsDead == true then if tick()-Data.TimeOfDeath > Info.RespawnWaitTime then Monster:Respawn() end end end if Monster:IsAlive() then Monster:Update() end wait() end
--[[ This file is necessary for constructing the default Icon template Do not remove this module otherwise TopbarPlus will break Modifying this file may also cause TopbarPlus to break It's recommended instead to create a separate theme module and use that instead To apply your theme after creating it, do: ```lua local IconController = require(pathway.to.IconController) local Themes = require(pathway.to.Themes) IconController.setGameTheme(Themes.YourThemeName) ``` or by applying to an individual icon: ```lua local Icon = require(pathway.to.Icon) local Themes = require(pathway.to.Themes) local newIcon = Icon.new() :setTheme(Themes.YourThemeName) ``` --]] return { -- Settings which describe how an item behaves or transitions between states action = { toggleTransitionInfo = TweenInfo.new(0.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), resizeInfo = TweenInfo.new(0.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), repositionInfo = TweenInfo.new(0.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), captionFadeInfo = TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), tipFadeInfo = TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), dropdownSlideInfo = TweenInfo.new(0.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), menuSlideInfo = TweenInfo.new(0.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), }, -- Settings which describe how an item appears when 'deselected' and 'selected' toggleable = { -- How items appear normally (i.e. when they're 'deselected') deselected = { iconBackgroundColor = Color3.fromRGB(0, 0, 0), iconBackgroundTransparency = 0.5, iconCornerRadius = UDim.new(0.25, 0), iconGradientColor = ColorSequence.new(Color3.fromRGB(255, 255, 255)), iconGradientRotation = 0, iconImage = "", iconImageColor =Color3.fromRGB(255, 255, 255), iconImageTransparency = 0, iconImageYScale = 0.63, iconImageRatio = 1, iconLabelYScale = 0.45, iconScale = UDim2.new(1, 0, 1, 0), forcedIconSizeX = 32; forcedIconSizeY = 32; iconSize = UDim2.new(0, 32, 0, 32), iconOffset = UDim2.new(0, 0, 0, 0), iconText = "", iconTextColor = Color3.fromRGB(255, 255, 255), iconFont = Enum.Font.GothamSemibold, noticeCircleColor = Color3.fromRGB(255, 255, 255), noticeCircleImage = "http://www.roblox.com/asset/?id=4871790969", noticeTextColor = Color3.fromRGB(31, 33, 35), baseZIndex = 1, order = 1, alignment = "left", clickSoundId = "rbxassetid://5273899897", clickVolume = 0, clickPlaybackSpeed = 1, clickTimePosition = 0.12 }, -- How items appear after the icon has been clicked (i.e. when they're 'selected') -- If a selected value is not specified, it will default to the deselected value selected = { iconBackgroundColor = Color3.fromRGB(245, 245, 245), iconBackgroundTransparency = 0.1, iconImageColor = Color3.fromRGB(57, 60, 65), iconTextColor = Color3.fromRGB(57, 60, 65), clickPlaybackSpeed = 1.5, } }, -- Settings where toggleState doesn't matter (they have a singular state) other = { -- Caption settings captionBackgroundColor = Color3.fromRGB(0, 0, 0), captionBackgroundTransparency = 0.5, captionTextColor = Color3.fromRGB(255, 255, 255), captionTextTransparency = 0, captionFont = Enum.Font.GothamSemibold, captionOverlineColor = Color3.fromRGB(0, 170, 255), captionOverlineTransparency = 0, captionCornerRadius = UDim.new(0.25, 0), -- Tip settings tipBackgroundColor = Color3.fromRGB(255, 255, 255), tipBackgroundTransparency = 0.1, tipTextColor = Color3.fromRGB(27, 42, 53), tipTextTransparency = 0, tipFont = Enum.Font.GothamSemibold, tipCornerRadius = UDim.new(0.175, 0), -- Dropdown settings dropdownAlignment = "auto", -- 'left', 'mid', 'right' or 'auto' (auto is where the dropdown alignment matches the icons alignment) dropdownMaxIconsBeforeScroll = 3, dropdownMinWidth = 32, dropdownSquareCorners = false, dropdownBindToggleToIcon = true, dropdownToggleOnLongPress = false, dropdownToggleOnRightClick = false, dropdownCloseOnTapAway = false, dropdownHidePlayerlistOnOverlap = true, dropdownListPadding = UDim.new(0, 2), dropdownScrollBarColor = Color3.fromRGB(25, 25, 25), dropdownScrollBarTransparency = 0.2, dropdownScrollBarThickness = 4, -- Menu settings menuDirection = "auto", -- 'left', 'right' or 'auto' (for auto, if alignment is 'left' or 'mid', menuDirection will be 'right', else menuDirection is 'left') menuMaxIconsBeforeScroll = 4, menuBindToggleToIcon = true, menuToggleOnLongPress = false, menuToggleOnRightClick = false, menuCloseOnTapAway = false, menuScrollBarColor = Color3.fromRGB(25, 25, 25), menuScrollBarTransparency = 0.2, menuScrollBarThickness = 4, }, }
--[[Steering]] Tune.SteerInner = 21 -- Inner wheel steering angle (in degrees) Tune.SteerOuter = 19 -- Outer wheel steering angle (in degrees) Tune.SteerSpeed = .12 -- Steering increment per tick (in degrees) Tune.ReturnSpeed = .1 -- Steering increment per tick (in degrees) Tune.SteerDecay = 320 -- Speed of gradient cutoff (in SPS) Tune.MinSteer = 1 -- Minimum steering at max steer decay (in percent) Tune.MSteerExp = 1 -- Mouse steering exponential degree --Steer Gyro Tuning Tune.SteerD = 1000 -- Steering Dampening Tune.SteerMaxTorque = 50000 -- Steering Force Tune.SteerP = 20000 -- Steering Aggressiveness
--[=[ Use to determine if the given GuiObject or Rect is within the other GuiObject or Rect. This will fail if part of the given GuiObject or Rect extends beyond the extents of the other GuiObject or Rect. This can be useful in making sure child UI elements do not accidentally leak outside of their containers. ```lua expect(a).toBeInside(b) -- Jest expect(a).to.be.inside(b) -- TestEZ ``` ![Example of inside(a, b)](/inside(a,%20b).png) @tag relationship @within CollisionMatchers2D ]=] local function inside(a: GuiObject | Rect, b: GuiObject | Rect) local aRect = toRect(a) local bRect = toRect(b) return returnValue( isPointInside(aRect.Min, bRect) and isPointInside(aRect.Max, bRect), "Is inside the element", "Is not inside the element" ) end return inside
--[[Misc]] Tune.LoadDelay = .2 -- Delay before initializing chassis (in seconds) Tune.AutoStart = false -- Set to false if using manual ignition plugin Tune.AutoFlip = true -- Set to false if using manual flip plugin
-- Get list of attachments to make ballsocketconstraints between: function RigTypes.getAttachments(model, rigType) if rigType == Enum.HumanoidRigType.R6 then return RigTypes.getR6Attachments(model) elseif rigType == Enum.HumanoidRigType.R15 then return RigTypes.getR15Attachments(model) else return {} end end function RigTypes.getR6Attachments(model) local rightLegAttachment = Instance.new("Attachment") rightLegAttachment.Name = "RagdollRightLegAttachment" rightLegAttachment.Position = Vector3.new(0, 1, 0) rightLegAttachment.Parent = model:FindFirstChild("Right Leg") local leftLegAttachment = Instance.new("Attachment") leftLegAttachment.Name = "RagdollLeftLegAttachment" leftLegAttachment.Position = Vector3.new(0, 1, 0) leftLegAttachment.Parent = model:FindFirstChild("Left Leg") local torsoLeftAttachment = Instance.new("Attachment") torsoLeftAttachment.Name = "RagdollTorsoLeftAttachment" torsoLeftAttachment.Position = Vector3.new(-0.5, -1, 0) torsoLeftAttachment.Parent = model:FindFirstChild("Torso") local torsoRightAttachment = Instance.new("Attachment") torsoRightAttachment.Name = "RagdollTorsoRightAttachment" torsoRightAttachment.Position = Vector3.new(0.5, -1, 0) torsoRightAttachment.Parent = model:FindFirstChild("Torso") local headAttachment = Instance.new("Attachment") headAttachment.Name = "RagdollHeadAttachment" headAttachment.Position = Vector3.new(0, -0.5, 0) headAttachment.Parent = model:FindFirstChild("Head") local leftArmAttachment = Instance.new("Attachment") leftArmAttachment.Name = "RagdollLeftArmAttachment" leftArmAttachment.Position = Vector3.new(0.5, 1, 0) leftArmAttachment.Parent = model:FindFirstChild("Left Arm") local ragdollRightArmAttachment = Instance.new("Attachment") ragdollRightArmAttachment.Name = "RagdollRightArmAttachment" ragdollRightArmAttachment.Position = Vector3.new(-0.5, 1, 0) ragdollRightArmAttachment.Parent = model:FindFirstChild("Right Arm") local query = find(model) return { Head = query( {"Torso", "NeckAttachment"}, {"Head", "RagdollHeadAttachment"}, R6_HEAD_LIMITS), ["Left Arm"] = query( {"Torso", "LeftCollarAttachment"}, {"Left Arm", "RagdollLeftArmAttachment"}, R6_SHOULDER_LIMITS), ["Right Arm"] = query( {"Torso", "RightCollarAttachment"}, {"Right Arm", "RagdollRightArmAttachment"}, R6_SHOULDER_LIMITS), ["Left Leg"] = createJointData(torsoLeftAttachment, leftLegAttachment, R6_HIP_LIMITS), ["Right Leg"] = createJointData(torsoRightAttachment, rightLegAttachment, R6_HIP_LIMITS), } end function RigTypes.getR15Attachments(model) local query = find(model) return { Head = query( {"UpperTorso", "NeckRigAttachment"}, {"Head", "NeckRigAttachment"}, HEAD_LIMITS), LowerTorso = query( {"UpperTorso", "WaistRigAttachment"}, {"LowerTorso", "RootRigAttachment"}, LOWER_TORSO_LIMITS), LeftUpperArm = query( {"UpperTorso", "LeftShoulderRigAttachment"}, {"LeftUpperArm", "LeftShoulderRigAttachment"}, SHOULDER_LIMITS), LeftLowerArm = query( {"LeftUpperArm", "LeftElbowRigAttachment"}, {"LeftLowerArm", "LeftElbowRigAttachment"}, ELBOW_LIMITS), LeftHand = query( {"LeftLowerArm", "LeftWristRigAttachment"}, {"LeftHand", "LeftWristRigAttachment"}, HAND_FOOT_LIMITS), RightUpperArm = query( {"UpperTorso", "RightShoulderRigAttachment"}, {"RightUpperArm", "RightShoulderRigAttachment"}, SHOULDER_LIMITS), RightLowerArm = query( {"RightUpperArm", "RightElbowRigAttachment"}, {"RightLowerArm", "RightElbowRigAttachment"}, ELBOW_LIMITS), RightHand = query( {"RightLowerArm", "RightWristRigAttachment"}, {"RightHand", "RightWristRigAttachment"}, HAND_FOOT_LIMITS), LeftUpperLeg = query( {"LowerTorso", "LeftHipRigAttachment"}, {"LeftUpperLeg", "LeftHipRigAttachment"}, HIP_LIMITS), LeftLowerLeg = query( {"LeftUpperLeg", "LeftKneeRigAttachment"}, {"LeftLowerLeg", "LeftKneeRigAttachment"}, KNEE_LIMITS), LeftFoot = query( {"LeftLowerLeg", "LeftAnkleRigAttachment"}, {"LeftFoot", "LeftAnkleRigAttachment"}, HAND_FOOT_LIMITS), RightUpperLeg = query( {"LowerTorso", "RightHipRigAttachment"}, {"RightUpperLeg", "RightHipRigAttachment"}, HIP_LIMITS), RightLowerLeg = query( {"RightUpperLeg", "RightKneeRigAttachment"}, {"RightLowerLeg", "RightKneeRigAttachment"}, KNEE_LIMITS), RightFoot = query( {"RightLowerLeg", "RightAnkleRigAttachment"}, {"RightFoot", "RightAnkleRigAttachment"}, HAND_FOOT_LIMITS), } end function RigTypes.getR6NoCollisions(model) local list = {} local function addPair(pair) local part0 = model:FindFirstChild(pair[1]) local part1 = model:FindFirstChild(pair[2]) if part0 and part1 then table.insert(list, {part0, part1}) end end addPair({"Head", "Torso"}) addPair({"Left Arm", "Torso"}) addPair({"Right Arm", "Torso"}) addPair({"Left Leg", "Torso"}) addPair({"Right Leg", "Torso"}) addPair({"Left Leg", "Right Leg"}) return list end function RigTypes.getR15NoCollisions(model) local list = {} local function addPair(pair) local part0 = model:FindFirstChild(pair[1]) local part1 = model:FindFirstChild(pair[2]) if part0 and part1 then table.insert(list, {part0, part1}) end end addPair({"Head", "UpperTorso"}) addPair({"UpperTorso", "LowerTorso"}) addPair({"UpperTorso", "LeftUpperArm"}) addPair({"LowerTorso", "LeftUpperArm"}) addPair({"LeftUpperArm", "LeftLowerArm"}) addPair({"LeftLowerArm", "LeftHand"}) addPair({"LeftUpperArm", "LeftHand"}) addPair({"UpperTorso", "RightUpperArm"}) addPair({"LowerTorso", "RightUpperArm"}) addPair({"RightUpperArm", "RightLowerArm"}) addPair({"RightLowerArm", "RightHand"}) addPair({"RightUpperArm", "RightHand"}) addPair({"LeftUpperLeg", "RightUpperLeg"}) addPair({"UpperTorso", "RightUpperLeg"}) addPair({"LowerTorso", "RightUpperLeg"}) addPair({"RightUpperLeg", "RightLowerLeg"}) addPair({"RightLowerLeg", "RightFoot"}) addPair({"RightUpperLeg", "RightFoot"}) addPair({"UpperTorso", "LeftUpperLeg"}) addPair({"LowerTorso", "LeftUpperLeg"}) addPair({"LeftUpperLeg", "LeftLowerLeg"}) addPair({"LeftLowerLeg", "LeftFoot"}) addPair({"LeftUpperLeg", "LeftFoot"}) -- Support weird R15 rigs addPair({"UpperTorso", "LeftLowerLeg"}) addPair({"UpperTorso", "RightLowerLeg"}) addPair({"LowerTorso", "LeftLowerLeg"}) addPair({"LowerTorso", "RightLowerLeg"}) addPair({"UpperTorso", "LeftLowerArm"}) addPair({"UpperTorso", "RightLowerArm"}) local upperTorso = model:FindFirstChild("UpperTorso") if upperTorso and upperTorso.Size.x <= 1.5 then addPair({"Head", "LeftUpperArm"}) addPair({"Head", "RightUpperArm"}) end return list end return RigTypes
--[[ Applies the theme. --]] return function(MapModel) --Replace the colors. ReplaceColors(MapModel,BrickColor.new("Bright green"),BrickColor.new("Institutional white")) end
--onselected, save shoulders and get player script.Parent.Equipped:connect(function() if selected then return end selected = true player = game.Players:playerFromCharacter(script.Parent.Parent) local ch = script.Parent.Parent WaitForChild(ch, "Torso") RSH = WaitForChild(ch.Torso, "Right Shoulder") LSH = WaitForChild(ch.Torso, "Left Shoulder") GRP = WaitForChild(ch["Right Arm"], "RightGrip") _G.Grip = GRP -- RSH.Part1 = nil LSH.Part1 = nil -- RW.Part0 = ch.Torso RW.C0 = CFrame.new(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5) RW.C1 = CFrame.new(0, 0.5, 0) RW.Part1 = ch["Right Arm"] RW.Parent = ch.Torso _G.R = RW -- LW.Part0 = ch.Torso LW.C0 = CFrame.new(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8) LW.C1 = CFrame.new(0, 0.5, 0) LW.Part1 = ch["Left Arm"] LW.Parent = ch.Torso _G.L = LW -- --GRP.C0 = CFrame.new(0, 0, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0) --Bring_Arm_Up animation for i = 0, 1, 0.05 do wait() RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(1.5*i, 0, -0.5*i) LW.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(1.6*i, 0, 0.7*i) LW.C1 = CFrame.new(-0.3*i, 1.7*i, 0) end --put in grip wait() local rg = (ch["Right Arm"]:FindFirstChild("RightGrip") or GRP) if rg ~= GRP then GRP.Parent = ch["Right Arm"] rg:remove() end end)
--Settings local MaxDistance = 15 local TimeToEnter = 0.7 local EnterKey = Enum.KeyCode.E local EnterButton = Enum.KeyCode.ButtonX
-------------------------------------------------- script.Parent.Values.RPM.Changed:connect(function() intach.Rotation = -65 + script.Parent.Values.RPM.Value * 250 / 8000 end) script.Parent.Values.Velocity.Changed:connect(function(property) inspd.Rotation = -30 + (440 / 160) * (math.abs(script.Parent.Values.Velocity.Value.Magnitude*((10/12) * (50/88)))) end) script.Parent.Values.Gear.Changed:connect(function() local gearText = script.Parent.Values.Gear.Value if gearText == 0 then gearText = "N" car.Body.Dash.DashSc.G.Gear.Text = "N" car.DriveSeat.Filter:FireServer('reverse',false) elseif gearText == -1 then gearText = "R" car.Body.Dash.DashSc.G.Gear.Text = "R" car.DriveSeat.Filter:FireServer('reverse',true) end car.Body.Dash.DashSc.G.Gear.Text = gearText end) script.Parent.Values.PBrake.Changed:connect(function() dash.PBrake.Visible = script.Parent.Values.PBrake.Value end)
--[[ LOWGames Studios Date: 27 October 2022 by Elder ]] -- local u1 = nil; coroutine.wrap(function() u1 = require(game.ReplicatedStorage:WaitForChild("Framework"):WaitForChild("Library")); end)(); return function(p1) local f f = p1.Touched:Connect(function() end) local v1 = p1:GetTouchingParts(); f:Disconnect(); return v1; end;
-- functions local function GetSquad(player) for _, squad in pairs(SQUADS:GetChildren()) do if squad:FindFirstChild(player.Name) then return squad end end end
-- Camera Shake Presets -- Stephen Leitnick -- February 26, 2018
-- ROBLOX deviation: since owner could be a function or a class component, we -- need to do additional handling to get its name. It's easier to make this a -- reusable function local function describeOwner(owner: nil | ReactComponent<any>): string? if typeof(owner) == "function" then return debug.info(owner :: (any) -> any, "n") elseif typeof(owner) == "table" then return tostring(owner) end return nil end local function describeBuiltInComponentFrame( name: string, source: Source | nil, -- ROBLOX deviation: owner could be a class component owner: nil | ReactComponent<any> ): string -- ROBLOX deviation START: for built-in components, we can provide the full -- description regardless of `enableStackLocations` since we don't actually -- need to do any callstack trickery to get it -- if enableComponentStackLocations then -- if prefix == nil then -- -- Extract the VM specific prefix used by each line. -- local _, x = pcall(error, debug.traceback()) -- local match = x.stack.trim().match("\n00:00:00.000 - ") -- if match then -- prefix = match[1] -- else -- prefix = '' -- end -- end -- -- We use the prefix to ensure our stacks line up with native stack frames. -- return "\n" .. prefix .. name -- else -- local ownerName = nil -- if _G.__DEV__ and owner then -- ownerName = describeOwner(owner) -- end -- return describeComponentFrame(name, source, ownerName) -- end local ownerName = nil if _G.__DEV__ and owner then ownerName = describeOwner(owner) end return describeComponentFrame(name, source, ownerName) -- ROBLOX deviation END end local reentry = false local componentFrameCache = nil if _G.__DEV__ then componentFrameCache = setmetatable({}, { __mode = "k" }) end local function describeNativeComponentFrame( fn: nil | ReactComponent<any>, -- ROBLOX TODO: only accept tables with __tostring metamethod overridden construct: boolean ): string -- // If something asked for a stack inside a fake render, it should get ignored. if not fn or reentry then return "" end if _G.__DEV__ then local frame = componentFrameCache[fn] if frame ~= nil then return frame end end local control reentry = true -- deviation: Error.prepareStackTrace is not implemented -- local previousPrepareStackTrace = Error.prepareStackTrace -- Error.prepareStackTrace = undefined local previousDispatcher if _G.__DEV__ then previousDispatcher = ReactCurrentDispatcher.current -- Set the dispatcher in DEV because this might be call in the render -- function for warnings. ReactCurrentDispatcher.current = nil disableLogs() end -- // This should throw. -- deviation: Lua does not have stack traces with errors, so we -- use xpcall to convert the error and append a stack trace. -- This will change the theorical stack trace we want, because of -- the function where we call 'debug.traceback()', but the control -- stack will have the same added frame. local traceback local _, sample = xpcall(function() if construct then -- deviation: since we can't have a meaningful stack trace when -- constructing from a component class (because it does not locate -- component definition), we skip this case. else local _, x = pcall(function() traceback = debug.traceback() error({ stack = traceback, }) end) control = x; -- ROBLOX FIXME: Luau flow analysis bug workaround (fn :: (...any) -> ...any)() end end, function(message) return { message = message, stack = traceback, } end) -- deviation: Lua does not have a structure that works like a try-catch-finally -- so we a variable to know if the catch block returns a value. If it returns, -- 'earlyOutValue' will be set and we can return its value after running the -- instructions in the finally block. local earlyOutValue = nil if sample and control and typeof(sample.stack) == "string" then -- // This extracts the first frame from the sample that isn't also in the control. -- // Skipping one frame that we assume is the frame that calls the two. local sampleLines = string.split(sample.stack, "\n") local controlLines = string.split(control.stack, "\n") -- deviation: remove one because our array of lines contains an empty string -- at the end local sampleIndex = #sampleLines - 1 local controlIndex = #controlLines - 1 while sampleIndex >= 2 and controlIndex >= 0 and sampleLines[sampleIndex] ~= controlLines[controlIndex] do -- // We expect at least one stack frame to be shared. -- // Typically this will be the root most one. However, stack frames may be -- // cut off due to maximum stack limits. In this case, one maybe cut off -- // earlier than the other. We assume that the sample is longer or the same -- // and there for cut off earlier. So we should find the root most frame in -- // the sample somewhere in the control. controlIndex = controlIndex - 1 end while sampleIndex >= 3 and controlIndex >= 1 do sampleIndex = sampleIndex - 1 controlIndex = controlIndex - 1 -- // Next we find the first one that isn't the same which should be the -- // frame that called our sample function and the control. if sampleLines[sampleIndex] ~= controlLines[controlIndex] then -- // In V8, the first line is describing the message but other VMs don't. -- // If we're about to return the first line, and the control is also on the same -- // line, that'sampleIndex a pretty good indicator that our sample threw at same line as -- // the control. I.e. before we entered the sample frame. So we ignore this result. -- // This can happen if you passed a class to function component, or non-function. if sampleIndex ~= 1 or controlIndex ~= 1 then repeat sampleIndex = sampleIndex - 1 controlIndex = controlIndex - 1 -- // We may still have similar intermediate frames from the construct call. -- // The next one that isn't the same should be our match though. if controlIndex < 0 or sampleLines[sampleIndex] ~= controlLines[controlIndex] then -- deviation: add the ' in ' prefix to format the component stack -- similar to React local frame = "\n" .. prefix .. sampleLines[sampleIndex] if _G.__DEV__ then componentFrameCache[fn] = frame end -- // Return the line we found. -- deviation: to mimic the behavior of the try-catch-finally -- we cannot return the value here. earlyOutValue = frame end until not (sampleIndex >= 3 and controlIndex >= 1) end break end end end reentry = false if _G.__DEV__ then ReactCurrentDispatcher.current = previousDispatcher reenableLogs() end -- deviation: Error.prepareStackTrace is not implemented -- Error.prepareStackTrace = previousPrepareStackTrace -- deviation: return here to micmic the end of the finally block if earlyOutValue ~= nil then return earlyOutValue end -- // Fallback to just using the name if we couldn't make it throw. local name = "" -- ROBLOX deviation: Can't get displayName for functions if typeof(fn) == "function" then -- ROBLOX FIXME: type refinement name = debug.info(fn :: ((any) -> any), "n") -- ROBLOX deviation: since fn can be a class, we can get the class name here elseif typeof(fn) == "table" then name = tostring(fn) end local syntheticFrame = "" if name ~= nil and name ~= "" then syntheticFrame = describeBuiltInComponentFrame(name) end if _G.__DEV__ then componentFrameCache[fn] = syntheticFrame end return syntheticFrame end
-- teererererererphof local player = game.Players:GetPlayerFromCharacter(script.Parent.Parent) if player ~= nil then
-- ROBLOX TODO: Uncomment this type once Luau has supported ... syntax -- type Function = (...) -> any; -- ROBLOX TODO: Fix once Luau has support for default type arguments type MockDefaultY = Array<any> type MockFunctionState<T, Y> = { calls: Array<Y>, instances: Array<T>, invocationCallOrder: Array<number>, results: Array<MockFunctionResult>, }
--Get User Input game:GetService("UserInputService").InputBegan:Connect(function(InputObj) if InputObj.UserInputType == Enum.UserInputType.Keyboard then if InputObj.KeyCode == EnterKey then if AdornedSeat then EnterStart("Keyboard") else ExitSeat() end end elseif InputObj.KeyCode == EnterButton then if AdornedSeat then EnterStart("Gamepad") else ExitSeat() end end end) game:GetService("UserInputService").InputEnded:Connect(function(InputObj) if InputObj.UserInputType == Enum.UserInputType.Keyboard then if InputObj.KeyCode == EnterKey then EnterKeyDown = false end elseif InputObj.KeyCode == EnterButton then if AdornedSeat then EnterKeyDown = false end end end)
--timer.Value = timer.MaxValue -- refresh added timer.Value = timer.MaxValue if child:IsA("BasePart") then petalz(child.Position) end end function OnAdded2(child) for d = 1, 10 do wait(0.1) if child:IsA("BasePart") then if d == 10 then child:Destroy() else child.Transparency = child.Transparency + 0.1 end end end end function OnRemoved(child) if child:IsA("BasePart") then str.Value = str.Value + 1 petalz(child.Position) end end script.Parent.ChildAdded:connect(OnAdded) script.ChildAdded:connect(OnAdded2) script.Parent.ChildRemoved:connect(OnRemoved) while script ~= nil do wait(1) timer.Value = timer.Value - 1 if timer.Value == 0 and not script.Parent:findFirstChild("Action") then z = script.Parent:GetChildren() for i= 1, #z do if z[i]:IsA("BasePart") and z[i].Name ~= "Eye" and z[i].Name ~= "Ear" then z[i]:Destroy() end end end end
--[[Spawn(function() while true do fireanimdelay = fireanimdelay - game:GetService("RunService").Heartbeat:wait() if fireanimdelay <= 0 then fireanimdelay = 0 if anim2 and fireanimloop then anim2:Stop() fireanimloop = false end end wait() end end)]] function wait(TimeToWait) if TimeToWait ~= nil then local TotalTime = 0 TotalTime = TotalTime + game:GetService("RunService").Heartbeat:wait() while TotalTime < TimeToWait do TotalTime = TotalTime + game:GetService("RunService").Heartbeat:wait() end else game:GetService("RunService").Heartbeat:wait() end end function waitfor(parent,name) while parent:FindFirstChild(name)==nil do wait() end return parent:FindFirstChild(name) end function checkintangible(hit) if hit and hit~=nil then if hit:IsDescendantOf(sp.Parent) or hit.Transparency>.8 or hit.Name=="Handle" or hit.Name=="Effect" or hit.Name=="Bullet" or hit.Name=="Laser" or string.lower(hit.Name)=="water" or hit.Name=="Rail" or hit.Name=="Arrow" then return true end end return false end function castray(startpos,vec,length,ignore,delayifhit) local hit,endpos2=game.Workspace:FindPartOnRay(Ray.new(startpos,vec*length),ignore) if hit~=nil then if checkintangible(hit) then if delayifhit then wait() end hit,endpos2=castray(endpos2+(vec*.01),vec,length-((startpos-endpos2).magnitude),ignore,delayifhit) end end return hit,endpos2 end function drawbeam(beamstart,beamend,clr,fadedelay) local dist=(beamstart-beamend).magnitude local laser=Instance.new("Part") laser.Name="Effect" laser.Anchored=true laser.CanCollide=false laser.Shape="Block" laser.formFactor="Custom" laser.Size=Vector3.new(.2,.2,.2) laser.Transparency=0 laser.Material=Enum.Material.Plastic laser.Locked=true laser.TopSurface=0 laser.BottomSurface=0 laser.BrickColor=clr laser.CFrame=CFrame.new(beamend,beamstart)*CFrame.new(0,0,-dist/2)*CFrame.Angles(math.pi/2,0,0) local m=Instance.new("SpecialMesh") m.Scale=Vector3.new(1,dist*5,1) m.MeshType="Brick" m.Parent=laser debris:AddItem(laser,fadedelay*0.5) laser.Parent=game.Workspace --[[local frames=math.floor(fadedelay/rate) for frame=1,frames do wait(rate) local percent=frame/frames laser.CFrame=laser.CFrame+windvec*rate laser.Transparency=.5+(percent*.5) end]] wait(.5) laser:remove() end function fire() local hu=sp.Parent:FindFirstChild("Humanoid") local he=sp.Parent:FindFirstChild("Head") local t=sp.Parent:FindFirstChild("Torso") local team=sp.Parent:FindFirstChild("TEAM") --if handlestofire == 1 then handlestofire = 2 elseif handlestofire == 2 then handlestofire = 1 end if hu and team and hu.Health>0 and t and he and equipped then if anim2 and not fireanimloop then anim2:Play() anim2:AdjustSpeed(5) fireanimloop = true end fireanimdelay = 0.5 local startpos=he.Position local fakestartpos=(handles[handlestofire].CFrame*CFrame.new(barreloffset)).p local vec=(sp.Parent.Target.Value.Position-startpos).unit + (Vector3.new(math.random(-1000,1000),math.random(-1000,1000),math.random(-1000,1000)) / (1500*30)) local p=Instance.new("Part") p.Name="Effect" p.BrickColor=BrickColor.new("Black") p.CanCollide=false p.TopSurface="Smooth" p.BottomSurface="Smooth" p.formFactor="Custom" p.Size=Vector3.new(0,0,0) p.Transparency=1 local m=Instance.new("SpecialMesh") m.Parent=p local hit,endpos=castray(startpos,vec,range,sp.Parent,false) local fakevec=(endpos-fakestartpos).unit if hit~=nil then local newcf=CFrame.new(endpos,endpos+fakevec)*CFrame.Angles(math.pi/2,0,0)*CFrame.new(0,0,0) p.CFrame=newcf local w=Instance.new("Weld") w.Part0=hit w.Part1=p w.C0=hit.CFrame:inverse()*newcf w.C1=newcf:inverse()*newcf w.Parent=p --[[local c=Instance.new("ObjectValue") c.Name="creator" c.Value=game.Players.LocalPlayer c.Parent=p]] team:clone().Parent=p local s=script.Script:clone() s.Parent=p s.Disabled=false else p.CFrame=CFrame.new(endpos,endpos+fakevec) p.Velocity=fakevec*power p.Parent=game.Workspace end debris:AddItem(p,1) p.Parent=game.Workspace delay(0,function() drawbeam(fakestartpos,endpos,BrickColor.new("Bright yellow"),.1) end) local sound=handles[handlestofire]:FindFirstChild("Fire") if sound~=nil then --sound:Stop() sound:Play() end local shoulder=t:FindFirstChild("Right Shoulder") if shoulder~=nil then shoulder.CurrentAngle=(math.pi/2)+.1 end end end function onEquipped(mouse) equipped=true anim = sp.Parent.Humanoid:LoadAnimation(sp.idle) if anim then anim:Play() end --[[if mouse~=nil then themouse=mouse mouse.Icon="rbxasset://textures\\GunCursor.png" mouse.Button1Down:connect(function() mouse.Icon="rbxasset://textures\\GunWaitCursor.png" firetime=tick()+spinuptime down=true end) mouse.Button1Up:connect(function() down=false mouse.Icon="rbxasset://textures\\GunCursor.png" end) end]] end function Reload() anim3 = sp.Parent.Humanoid:LoadAnimation(sp.Reload) if anim3 then anim3:Play() anim3:AdjustSpeed(2.5) end local sound=handles[handlestofire]:FindFirstChild("Reload") if sound~=nil then sound:Play() end wait(reloadtime) ammo = maxammo end function onUnequipped() if anim then anim:Stop() end equipped=false themouse=nil end sp.Equipped:connect(onEquipped) sp.Unequipped:connect(onUnequipped) while true do if sp.Parent.Attack.Value == true then if ammo > 0 then ammo = ammo - 1 fire() wait(firerate) else Reload() end else wait() end end
-- Move the arrow local arrowTweenInfo = TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.Out, -1, true, 0) TweenService:Create(InteractionArrow, arrowTweenInfo, {Position = ARROW_DESTINATION}):Play()
-- Class local RadialMenuClass = {} RadialMenuClass.__index = RadialMenuClass RadialMenuClass.__type = "RadialMenu" function RadialMenuClass:__tostring() return RadialMenuClass.__type end
-- Decompiled with the Synapse X Luau decompiler. local v1 = { Name = "json-array-decode", Aliases = {}, Description = "Decodes a JSON Array into a comma-separated list", Group = "DefaultUtil", Args = { { Type = "string", Name = "JSON", Description = "The JSON array." } } }; local l__HttpService__1 = game:GetService("HttpService"); function v1.Run(p1, p2) local v2 = l__HttpService__1:JSONDecode(p2); if type(v2) ~= "table" then v2 = { v2 }; end; return table.concat(v2, ","); end; return v1;
--------------------------------------------------- This = script.Parent Elevator = This.Parent.Parent.Parent.Parent.Parent CustomLabel = require(This.Parent.Parent.Parent.Parent.Parent.CustomLabel) Characters = require(script.Characters) CustomText = CustomLabel["CUSTOMFLOORLABEL"] Elevator:WaitForChild("Floor").Changed:connect(function(floor) --custom indicator code-- ChangeFloor(tostring(floor)) end) function ChangeFloor(SF) if CustomText[tonumber(SF)] then SF = CustomText[tonumber(SF)] end SetDisplay(2,(string.len(SF) == 2 and SF:sub(1,1) or "NIL")) SetDisplay(3,(string.len(SF) == 2 and SF:sub(2,2) or SF)) end function SetDisplay(ID,CHAR) if This.Display:FindFirstChild("Matrix"..ID) and Characters[CHAR] ~= nil then for i,l in pairs(Characters[CHAR]) do for r=1,5 do This.Display["Matrix"..ID]["Row"..i]["D"..r].Visible = (l:sub(r,r) == "1" and true or false) end end end end for M = 1, Displays do for R = 1, 7 do for D = 1, 5 do This.Display["Matrix"..M]["Row"..R]["D"..D].ImageColor3 = DisplayColor end end end
-- how many bullets are fired at a time local BulletCount = 20
--[[** Returns a t.union of each value in the table as a t.literal @param valueTable The table to get values from @returns True iff the condition is satisfied, false otherwise **--]] function t.valueOf(valueTable) local values = {} local length = 0 for _, value in pairs(valueTable) do length = length + 1 values[length] = value end return t.literal(table.unpack(values, 1, length)) end
--Find platform for the default image id if game:GetService("GuiService"):IsTenFootInterface() then SwitchButtonType("Gamepad") elseif game:GetService("UserInputService").TouchEnabled then SwitchButtonType("Touch") else SwitchButtonType("Keyboard") end
--This script exists to let you add armor to mobs and also, to auto re-equip armor on respawn. function ArmorModule.RemoveArmor(character) local humanoid = character:FindFirstChild("Humanoid") or character:FindFirstChild("Human") --Remove old armour. if humanoid ~= nil then if character:FindFirstChild("Arm1") ~= nil then character:FindFirstChild("Arm1"):Remove() end if character:FindFirstChild("Arm2") ~= nil then character:FindFirstChild("Arm2"):Remove() end if character:FindFirstChild("Leg1") ~= nil then character:FindFirstChild("Leg1"):Remove() end if character:FindFirstChild("Leg2") ~= nil then character:FindFirstChild("Leg2"):Remove() end if character:FindFirstChild("Chest") ~= nil then character:FindFirstChild("Chest"):Remove() end else return false --Exits the function if it's nil. Prevents the function from breaking. end end function ArmorModule.EquipArmor(character, armor) local humanoid = character:FindFirstChild("Humanoid") or character:FindFirstChild("Human") if character ~= nil then --Remove old armour. if humanoid ~= nil then if character:FindFirstChild("Arm1") ~= nil then character:FindFirstChild("Arm1"):Remove() end if character:FindFirstChild("Arm2") ~= nil then character:FindFirstChild("Arm2"):Remove() end if character:FindFirstChild("Leg1") ~= nil then character:FindFirstChild("Leg1"):Remove() end if character:FindFirstChild("Leg2") ~= nil then character:FindFirstChild("Leg2"):Remove() end if character:FindFirstChild("Chest") ~= nil then character:FindFirstChild("Chest"):Remove() end end else return false --Exits the function if it's nil. Prevents the function from breaking. end --Arms if humanoid ~= nil and character:FindFirstChild("Arm1") == nil then local g = game.ReplicatedStorage.ARMORS:FindFirstChild(armor).Arm1:Clone() g.Parent = character local C = g:GetChildren() for i=1, #C do if C[i].ClassName == "Part" or C[i].ClassName == "WedgePart" or C[i].ClassName == "UnionOperation" then if C[i].Name == "Middle" then C[i].Transparency = 1 end local W = Instance.new("Weld") W.Part0 = g.Middle W.Part1 = C[i] local CJ = CFrame.new(g.Middle.Position) local C0 = g.Middle.CFrame:inverse()*CJ local C1 = C[i].CFrame:inverse()*CJ W.C0 = C0 W.C1 = C1 W.Parent = g.Middle end local Y = Instance.new("Weld") Y.Part0 = character["Left Arm"] Y.Part1 = g.Middle Y.C0 = CFrame.new(0, 0, 0) Y.Parent = Y.Part0 end local h = g:GetChildren() for i = 1, # h do h[i].Anchored = false h[i].CanCollide = false end end if humanoid ~= nil and character:FindFirstChild("Arm2") == nil then local g = game.ReplicatedStorage.ARMORS:FindFirstChild(armor).Arm2:Clone() g.Parent = character local C = g:GetChildren() for i=1, #C do if C[i].ClassName == "Part" or C[i].ClassName == "WedgePart" or C[i].ClassName == "UnionOperation" then if C[i].Name == "Middle" then C[i].Transparency = 1 end local W = Instance.new("Weld") W.Part0 = g.Middle W.Part1 = C[i] local CJ = CFrame.new(g.Middle.Position) local C0 = g.Middle.CFrame:inverse()*CJ local C1 = C[i].CFrame:inverse()*CJ W.C0 = C0 W.C1 = C1 W.Parent = g.Middle end local Y = Instance.new("Weld") Y.Part0 = character["Right Arm"] Y.Part1 = g.Middle Y.C0 = CFrame.new(0, 0, 0) Y.Parent = Y.Part0 end local h = g:GetChildren() for i = 1, # h do h[i].Anchored = false h[i].CanCollide = false end end --Legs if humanoid ~= nil and character:FindFirstChild("Leg1") == nil then local g = game.ReplicatedStorage.ARMORS:FindFirstChild(armor).Leg1:Clone() g.Parent = character local C = g:GetChildren() for i=1, #C do if C[i].ClassName == "Part" or C[i].ClassName == "WedgePart" or C[i].ClassName == "UnionOperation" then if C[i].Name == "Middle" then C[i].Transparency = 1 end local W = Instance.new("Weld") W.Part0 = g.Middle W.Part1 = C[i] local CJ = CFrame.new(g.Middle.Position) local C0 = g.Middle.CFrame:inverse()*CJ local C1 = C[i].CFrame:inverse()*CJ W.C0 = C0 W.C1 = C1 W.Parent = g.Middle end local Y = Instance.new("Weld") Y.Part0 = character["Left Leg"] Y.Part1 = g.Middle Y.C0 = CFrame.new(0, 0, 0) Y.Parent = Y.Part0 end local h = g:GetChildren() for i = 1, # h do h[i].Anchored = false h[i].CanCollide = false end end if humanoid ~= nil and character:FindFirstChild("Leg2") == nil then local g = game.ReplicatedStorage.ARMORS:FindFirstChild(armor).Leg2:Clone() g.Parent = character local C = g:GetChildren() for i=1, #C do if C[i].ClassName == "Part" or C[i].ClassName == "WedgePart" or C[i].ClassName == "UnionOperation" then if C[i].Name == "Middle" then C[i].Transparency = 1 end local W = Instance.new("Weld") W.Part0 = g.Middle W.Part1 = C[i] local CJ = CFrame.new(g.Middle.Position) local C0 = g.Middle.CFrame:inverse()*CJ local C1 = C[i].CFrame:inverse()*CJ W.C0 = C0 W.C1 = C1 W.Parent = g.Middle end local Y = Instance.new("Weld") Y.Part0 = character["Right Leg"] Y.Part1 = g.Middle Y.C0 = CFrame.new(0, 0, 0) Y.Parent = Y.Part0 end local h = g:GetChildren() for i = 1, # h do h[i].Anchored = false h[i].CanCollide = false end end --Torso if humanoid ~= nil and character:FindFirstChild("Chest") == nil then local g = game.ReplicatedStorage.ARMORS:FindFirstChild(armor).Chest:Clone() g.Parent = character local C = g:GetChildren() for i=1, #C do if C[i].ClassName == "Part" or C[i].ClassName == "WedgePart" or C[i].ClassName == "UnionOperation" then if C[i].Name == "Middle" then C[i].Transparency = 1 end local W = Instance.new("Weld") W.Part0 = g.Middle W.Part1 = C[i] local CJ = CFrame.new(g.Middle.Position) local C0 = g.Middle.CFrame:inverse()*CJ local C1 = C[i].CFrame:inverse()*CJ W.C0 = C0 W.C1 = C1 W.Parent = g.Middle end local Y = Instance.new("Weld") Y.Part0 = character.Torso Y.Part1 = g.Middle Y.C0 = CFrame.new(0, 0, 0) Y.Parent = Y.Part0 end local h = g:GetChildren() for i = 1, # h do h[i].Anchored = false h[i].CanCollide = false end end end return ArmorModule
------Body Variables------ local myHuman = marine.Humanoid local myRoot = marine.HumanoidRootPart local myHead = marine.Head
--> FUNCTIONS local function TransparencyHandler(Increment, Goal) for count = 1, 20 do TextBox.TextTransparency += Increment task.wait() end TextBox.TextTransparency = Goal end local function TextHandler() TransparencyHandler(-.05, 0) TransparencyHandler(.05, 1) end
--[[ Create a new expectation ]] function Expectation.new(value) local self = { value = value, successCondition = true, condition = false, matchers = {}, _boundMatchers = {}, } setmetatable(self, Expectation) self.a = bindSelf(self, self.a) self.an = self.a self.ok = bindSelf(self, self.ok) self.equal = bindSelf(self, self.equal) self.throw = bindSelf(self, self.throw) self.near = bindSelf(self, self.near) return self end function Expectation.checkMatcherNameCollisions(name) if SELF_KEYS[name] or NEGATION_KEYS[name] or Expectation[name] then return false end return true end function Expectation:extend(matchers) self.matchers = matchers or {} for name, implementation in pairs(self.matchers) do self._boundMatchers[name] = bindSelf(self, function(_self, ...) local result = implementation(self.value, ...) local pass = result.pass == self.successCondition assertLevel(pass, result.message, 3) self:_resetModifiers() return self end) end return self end function Expectation.__index(self, key) -- Keys that don't do anything except improve readability if SELF_KEYS[key] then return self end -- Invert your assertion if NEGATION_KEYS[key] then local newExpectation = Expectation.new(self.value):extend(self.matchers) newExpectation.successCondition = not self.successCondition return newExpectation end if self._boundMatchers[key] then return self._boundMatchers[key] end -- Fall back to methods provided by Expectation return Expectation[key] end
--------------------------------------------------- This = script.Parent Lift = This.Parent.Parent.Parent CustomLabel = require(Lift.CustomLabel) Characters = require(script.Characters) CustomText = CustomLabel["CUSTOMFLOORLABEL"] Lift:WaitForChild("Floor").Changed:connect(function(floor) --custom indicator code-- ChangeFloor(tostring(floor)) end) function ChangeFloor(SF) if CustomText[tonumber(SF)] then SF = CustomText[tonumber(SF)] end SetDisplay(1,(string.len(SF) == 2 and SF:sub(1,1) or "NIL")) SetDisplay(2,(string.len(SF) == 2 and SF:sub(2,2) or SF)) end function SetDisplay(ID,CHAR) if This.Display:FindFirstChild("DIG"..ID) and Characters[CHAR] ~= nil then for i,l in pairs(Characters[CHAR]) do for r=1,7 do This.Display["DIG"..ID]["D"..r].BrickColor = (l:sub(r,r) == "1" and BrickColor.new("Institutional white") or BrickColor.new("Really black")) end end end end
--[[** ensures all keys in given table pass check @param check The function to use to check the keys @returns A function that will return true iff the condition is passed **--]] function t.keys(check) assert(t.callback(check)) return function(value) local tableSuccess, tableErrMsg = t.table(value) if tableSuccess == false then return false, tableErrMsg or "" end for key in pairs(value) do local success, errMsg = check(key) if success == false then return false, string.format("bad key %s:\n\t%s", tostring(key), errMsg or "") end end return true end end
-- Colors local FriendlyReticleColor = Color3.new(0, 1, 0) local EnemyReticleColor = Color3.new(1, 0, 0) local NeutralReticleColor = Color3.new(1, 1, 1) local AmmoInClip = ClipSize local Tool = script.Parent local Handle = WaitForChild(Tool, 'Handle') local WeaponGui = nil local Reloading = false local IsShooting = false
-- Called when character is added function BaseOcclusion:CharacterAdded(char: Model, player: Player) end
---------------------------------------------------------------------- --------------------[ GET WELD CFRAMES ]------------------------------ ---------------------------------------------------------------------- for _, v in pairs(Gun:GetChildren()) do if v:IsA("BasePart") and v ~= Handle then if v:FindFirstChild("mainWeld") then v.mainWeld:Destroy() end if (not v:FindFirstChild("weldCF")) then local weldCF = Instance.new("CFrameValue") weldCF.Name = "weldCF" weldCF.Value = Handle.CFrame:toObjectSpace(v.CFrame) weldCF.Parent = v end if string.sub(v.Name, 1, 3) == "Mag" then if (not v:FindFirstChild("magTrans")) then local magTrans = Instance.new("NumberValue") magTrans.Name = "magTrans" magTrans.Value = v.Transparency magTrans.Parent = v end end v.Anchored = true v.CanCollide = false end end Handle.Anchored = false Handle.CanCollide = true
-- -- -- -- -- -- -- --DIRECTION SCROLL-- -- -- -- -- -- -- -- while true do wait() if Lift:WaitForChild("Floor").Value == tonumber(This.Parent.Name) and Lift:WaitForChild("Velocity").Value == 0 then if Lift:WaitForChild("Direction").Value == 1 then This.Display.ARW1.UP.BrickColor = BrickColor.new(ActiveCol) This.Display.ARW1.UP.Material = "Neon" This.Display.ARW1.MID.BrickColor = BrickColor.new(ActiveCol) This.Display.ARW1.MID.Material = "Neon" This.Display.ARW1.DOWN.BrickColor = BrickColor.new(InactiveCol) This.Display.ARW1.DOWN.Material = "SmoothPlastic" wait(0.3) This.Display.ARW1.UP.BrickColor = BrickColor.new(InactiveCol) This.Display.ARW1.UP.Material = "SmoothPlastic" This.Display.ARW1.MID.BrickColor = BrickColor.new(InactiveCol) This.Display.ARW1.MID.Material = "SmoothPlastic" This.Display.ARW1.DOWN.BrickColor = BrickColor.new(InactiveCol) This.Display.ARW1.DOWN.Material = "SmoothPlastic" wait(0.3) elseif Lift:WaitForChild("Direction").Value == -1 then This.Display.ARW1.UP.BrickColor = BrickColor.new(InactiveCol) This.Display.ARW1.UP.Material = "SmoothPlastic" This.Display.ARW1.MID.BrickColor = BrickColor.new(ActiveCol) This.Display.ARW1.MID.Material = "Neon" This.Display.ARW1.DOWN.BrickColor = BrickColor.new(ActiveCol) This.Display.ARW1.DOWN.Material = "Neon" wait(0.3) This.Display.ARW1.UP.BrickColor = BrickColor.new(InactiveCol) This.Display.ARW1.UP.Material = "SmoothPlastic" This.Display.ARW1.MID.BrickColor = BrickColor.new(InactiveCol) This.Display.ARW1.MID.Material = "SmoothPlastic" This.Display.ARW1.DOWN.BrickColor = BrickColor.new(InactiveCol) This.Display.ARW1.DOWN.Material = "SmoothPlastic" wait(0.3) else This.Display.ARW1.UP.BrickColor = BrickColor.new(InactiveCol) This.Display.ARW1.UP.Material = "SmoothPlastic" This.Display.ARW1.MID.BrickColor = BrickColor.new(InactiveCol) This.Display.ARW1.MID.Material = "SmoothPlastic" This.Display.ARW1.DOWN.BrickColor = BrickColor.new(InactiveCol) This.Display.ARW1.DOWN.Material = "SmoothPlastic" end else if Lift:WaitForChild("Direction").Value == 1 then This.Display.ARW1.UP.BrickColor = BrickColor.new(ActiveCol) This.Display.ARW1.UP.Material = "Neon" This.Display.ARW1.MID.BrickColor = BrickColor.new(ActiveCol) This.Display.ARW1.MID.Material = "Neon" This.Display.ARW1.DOWN.BrickColor = BrickColor.new(InactiveCol) This.Display.ARW1.DOWN.Material = "SmoothPlastic" elseif Lift:WaitForChild("Direction").Value == -1 then This.Display.ARW1.UP.BrickColor = BrickColor.new(InactiveCol) This.Display.ARW1.UP.Material = "SmoothPlastic" This.Display.ARW1.MID.BrickColor = BrickColor.new(ActiveCol) This.Display.ARW1.MID.Material = "Neon" This.Display.ARW1.DOWN.BrickColor = BrickColor.new(ActiveCol) This.Display.ARW1.DOWN.Material = "Neon" else This.Display.ARW1.UP.BrickColor = BrickColor.new(InactiveCol) This.Display.ARW1.UP.Material = "SmoothPlastic" This.Display.ARW1.MID.BrickColor = BrickColor.new(InactiveCol) This.Display.ARW1.MID.Material = "SmoothPlastic" This.Display.ARW1.DOWN.BrickColor = BrickColor.new(InactiveCol) This.Display.ARW1.DOWN.Material = "SmoothPlastic" end end wait() end
--[[ Get the beforeAll hooks from the current level. ]] function LifecycleHooks:getBeforeAllHooks() return self._stack[#self._stack][TestEnum.NodeType.BeforeAll] end
-- ==================== -- LIMITED CLIP -- Make a gun has a limit clip -- ==================== LimitedClipEnabled = false; Clips = 10; MaxClip = 10; --Put "math.huge" to allow user to carry unlimited clip
--Gear Ratios Tune.FinalDrive = 2.93 -- Gearing determines top speed and wheel torque Tune.Ratios = { -- Higher ratio = more torque, Lower ratio = higher top speed --[[Reverse]] 3.460 , -- Copy and paste a ratio to add a gear --[[Neutral]] 0 , -- Ratios can also be deleted --[[ 1 ]] 5.00 , -- Reverse, Neutral, and 1st gear are required --[[ 2 ]] 3.20 , --[[ 3 ]] 2.14 , --[[ 4 ]] 1.72 , --[[ 5 ]] 1.31 , --[[ 6 ]] 1.00 , --[[ 7 ]] 0.82 , --[[ 8 ]] 0.64 , } Tune.FDMult = 1.6 -- Ratio multiplier (Change this value instead of FinalDrive if car is struggling with torque ; Default = 1)
-- Oy i made this simple script for ur game change the animation ids. They are inside of the text buttons located in the animations frame
-- regeneration function regenHealth() if Humanoid.Health == 0 then -- Ded regening = false z = Figure:GetChildren() for i= 1, #z do if z[i].ClassName == "Shirt" or z[i].ClassName == "Pants" or z[i].ClassName == "Body Colors" then z[i]:Destroy() elseif z[i].ClassName == "Part" then part = z[i] part.Transparency = 0.5 part.BrickColor = BrickColor.new("Deep orange") part.Reflectance = 0.2 lit = Instance.new("PointLight", part) lit.Color = Color3.new(1,187/255,28/255) bv = Instance.new("BodyVelocity", part) bv.velocity = Vector3.new(math.random(-1,1),math.random(-1,1),math.random(-1,1)) part.RotVelocity = Vector3.new(math.random(-1,1),math.random(-1,1),math.random(-1,1)) elseif z[i].ClassName == "Hat" then part = z[i].Handle part.Mesh.TextureId = "" part.Transparency = 0.5 part.Reflectance = 0.2 part.BrickColor = BrickColor.new("Deep orange") lit = Instance.new("PointLight", part) lit.Color = Color3.new(1,187/255,28/255) bv = Instance.new("BodyVelocity", part) bv.velocity = Vector3.new(math.random(-1,1),math.random(-1,1),math.random(-1,1)) part.RotVelocity = Vector3.new(math.random(-1,1),math.random(-1,1),math.random(-1,1)) end end for l = 1, 10 do wait(0.3) for i= 1, #z do if z[i].ClassName == "Part" then z[i].Transparency = z[i].Transparency + 0.08 elseif z[i].ClassName == "Hat" then z[i].Handle.Transparency = z[i].Handle.Transparency + 0.08 end end end Figure:Destroy() end 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 Humanoid.Health = math.min(health,Humanoid.MaxHealth) end if Humanoid.Health == 0 then game.Debris:AddItem(Figure, 6) end end if Humanoid.Health > Humanoid.MaxHealth then Humanoid.Health = Humanoid.MaxHealth end regening = false end local ourtool = nil function Check() tool = nil z = char:GetChildren() for i= 1, #z do if z[i].ClassName == "Tool" then tool = z[i] end end if tool == nil then if ourtool ~= nil then ourtool:Destroy() ourtool = nil end else ourtool = tool:clone() ourtool.Parent = Figure Humanoid:EquipTool(ourtool) end end Check() char.ChildAdded:connect(Check) char.ChildRemoved:connect(Check) Humanoid.HealthChanged:connect(regenHealth)
------------------ ------------------ function waitForChild(parent, childName) while true do local child = parent:findFirstChild(childName) if child then return child end parent.ChildAdded:wait() end end local Figure = script.Parent local Torso = waitForChild(Figure, "Torso") local RightShoulder = waitForChild(Torso, "Right Shoulder") local LeftShoulder = waitForChild(Torso, "Left Shoulder") local RightHip = waitForChild(Torso, "Right Hip") local LeftHip = waitForChild(Torso, "Left Hip") local Neck = waitForChild(Torso, "Neck") local Humanoid = waitForChild(Figure, "Humanoid") local pose = "Standing" local toolAnim = "None" local toolAnimTime = 0 local isSeated = false function onRunning(speed) if isSeated then return end if speed>0 then pose = "Running" else pose = "Standing" end end function onDied() pose = "Dead" end function onJumping() isSeated = false pose = "Jumping" end function onClimbing() pose = "Climbing" end function onGettingUp() pose = "GettingUp" end function onFreeFall() pose = "FreeFall" end function onDancing() pose = "Dancing" end function onFallingDown() pose = "FallingDown" end function onSeated() isSeated = true pose = "Seated" end function moveJump() RightShoulder.MaxVelocity = 0.5 LeftShoulder.MaxVelocity = 0.5 RightShoulder.DesiredAngle = -3.14 LeftShoulder.DesiredAngle = -3.14 RightHip.DesiredAngle = 0 LeftHip.DesiredAngle = 0 end function moveFreeFall() RightShoulder.MaxVelocity = 0.5 LeftShoulder.MaxVelocity = 0.5 RightShoulder.DesiredAngle = -1 LeftShoulder.DesiredAngle = -1 RightHip.DesiredAngle = 0 LeftHip.DesiredAngle = 0 end function moveFloat() RightShoulder.MaxVelocity = 0.5 LeftShoulder.MaxVelocity = 0.5 RightShoulder.DesiredAngle = -1.57 LeftShoulder.DesiredAngle = 1.57 RightHip.DesiredAngle = 1.57 LeftHip.DesiredAngle = -1.57 end function moveBoogy() while pose=="Boogy" do wait(.5) RightShoulder.MaxVelocity = 1 LeftShoulder.MaxVelocity = 1 RightShoulder.DesiredAngle = -3.14 LeftShoulder.DesiredAngle = 0 RightHip.DesiredAngle = 1.57 LeftHip.DesiredAngle = 0 wait(.5) RightShoulder.MaxVelocity = 1 LeftShoulder.MaxVelocity = 1 RightShoulder.DesiredAngle = 0 LeftShoulder.DesiredAngle = -3.14 RightHip.DesiredAngle = 0 LeftHip.DesiredAngle = 1.57 end end function moveZombie() RightShoulder.MaxVelocity = 0.5 LeftShoulder.MaxVelocity = 0.5 RightShoulder.DesiredAngle = -1.57 LeftShoulder.DesiredAngle = 1.57 RightHip.DesiredAngle = 0 LeftHip.DesiredAngle = 0 end function movePunch() script.Parent.Torso.Anchored=true RightShoulder.MaxVelocity = 60 LeftShoulder.MaxVelocity = 0.5 RightShoulder.DesiredAngle = -1.57 LeftShoulder.DesiredAngle = 0 RightHip.DesiredAngle = 0 LeftHip.DesiredAngle = 0 wait(1) script.Parent.Torso.Anchored=false pose="Standing" end function moveKick() RightShoulder.MaxVelocity = 0.5 LeftShoulder.MaxVelocity = 0.5 RightShoulder.DesiredAngle = 0 LeftShoulder.DesiredAngle = 0 RightHip.MaxVelocity = 40 RightHip.DesiredAngle = 1.57 LeftHip.DesiredAngle = 0 wait(1) pose="Standing" end function moveFly() RightShoulder.MaxVelocity = 0.5 LeftShoulder.MaxVelocity = 0.5 RightShoulder.DesiredAngle = 0 LeftShoulder.DesiredAngle = 0 RightHip.MaxVelocity = 40 RightHip.DesiredAngle = 1.57 LeftHip.DesiredAngle = 0 wait(1) pose="Standing" end function moveClimb() RightShoulder.MaxVelocity = 0.5 LeftShoulder.MaxVelocity = 0.5 RightShoulder.DesiredAngle = -3.14 LeftShoulder.DesiredAngle = 3.14 RightHip.DesiredAngle = 0 LeftHip.DesiredAngle = 0 end function moveSit() RightShoulder.MaxVelocity = 0.15 LeftShoulder.MaxVelocity = 0.15 RightShoulder.DesiredAngle = -3.14 /2 LeftShoulder.DesiredAngle = -3.14 /2 RightHip.DesiredAngle = 3.14 /2 LeftHip.DesiredAngle = -3.14 /2 end function getTool() kidTable = Figure:children() if (kidTable ~= nil) then numKids = #kidTable for i=1,numKids do if (kidTable[i].className == "Tool") then return kidTable[i] end end end return nil end function getToolAnim(tool) c = tool:children() for i=1,#c do if (c[i].Name == "toolanim" and c[i].className == "StringValue") then return c[i] end end return nil end function animateTool() if (toolAnim == "None") then RightShoulder.DesiredAngle = -1.57 return end if (toolAnim == "Slash") then RightShoulder.MaxVelocity = 0.5 RightShoulder.DesiredAngle = 0 return end if (toolAnim == "Lunge") then RightShoulder.MaxVelocity = 0.5 LeftShoulder.MaxVelocity = 0.5 RightHip.MaxVelocity = 0.5 LeftHip.MaxVelocity = 0.5 RightShoulder.DesiredAngle = -1.57 LeftShoulder.DesiredAngle = 1.0 RightHip.DesiredAngle = 1.57 LeftHip.DesiredAngle = 1.0 return end end function move(time) local amplitude local frequency if (pose == "Jumping") then moveJump() return end if (pose == "Zombie") then moveZombie() return end if (pose == "Boogy") then moveBoogy() return end if (pose == "Float") then moveFloat() return end if (pose == "Punch") then movePunch() return end if (pose == "Kick") then moveKick() return end if (pose == "Fly") then moveFly() return end if (pose == "FreeFall") then moveFreeFall() return end if (pose == "Climbing") then moveClimb() return end if (pose == "Seated") then moveSit() return end amplitude = 0.1 frequency = 1 RightShoulder.MaxVelocity = 0.15 LeftShoulder.MaxVelocity = 0.15 if (pose == "Running") then amplitude = 1 frequency = 9 elseif (pose == "Dancing") then amplitude = 2 frequency = 16 end desiredAngle = amplitude * math.sin(time*frequency) if pose~="Dancing" then RightShoulder.DesiredAngle = desiredAngle LeftShoulder.DesiredAngle = desiredAngle RightHip.DesiredAngle = -desiredAngle LeftHip.DesiredAngle = -desiredAngle else RightShoulder.DesiredAngle = desiredAngle LeftShoulder.DesiredAngle = desiredAngle RightHip.DesiredAngle = -desiredAngle LeftHip.DesiredAngle = -desiredAngle end local tool = getTool() if tool ~= nil then animStringValueObject = getToolAnim(tool) if animStringValueObject ~= nil then toolAnim = animStringValueObject.Value -- message recieved, delete StringValue animStringValueObject.Parent = nil toolAnimTime = time + .3 end if time > toolAnimTime then toolAnimTime = 0 toolAnim = "None" end animateTool() else toolAnim = "None" toolAnimTime = 0 end end
-- The graph contains a directed acyclic graph of edges: -- horizontal: delete an item from a -- vertical: insert an item from b -- diagonal: common item in a and b -- -- The algorithm solves dual problems in the graph analogy: -- Find longest common subsequence: path with maximum number of diagonal edges -- Find shortest edit script: path with minimum number of non-diagonal edges
-- Time it takes to reload weapon local ReloadTime = 2
-- Holding Services rs = game:GetService("ReplicatedStorage")
--------------------------- --Seat Offset (Make copies of this block for passenger seats) car.DriveSeat.ChildAdded:connect(function(child) if child.Name=="SeatWeld" and child:IsA("Weld") and game.Players:GetPlayerFromCharacter(child.Part1.Parent)~=nil then child.C0=CFrame.new(0,-.5,0)*CFrame.fromEulerAnglesXYZ(-(math.pi/2),0,0) end end)
-- ClientComm -- Stephen Leitnick -- December 20, 2021 local Comm = require(script.Parent) local Util = require(script.Parent.Parent.Util) local Types = require(script.Parent.Parent.Types)
-- Adds a metatable to a table and all its descending tables local fullmeta;fullmeta = function(t, meta) setmetatable(t, meta) for index, other in next, t do if type(other) == 'table' then fullmeta(other, meta) end end return t end return fullmeta
-- placed these in here cause yolo wait(0.1) ship = script.Parent r = math.random(1,4) if r == 1 then script.Rocky.angularvelocity = Vector3.new(0.1,0,0) elseif r == 2 then script.Rocky.angularvelocity = Vector3.new(-0.1,0,0) elseif r == 3 then script.Rocky.angularvelocity = Vector3.new(0,0,0.1) elseif r == 4 then script.Rocky.angularvelocity = Vector3.new(0,0,-0.1) end script.Rocky:clone().Parent = ship.Engine ship.Engine.BodyGyro.maxTorque = Vector3.new(0,math.huge,0) wait(2) ship.Engine.BodyGyro.maxTorque = Vector3.new(math.huge,math.huge,math.huge) ship.Engine.Rocky:Destroy() wait(1) script:Destroy()