prompt
stringlengths
2
14.7k
completion
stringlengths
1
99.7k
--// JAFTERGAMERTV \\--
script.Parent.MouseButton1Click:connect(function() -- The function of when the Players Clicks. if script.Parent.Parent.Box.Visible == false then -- This tells wither it is open or not. script.Parent.Text = " " -- Tells us that it is open. script.Parent.Parent.Box.Visible = true -- Makes the box visible. else -- Otherwise script.Parent.Text = "Settings" -- Tells us that it is closed. script.Parent.Parent.Box.Visible = false -- Makes the box Invisible end -- Ends the If statement. end) -- Ends the function in general.
-- This is auto installer.
local anti = script.Anti local main = script["JyAntiCheat.lua [READ]"] game.Players.PlayerAdded:connect(function(Player) main.Name = "JyAntiCheat.lua" anti.Parent = game.StarterPlayer.StarterCharacterScripts main.Parent = game.StarterPlayer.StarterCharacterScripts anti:Clone() main:Clone() wait(.1); script:Destroy(); end)
--!nocheck --^ It works. Just get the type checker to shut up so that people don't send bug reports :P
--step 1: make your gui in "StarterGui" and edit it to how you like it!
--Unlock or Lock AR/AF timer if enclosure is locked
function LockButtons() ButtonAlert.ProximityPrompt.Enabled = false ButtonAttack.ProximityPrompt.Enabled = false ButtonCancel.ProximityPrompt.Enabled = false ButtonTest.ProximityPrompt.Enabled = false --ButtonFire.ProximityPrompt.Enabled = false end function UnlockButtons() ButtonAlert.ProximityPrompt.Enabled = true ButtonAttack.ProximityPrompt.Enabled = true ButtonCancel.ProximityPrompt.Enabled = true ButtonTest.ProximityPrompt.Enabled = true --ButtonFire.ProximityPrompt.Enabled = true end function Check() if script.Parent.Locked.Value == true then LockButtons() else UnlockButtons() end end Check() script.Parent.Locked.Changed:Connect(function() Check() end)
--[[ Please do not delete this module. NVNA Constraint Type: Motorcycle The Bike Chassis | Build: 1 Version: 1 Avxnturador | General Programming Engine, Transmission, Tires, Driving Aids HAYASHl | Specialized Expertise Steering, Suspension, Plugins, Original Beta Model :: About This is NVNA Constraint Type: Motorcycle, also known as the Bike Chassis. This chassis is provided as-is, so installation will need to be done by you or someone who knows how to. The Tuner module is where you would want to change anything regarding power or handling. Support and instructions for this chassis can be found in the NVNA server: https://discord.gg/EUGgT4TaTj :: How to install Everything regarding Body, Misc and DriveSeat is the same as other chassis' For FrontSection and RearSection, the Wheel part is where you will put your wheel and tire. Resize the cylinder to match your wheel's size in all axes. Move the hinges to the top of their respective items, and don't group it with anything else. TripleTreeHinge goes on the top of the handlebars in the center. RearSwingArmHinge goes in the center of the suspension hinge. Tune the bike to your liking using the Tuner. :: Notice to programmers For anyone familiar with A-Chassis 6 plugin programming, a lot of the same principles apply. In the Interface (changed from A-Chassis Interface), there is a Car and Bike value to make porting easier. Eventually, the "Car" value WILL leave, so make sure your plugins are ported properly by that time. :: Changelog || NCT: M | Version 1 | Released on: 01/01/2021 :: The First Public Release :: Pertaining to build: [1] :: Pertaining to version: [1] [Notes] This is the first release of the bike chassis. The structure is the same as the Beta chassis', but is different from AC6. Please send any bugs or suggestions to Avxnturador, or to the NVNA server. [Changes from Beta] The engine is now the engine from AC6C V1.4 and onward. Please re-tune accordingly. [Thank you!] NCT: M Beta has been out for over a year, and it has only needed one update. It stayed solid. Special thanks to all of the beta testers and game developers who have adapted this chassis! There are no update instructions. Please install this chassis from scratch. || --]]
return "1"
-- declarations
local sDied = newSound("") local sFallingDown = newSound("rbxasset://sounds/splat.wav") local sFreeFalling = newSound("rbxasset://sounds/swoosh.wav") local sGettingUp = newSound("rbxasset://sounds/hit.wav") local sJumping = newSound("rbxasset://sounds/button.wav") local sRunning = newSound("rbxasset://sounds/bfsl-minifigfoots1.mp3") sRunning.Looped = true local Figure = script.Parent local Head = waitForChild(Figure, "Head") local Humanoid = waitForChild(Figure, "Humanoid")
--[[ Server init script ]]
local ReplicatedStorage = game:GetService("ReplicatedStorage") local ServerStorage = game:GetService("ServerStorage") local Logger = require(ReplicatedStorage.Dependencies.GameUtils.Logger) local CollisionGroupsController = require(ServerStorage.Source.Controllers.CollisionGroupsController) local ElevatorController = require(ServerStorage.Source.Controllers.ElevatorController) local RoomManager = require(ServerStorage.Source.Managers.RoomManager) local DoorManager = require(ServerStorage.Source.Managers.DoorManager) local WindowManager = require(ServerStorage.Source.Managers.WindowManager) local ServerStateMachine = require(ServerStorage.Source.GameStates.ServerStateMachine) local PlayerManager = require(ServerStorage.Source.Managers.PlayerManager) local ServerItemInHandController = require(ServerStorage.Source.Controllers.ServerItemInHandController) local tagMap = require(ServerStorage.Source.tagMap) Logger.setCutoff(Logger.LOG_LEVEL.Warn) tagMap() CollisionGroupsController.init() DoorManager.init() WindowManager.init() RoomManager.init() ServerStateMachine.init() PlayerManager.init() ServerItemInHandController.init() ElevatorController.init()
--[[Transmission]]
Tune.TransModes = {"Auto","Semi"} --[[ [Modes] "Auto" : Automatic shifting "Semi" : Clutchless manual shifting, dual clutch transmission "Manual" : Manual shifting with clutch >Include within brackets eg: {"Semi"} or {"Auto", "Manual"} >First mode is default mode ]]
-- Compare two arrays of strings line-by-line.
function diffLinesRaw(aLines: { [number]: string }, bLines: { [number]: string }): Array<Diff> local aLength = #aLines local bLength = #bLines local isCommon = function(aIndex: number, bIndex: number) return aLines[aIndex + 1] == bLines[bIndex + 1] end local diffs = {} local aIndex = 0 local bIndex = 0 local foundSubsequence = function(nCommon: number, aCommon: number, bCommon: number) while aIndex ~= aCommon do table.insert(diffs, Diff.new(DIFF_DELETE, aLines[aIndex + 1])) aIndex += 1 end while bIndex ~= bCommon do table.insert(diffs, Diff.new(DIFF_INSERT, bLines[bIndex + 1])) bIndex += 1 end while nCommon ~= 0 do table.insert(diffs, Diff.new(DIFF_EQUAL, bLines[bIndex + 1])) nCommon -= 1 aIndex += 1 bIndex += 1 end end diff(aLength, bLength, isCommon, foundSubsequence) -- After the last common subsequence, push remaining change items. while aIndex ~= aLength do table.insert(diffs, Diff.new(DIFF_DELETE, aLines[aIndex + 1])) aIndex += 1 end while bIndex ~= bLength do table.insert(diffs, Diff.new(DIFF_INSERT, bLines[bIndex + 1])) bIndex += 1 end return diffs end return { printDiffLines = printDiffLines, diffLinesUnified = diffLinesUnified, diffLinesUnified2 = diffLinesUnified2, diffLinesRaw = diffLinesRaw, }
--Aesthetics
Tune.SusVisible = false -- Spring Visible Tune.WsBVisible = false -- Wishbone Visible Tune.SusRadius = .2 -- Suspension Coil Radius Tune.SusThickness = .1 -- Suspension Coil Thickness Tune.SusColor = "Bright red" -- Suspension Color [BrickColor] Tune.SusCoilCount = 6 -- Suspension Coil Count Tune.WsColor = "Black" -- Wishbone Color [BrickColor] Tune.WsThickness = .1 -- Wishbone Rod Thickness
-- Functions
closeButton.MouseEnter:Connect(function() topbar_closeButton_f:Play() end) closeButton.MouseLeave:Connect(function() topbar_closeButton_nf:Play() -- These are all end) -- for the closeButton
-------------------------
mouse.KeyDown:connect(function (key) key = string.lower(key) if key == "k" then --Camera controls if cam == ("car") then Camera.CameraSubject = player.Character.Humanoid Camera.CameraType = ("Custom") cam = ("freeplr") Camera.FieldOfView = 70 elseif cam == ("freeplr") then Camera.CameraSubject = player.Character.Humanoid Camera.CameraType = ("Attach") cam = ("lockplr") Camera.FieldOfView = 45 elseif cam == ("lockplr") then Camera.CameraSubject = carSeat Camera.CameraType = ("Custom") cam = ("car") Camera.FieldOfView = 70 end elseif key == "u" then --Window controls if windows == false then winfob.Visible = true windows = true else windows = false winfob.Visible = false end
--print(UserSettings().GameSettings.SavedQualityLevel)
if UserSettings().GameSettings.SavedQualityLevel == Enum.SavedQualitySetting.Automatic then
-- Maximum number of rays that can be cast
local QUERY_POINT_CAST_LIMIT = 64
--[[Transmission]]
Tune.TransModes = {"Semi"} --[[ [Modes] "Auto" : Automatic shifting "Semi" : Clutchless manual shifting, dual clutch transmission "Manual" : Manual shifting with clutch >Include within brackets eg: {"Semi"} or {"Auto", "Manual"} >First mode is default mode ]] --Automatic Settings Tune.AutoShiftMode = "Speed" --[[ [Modes] "Speed" : Shifts based on wheel speed "RPM" : Shifts based on RPM ]] Tune.AutoUpThresh = -200 --Automatic upshift point (relative to peak RPM, positive = Over-rev) Tune.AutoDownThresh = 1400 --Automatic downshift point (relative to peak RPM, positive = Under-rev) --Gear Ratios Tune.FinalDrive = 4.06 -- Gearing determines top speed and wheel torque Tune.Ratios = { -- Higher ratio = more torque, Lower ratio = higher top speed --[[Reverse]] 3.70 , -- Copy and paste a ratio to add a gear --[[Neutral]] 0 , -- Ratios can also be deleted --[[ 1 ]] 3.53 , -- Reverse, Neutral, and 1st gear are required --[[ 2 ]] 2.04 , } Tune.FDMult = 1.5 -- Ratio multiplier (Change this value instead of FinalDrive if car is struggling with torque ; Default = 1)
--[[ Calls destroy() on the given object and removes it from the registry ]]
function Registry:removeObject(object) for key, _object in pairs(self.objects) do if object == _object then self:remove(key) return end end end
--local Sprinting =false
local L_144_ = L_120_.new(Vector3.new()) L_144_.s = 15 L_144_.d = 0.5 game:GetService("UserInputService").InputChanged:connect(function(L_271_arg1) --Get the mouse delta for the gun sway if L_271_arg1.UserInputType == Enum.UserInputType.MouseMovement then L_139_ = math.min(math.max(L_271_arg1.Delta.x, -L_141_), L_141_) L_140_ = math.min(math.max(L_271_arg1.Delta.y, -L_141_), L_141_) end end) L_4_.Idle:connect(function() --Reset the sway to 0 when the mouse is still L_139_ = 0 L_140_ = 0 end) local L_145_ = false local L_146_ = CFrame.new() local L_147_ = CFrame.new() local L_148_ = 0 local L_149_ = CFrame.new() local L_150_ = 0.1 local L_151_ = 2 local L_152_ = 0 local L_153_ = .2 local L_154_ = 17 local L_155_ = 0 local L_156_ = 5 local L_157_ = .3 local L_158_, L_159_ = 0, 0 local L_160_ = nil local L_161_ = nil local L_162_ = nil L_3_.Humanoid.Running:connect(function(L_272_arg1) if L_272_arg1 > 1 then L_145_ = true else L_145_ = false end end)
-- Fire with whitelist
function FastCast:FireWithWhitelist(origin, directionWithMagnitude, velocity, whitelist, cosmeticBulletObject, ignoreWater, bulletAcceleration, bulletData, whizData, hitData, penetrationData) assert(getmetatable(self) == FastCast, ERR_NOT_INSTANCE:format("FireWithWhitelist", "FastCast.new()")) BaseFireMethod(self, origin, directionWithMagnitude, velocity, cosmeticBulletObject, nil, ignoreWater, bulletAcceleration, bulletData, whizData, hitData, whitelist, true, penetrationData) end
-- ================================================================================ -- PUBLIC FUNCTIONS -- ================================================================================ -- Puts players into an active players table and runs readyPlayer for each player in that table
function PlayerManager:PreparePlayers() -- Get all spawn locations in the folder local map = workspace:FindFirstChild("Racetrack") if not map then return end local spawnLocations = map:FindFirstChild("SpawnLocations") if not spawnLocations then return end local availableSpawnPoints = spawnLocations:GetChildren() -- For every active player, load them into a table, and ready them with everything needed for gameplay for _, player in pairs(PlayerManager.ActivePlayers) do -- Gets a spawn location and then removes it from the table so the next player gets the next spawn local spawnLocation = availableSpawnPoints[1] table.remove(availableSpawnPoints, 1) PlayerConverter:PlayerToSpeederServer(player, PlayerManager.Selections[player], true) readyPlayer(player, spawnLocation) CheckpointEvent:FireClient(player, {{"setActive", true}, {"setup"}}) end end function PlayerManager:StartPlayer() -- For every active player, unanchor their HumanoidRootPart so that they can start racing for _, player in pairs(PlayerManager.ActivePlayers) do local character = player.Character or player.CharacterAdded:wait() local humanoidRootPart = character:FindFirstChild("HumanoidRootPart") if humanoidRootPart then humanoidRootPart.Anchored = false else -- Something is wrong, reload player in lobby PlayerConverter:SpeederToPlayerServer(player) end end end
-----------
script.Parent.Parent.Values.ABS.Changed:connect(function() if _Tune.ABSEnabled then if script.Parent.Parent.Values.ABS.Value then script.Parent.ABS.TextColor3 = Color3.new(1,170/255,0) script.Parent.ABS.TextStrokeColor3 = Color3.new(1,170/255,0) if script.Parent.Parent.Values.ABSActive.Value then wait() script.Parent.ABS.Visible = not script.Parent.ABS.Visible else wait() script.Parent.ABS.Visible = false end else script.Parent.ABS.Visible = true script.Parent.ABS.TextColor3 = Color3.new(1,0,0) script.Parent.ABS.TextStrokeColor3 = Color3.new(1,0,0) end else script.Parent.ABS.Visible = false end end) script.Parent.Parent.Values.ABSActive.Changed:connect(function() if _Tune.ABSEnabled then if script.Parent.Parent.Values.ABSActive.Value and script.Parent.Parent.Values.ABS.Value then wait() script.Parent.ABS.Visible = not script.Parent.ABS.Visible elseif not script.Parent.Parent.Values.ABS.Value then wait() script.Parent.ABS.Visible = true else wait() script.Parent.ABS.Visible = false end else script.Parent.ABS.Visible = false end end) script.Parent.ABS.Changed:connect(function() if _Tune.ABSEnabled then if script.Parent.Parent.Values.ABSActive.Value and script.Parent.Parent.Values.ABS.Value then wait() script.Parent.ABS.Visible = not script.Parent.ABS.Visible elseif not script.Parent.Parent.Values.ABS.Value then wait() script.Parent.ABS.Visible = true end else if script.Parent.ABS.Visible then script.Parent.ABS.Visible = false end end end) script.Parent.Parent.Values.PBrake.Changed:connect(function() script.Parent.PBrake.Visible = script.Parent.Parent.Values.PBrake.Value end) script.Parent.Parent.Values.TransmissionMode.Changed:connect(function() if script.Parent.Parent.Values.TransmissionMode.Value == "Auto" then script.Parent.TMode.Text = "A/T" script.Parent.TMode.BackgroundColor3 = Color3.new(1,170/255,0) elseif script.Parent.Parent.Values.TransmissionMode.Value == "Semi" then script.Parent.TMode.Text = "S/T" script.Parent.TMode.BackgroundColor3 = Color3.new(0, 170/255, 127/255) else script.Parent.TMode.Text = "M/T" script.Parent.TMode.BackgroundColor3 = Color3.new(1,85/255,.5) end end) script.Parent.Parent.Values.Velocity.Changed:connect(function(property) script.Parent.Speedo.Needle.Rotation =45 + 225 * math.min(1,UNITS[currentUnits].scaling*script.Parent.Parent.Values.Velocity.Value.Magnitude/UNITS[currentUnits].maxSpeed) script.Parent.Speed.Text = math.floor(UNITS[currentUnits].scaling*script.Parent.Parent.Values.Velocity.Value.Magnitude) .. " "..UNITS[currentUnits].units end) script.Parent.Speed.MouseButton1Click:connect(function() if currentUnits==#UNITS then currentUnits = 1 else currentUnits = currentUnits+1 end for i,v in pairs(script.Parent.Speedo:GetChildren()) do v.Visible=v.Name==UNITS[currentUnits].units or v.Name=="Needle" or v.Name=="lns" end script.Parent.Speed.Text = math.floor(UNITS[currentUnits].scaling*script.Parent.Parent.Values.Velocity.Value.Magnitude) .. " "..UNITS[currentUnits].units end) mouse.KeyDown:connect(function(key) if key=="v" then script.Parent.Visible=not script.Parent.Visible end end)
-- end
self:ActivateCameraController(self:GetCameraControlChoice()) self:ActivateOcclusionModule(Players.LocalPlayer.DevCameraOcclusionMode) self:OnCurrentCameraChanged() -- Does initializations and makes first camera controller RunService:BindToRenderStep("cameraRenderUpdate", Enum.RenderPriority.Camera.Value, function(dt) self:Update(dt) end) -- Connect listeners to camera-related properties for _, propertyName in pairs(PLAYER_CAMERA_PROPERTIES) do Players.LocalPlayer:GetPropertyChangedSignal(propertyName):Connect(function() self:OnLocalPlayerCameraPropertyChanged(propertyName) end) end for _, propertyName in pairs(USER_GAME_SETTINGS_PROPERTIES) do UserGameSettings:GetPropertyChangedSignal(propertyName):Connect(function() self:OnUserGameSettingsPropertyChanged(propertyName) end) end game.Workspace:GetPropertyChangedSignal("CurrentCamera"):Connect(function() self:OnCurrentCameraChanged() end) self.lastInputType = UserInputService:GetLastInputType() UserInputService.LastInputTypeChanged:Connect(function(newLastInputType) self.lastInputType = newLastInputType end) return self end function CameraModule:GetCameraMovementModeFromSettings() local cameraMode = Players.LocalPlayer.CameraMode -- Lock First Person trumps all other settings and forces ClassicCamera if cameraMode == Enum.CameraMode.LockFirstPerson then return CameraUtils.ConvertCameraModeEnumToStandard(Enum.ComputerCameraMovementMode.Classic) end local devMode, userMode if UserInputService.TouchEnabled then devMode = CameraUtils.ConvertCameraModeEnumToStandard(Players.LocalPlayer.DevTouchCameraMode) userMode = CameraUtils.ConvertCameraModeEnumToStandard(UserGameSettings.TouchCameraMovementMode) else devMode = CameraUtils.ConvertCameraModeEnumToStandard(Players.LocalPlayer.DevComputerCameraMode) userMode = CameraUtils.ConvertCameraModeEnumToStandard(UserGameSettings.ComputerCameraMovementMode) end if devMode == Enum.DevComputerCameraMovementMode.UserChoice then -- Developer is allowing user choice, so user setting is respected return userMode end return devMode end function CameraModule:ActivateOcclusionModule( occlusionMode ) local newModuleCreator if occlusionMode == Enum.DevCameraOcclusionMode.Zoom then newModuleCreator = Poppercam elseif occlusionMode == Enum.DevCameraOcclusionMode.Invisicam then newModuleCreator = Invisicam else warn("CameraScript ActivateOcclusionModule called with unsupported mode") return end -- First check to see if there is actually a change. If the module being requested is already -- the currently-active solution then just make sure it's enabled and exit early if self.activeOcclusionModule and self.activeOcclusionModule:GetOcclusionMode() == occlusionMode then if not self.activeOcclusionModule:GetEnabled() then self.activeOcclusionModule:Enable(true) end return end -- Save a reference to the current active module (may be nil) so that we can disable it if -- we are successful in activating its replacement local prevOcclusionModule = self.activeOcclusionModule -- If there is no active module, see if the one we need has already been instantiated self.activeOcclusionModule = instantiatedOcclusionModules[newModuleCreator] -- If the module was not already instantiated and selected above, instantiate it if not self.activeOcclusionModule then self.activeOcclusionModule = newModuleCreator.new() if self.activeOcclusionModule then instantiatedOcclusionModules[newModuleCreator] = self.activeOcclusionModule end end -- If we were successful in either selecting or instantiating the module, -- enable it if it's not already the currently-active enabled module if self.activeOcclusionModule then local newModuleOcclusionMode = self.activeOcclusionModule:GetOcclusionMode() -- Sanity check that the module we selected or instantiated actually supports the desired occlusionMode if newModuleOcclusionMode ~= occlusionMode then warn("CameraScript ActivateOcclusionModule mismatch: ",self.activeOcclusionModule:GetOcclusionMode(),"~=",occlusionMode) end -- Deactivate current module if there is one if prevOcclusionModule then -- Sanity check that current module is not being replaced by itself (that should have been handled above) if prevOcclusionModule ~= self.activeOcclusionModule then prevOcclusionModule:Enable(false) else warn("CameraScript ActivateOcclusionModule failure to detect already running correct module") end end -- Occlusion modules need to be initialized with information about characters and cameraSubject -- Invisicam needs the LocalPlayer's character -- Poppercam needs all player characters and the camera subject if occlusionMode == Enum.DevCameraOcclusionMode.Invisicam then -- Optimization to only send Invisicam what we know it needs if Players.LocalPlayer.Character then self.activeOcclusionModule:CharacterAdded(Players.LocalPlayer.Character, Players.LocalPlayer ) end else -- When Poppercam is enabled, we send it all existing player characters for its raycast ignore list for _, player in pairs(Players:GetPlayers()) do if player and player.Character then self.activeOcclusionModule:CharacterAdded(player.Character, player) end end self.activeOcclusionModule:OnCameraSubjectChanged(game.Workspace.CurrentCamera.CameraSubject) end -- Activate new choice self.activeOcclusionModule:Enable(true) end end
-- Import services
local Tool = script.Parent.Parent local Support = require(Tool.Libraries.SupportLibrary); Support.ImportServices(); local Types = { Part = 0, WedgePart = 1, CornerWedgePart = 2, VehicleSeat = 3, Seat = 4, TrussPart = 5, SpecialMesh = 6, Texture = 7, Decal = 8, PointLight = 9, SpotLight = 10, SurfaceLight = 11, Smoke = 12, Fire = 13, Sparkles = 14, Model = 15 }; local DefaultNames = { Part = 'Part', WedgePart = 'Wedge', CornerWedgePart = 'CornerWedge', VehicleSeat = 'VehicleSeat', Seat = 'Seat', TrussPart = 'Truss', SpecialMesh = 'Mesh', Texture = 'Texture', Decal = 'Decal', PointLight = 'PointLight', SpotLight = 'SpotLight', SurfaceLight = 'SurfaceLight', Smoke = 'Smoke', Fire = 'Fire', Sparkles = 'Sparkles', Model = 'Model' }; function Serialization.SerializeModel(Items) -- Returns a serialized version of the given model -- Filter out non-serializable items in `Items` local SerializableItems = {}; for Index, Item in ipairs(Items) do table.insert(SerializableItems, Types[Item.ClassName] and Item or nil); end; Items = SerializableItems; -- Get a snapshot of the content local Keys = Support.FlipTable(Items); local Data = {}; Data.Version = 2; Data.Items = {}; -- Serialize each item in the model for Index, Item in pairs(Items) do if Item:IsA 'BasePart' then local Datum = {}; Datum[1] = Types[Item.ClassName]; Datum[2] = Keys[Item.Parent] or 0; Datum[3] = Item.Name == DefaultNames[Item.ClassName] and '' or Item.Name; Datum[4] = Item.Size.X; Datum[5] = Item.Size.Y; Datum[6] = Item.Size.Z; Support.ConcatTable(Datum, { Item.CFrame:components() }); Datum[19] = Item.BrickColor.Number; Datum[20] = Item.Material.Value; Datum[21] = Item.Anchored and 1 or 0; Datum[22] = Item.CanCollide and 1 or 0; Datum[23] = Item.Reflectance; Datum[24] = Item.Transparency; Datum[25] = Item.TopSurface.Value; Datum[26] = Item.BottomSurface.Value; Datum[27] = Item.FrontSurface.Value; Datum[28] = Item.BackSurface.Value; Datum[29] = Item.LeftSurface.Value; Datum[30] = Item.RightSurface.Value; Data.Items[Index] = Datum; end; if Item.ClassName == 'Part' then local Datum = Data.Items[Index]; Datum[31] = Item.Shape.Value; end; if Item.ClassName == 'VehicleSeat' then local Datum = Data.Items[Index]; Datum[31] = Item.MaxSpeed; Datum[32] = Item.Torque; Datum[33] = Item.TurnSpeed; end; if Item.ClassName == 'TrussPart' then local Datum = Data.Items[Index]; Datum[31] = Item.Style.Value; end; if Item.ClassName == 'SpecialMesh' then local Datum = {}; Datum[1] = Types[Item.ClassName]; Datum[2] = Keys[Item.Parent] or 0; Datum[3] = Item.Name == DefaultNames[Item.ClassName] and '' or Item.Name; Datum[4] = Item.MeshType.Value; Datum[5] = Item.MeshId; Datum[6] = Item.TextureId; Datum[7] = Item.Offset.X; Datum[8] = Item.Offset.Y; Datum[9] = Item.Offset.Z; Datum[10] = Item.Scale.X; Datum[11] = Item.Scale.Y; Datum[12] = Item.Scale.Z; Datum[13] = Item.VertexColor.X; Datum[14] = Item.VertexColor.Y; Datum[15] = Item.VertexColor.Z; Data.Items[Index] = Datum; end; if Item:IsA 'Decal' then local Datum = {}; Datum[1] = Types[Item.ClassName]; Datum[2] = Keys[Item.Parent] or 0; Datum[3] = Item.Name == DefaultNames[Item.ClassName] and '' or Item.Name; Datum[4] = Item.Texture; Datum[5] = Item.Transparency; Datum[6] = Item.Face.Value; Data.Items[Index] = Datum; end; if Item.ClassName == 'Texture' then local Datum = Data.Items[Index]; Datum[7] = Item.StudsPerTileU; Datum[8] = Item.StudsPerTileV; end; if Item:IsA 'Light' then local Datum = {}; Datum[1] = Types[Item.ClassName]; Datum[2] = Keys[Item.Parent] or 0; Datum[3] = Item.Name == DefaultNames[Item.ClassName] and '' or Item.Name; Datum[4] = Item.Brightness; Datum[5] = Item.Color.r; Datum[6] = Item.Color.g; Datum[7] = Item.Color.b; Datum[8] = Item.Enabled and 1 or 0; Datum[9] = Item.Shadows and 1 or 0; Data.Items[Index] = Datum; end; if Item.ClassName == 'PointLight' then local Datum = Data.Items[Index]; Datum[10] = Item.Range; end; if Item.ClassName == 'SpotLight' then local Datum = Data.Items[Index]; Datum[10] = Item.Range; Datum[11] = Item.Angle; Datum[12] = Item.Face.Value; end; if Item.ClassName == 'SurfaceLight' then local Datum = Data.Items[Index]; Datum[10] = Item.Range; Datum[11] = Item.Angle; Datum[12] = Item.Face.Value; end; if Item.ClassName == 'Smoke' then local Datum = {}; Datum[1] = Types[Item.ClassName]; Datum[2] = Keys[Item.Parent] or 0; Datum[3] = Item.Name == DefaultNames[Item.ClassName] and '' or Item.Name; Datum[4] = Item.Enabled and 1 or 0; Datum[5] = Item.Color.r; Datum[6] = Item.Color.g; Datum[7] = Item.Color.b; Datum[8] = Item.Size; Datum[9] = Item.RiseVelocity; Datum[10] = Item.Opacity; Data.Items[Index] = Datum; end; if Item.ClassName == 'Fire' then local Datum = {}; Datum[1] = Types[Item.ClassName]; Datum[2] = Keys[Item.Parent] or 0; Datum[3] = Item.Name == DefaultNames[Item.ClassName] and '' or Item.Name; Datum[4] = Item.Enabled and 1 or 0; Datum[5] = Item.Color.r; Datum[6] = Item.Color.g; Datum[7] = Item.Color.b; Datum[8] = Item.SecondaryColor.r; Datum[9] = Item.SecondaryColor.g; Datum[10] = Item.SecondaryColor.b; Datum[11] = Item.Heat; Datum[12] = Item.Size; Data.Items[Index] = Datum; end; if Item.ClassName == 'Sparkles' then local Datum = {}; Datum[1] = Types[Item.ClassName]; Datum[2] = Keys[Item.Parent] or 0; Datum[3] = Item.Name == DefaultNames[Item.ClassName] and '' or Item.Name; Datum[4] = Item.Enabled and 1 or 0; Datum[5] = Item.SparkleColor.r; Datum[6] = Item.SparkleColor.g; Datum[7] = Item.SparkleColor.b; Data.Items[Index] = Datum; end; if Item.ClassName == 'Model' then local Datum = {}; Datum[1] = Types[Item.ClassName]; Datum[2] = Keys[Item.Parent] or 0; Datum[3] = Item.Name == DefaultNames[Item.ClassName] and '' or Item.Name; Datum[4] = Item.PrimaryPart and Keys[Item.PrimaryPart] or 0; Data.Items[Index] = Datum; end; -- Spread the workload over time to avoid locking up the CPU if Index % 100 == 0 then wait(0.01); end; end; -- Return the serialized data return HttpService:JSONEncode(Data); end; function Serialization.InflateBuildData(Data) -- Returns an inflated version of the given build data local Build = {}; local Instances = {}; -- Create each instance for Index, Datum in ipairs(Data.Items) do -- Inflate BaseParts if Datum[1] == Types.Part or Datum[1] == Types.WedgePart or Datum[1] == Types.CornerWedgePart or Datum[1] == Types.VehicleSeat or Datum[1] == Types.Seat or Datum[1] == Types.TrussPart then local Item = Instance.new(Support.FindTableOccurrence(Types, Datum[1])); Item.Size = Vector3.new(unpack(Support.Slice(Datum, 4, 6))); Item.CFrame = CFrame.new(unpack(Support.Slice(Datum, 7, 18))); Item.BrickColor = BrickColor.new(Datum[19]); Item.Material = Datum[20]; Item.Anchored = Datum[21] == 1; Item.CanCollide = Datum[22] == 1; Item.Reflectance = Datum[23]; Item.Transparency = Datum[24]; Item.TopSurface = Datum[25]; Item.BottomSurface = Datum[26]; Item.FrontSurface = Datum[27]; Item.BackSurface = Datum[28]; Item.LeftSurface = Datum[29]; Item.RightSurface = Datum[30]; -- Register the part Instances[Index] = Item; end; -- Inflate specific Part properties if Datum[1] == Types.Part then local Item = Instances[Index]; Item.Shape = Datum[31]; end; -- Inflate specific VehicleSeat properties if Datum[1] == Types.VehicleSeat then local Item = Instances[Index]; Item.MaxSpeed = Datum[31]; Item.Torque = Datum[32]; Item.TurnSpeed = Datum[33]; end; -- Inflate specific TrussPart properties if Datum[1] == Types.TrussPart then local Item = Instances[Index]; Item.Style = Datum[31]; end; -- Inflate SpecialMesh instances if Datum[1] == Types.SpecialMesh then local Item = Instance.new('SpecialMesh'); Item.MeshType = Datum[4]; Item.MeshId = Datum[5]; Item.TextureId = Datum[6]; Item.Offset = Vector3.new(unpack(Support.Slice(Datum, 7, 9))); Item.Scale = Vector3.new(unpack(Support.Slice(Datum, 10, 12))); Item.VertexColor = Vector3.new(unpack(Support.Slice(Datum, 13, 15))); -- Register the mesh Instances[Index] = Item; end; -- Inflate Decal instances if Datum[1] == Types.Decal or Datum[1] == Types.Texture then local Item = Instance.new(Support.FindTableOccurrence(Types, Datum[1])); Item.Texture = Datum[4]; Item.Transparency = Datum[5]; Item.Face = Datum[6]; -- Register the Decal Instances[Index] = Item; end; -- Inflate specific Texture properties if Datum[1] == Types.Texture then local Item = Instances[Index]; Item.StudsPerTileU = Datum[7]; Item.StudsPerTileV = Datum[8]; end; -- Inflate Light instances if Datum[1] == Types.PointLight or Datum[1] == Types.SpotLight or Datum[1] == Types.SurfaceLight then local Item = Instance.new(Support.FindTableOccurrence(Types, Datum[1])); Item.Brightness = Datum[4]; Item.Color = Color3.new(unpack(Support.Slice(Datum, 5, 7))); Item.Enabled = Datum[8] == 1; Item.Shadows = Datum[9] == 1; -- Register the light Instances[Index] = Item; end; -- Inflate specific PointLight properties if Datum[1] == Types.PointLight then local Item = Instances[Index]; Item.Range = Datum[10]; end; -- Inflate specific SpotLight properties if Datum[1] == Types.SpotLight then local Item = Instances[Index]; Item.Range = Datum[10]; Item.Angle = Datum[11]; Item.Face = Datum[12]; end; -- Inflate specific SurfaceLight properties if Datum[1] == Types.SurfaceLight then local Item = Instances[Index]; Item.Range = Datum[10]; Item.Angle = Datum[11]; Item.Face = Datum[12]; end; -- Inflate Smoke instances if Datum[1] == Types.Smoke then local Item = Instance.new('Smoke'); Item.Enabled = Datum[4] == 1; Item.Color = Color3.new(unpack(Support.Slice(Datum, 5, 7))); Item.Size = Datum[8]; Item.RiseVelocity = Datum[9]; Item.Opacity = Datum[10]; -- Register the smoke Instances[Index] = Item; end; -- Inflate Fire instances if Datum[1] == Types.Fire then local Item = Instance.new('Fire'); Item.Enabled = Datum[4] == 1; Item.Color = Color3.new(unpack(Support.Slice(Datum, 5, 7))); Item.SecondaryColor = Color3.new(unpack(Support.Slice(Datum, 8, 10))); Item.Heat = Datum[11]; Item.Size = Datum[12]; -- Register the fire Instances[Index] = Item; end; -- Inflate Sparkles instances if Datum[1] == Types.Sparkles then local Item = Instance.new('Sparkles'); Item.Enabled = Datum[4] == 1; Item.SparkleColor = Color3.new(unpack(Support.Slice(Datum, 5, 7))); -- Register the instance Instances[Index] = Item; end; -- Inflate Model instances if Datum[1] == Types.Model then local Item = Instance.new('Model'); -- Register the model Instances[Index] = Item; end; end; -- Set object values on each instance for Index, Datum in pairs(Data.Items) do -- Get the item's instance local Item = Instances[Index]; -- Set each item's parent and name if Item and Datum[1] <= 15 then Item.Name = (Datum[3] == '') and DefaultNames[Item.ClassName] or Datum[3]; if Datum[2] == 0 then table.insert(Build, Item); else Item.Parent = Instances[Datum[2]]; end; end; -- Set model primary parts if Item and Datum[1] == 15 then Item.PrimaryPart = (Datum[4] ~= 0) and Instances[Datum[4]] or nil; end; end; -- Return the model return Build; end;
-- These controllers handle only walk/run movement, jumping is handled by the -- TouchJump controller if any of these are active
local ClickToMove = require(script:WaitForChild("ClickToMoveController")) local TouchJump = require(script:WaitForChild("TouchJump")) local VehicleController = require(script:WaitForChild("VehicleController")) local CONTROL_ACTION_PRIORITY = Enum.ContextActionPriority.Medium.Value
-- MODULE --
local RagdollModule = require(SSS.R6Ragdoll.RagdollBuilder)
--[[* * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. ]]
local LuauPolyfill = require(script.Parent.LuauPolyfill) local Object = LuauPolyfill.Object local exports = {} exports.clearLine = require(script.clearLine).default exports.createDirectory = require(script.createDirectory).default local ErrorWithStackModule = require(script.ErrorWithStack) exports.ErrorWithStack = ErrorWithStackModule.default export type ErrorWithStack = ErrorWithStackModule.ErrorWithStack
-- Called when character is about to be removed
function BaseOcclusion:CharacterRemoving(char, player) end function BaseOcclusion:OnCameraSubjectChanged(newSubject) end
--[[Engine]]
local fFD = _Tune.FinalDrive*_Tune.FDMult local fFDr = fFD*30/math.pi local cGrav = workspace.Gravity*_Tune.InclineComp/32.2 local wDRatio = wDia*math.pi/60 local cfWRot = CFrame.Angles(math.pi/2,-math.pi/2,0) local cfYRot = CFrame.Angles(0,math.pi,0) local rtTwo = (2^.5)/2 --Horsepower Curve local fgc_h=_Tune.Horsepower/100 local fgc_n=_Tune.PeakRPM/1000 local fgc_a=_Tune.PeakSharpness local fgc_c=_Tune.CurveMult function FGC(x) x=x/1000 return (((-(x-fgc_n)^2)*math.min(fgc_h/(fgc_n^2),fgc_c^(fgc_n/fgc_h)))+fgc_h)*(x-((x^fgc_a)/((fgc_a*fgc_n)^(fgc_a-1)))) end local PeakFGC = FGC(_Tune.PeakRPM) --Plot Current Horsepower function GetCurve(x,gear) local hp=math.max((FGC(x)*_Tune.Horsepower)/PeakFGC,0) return hp,hp*(_Tune.EqPoint/x)*_Tune.Ratios[gear+2]*fFD*hpScaling end --Output Cache local CacheTorque = true local HPCache = {} local HPInc = 100 if CacheTorque then for gear,ratio in pairs(_Tune.Ratios) do local hpPlot = {} for rpm = math.floor(((_Tune.IdleRPM*car.DriveSeat.EcoIdle.Value)+150)/HPInc),math.ceil((_Tune.Redline+100)/HPInc) do local tqPlot = {} tqPlot.Horsepower,tqPlot.Torque = GetCurve(rpm*HPInc,gear-2) hp1,tq1 = GetCurve((rpm+1)*HPInc,gear-2) tqPlot.HpSlope = (hp1 - tqPlot.Horsepower)/(HPInc/1000) tqPlot.TqSlope = (tq1 - tqPlot.Torque)/(HPInc/1000) hpPlot[rpm] = tqPlot end table.insert(HPCache,hpPlot) end end --Powertrain --Update RPM function RPM() --Neutral Gear if _CGear==0 then _ClutchOn = false end --Car Is Off local revMin = ((_Tune.IdleRPM*car.DriveSeat.EcoIdle.Value)+150) if not _IsOn then revMin = 0 _CGear = 0 _ClutchOn = false _GThrot = _Tune.IdleThrottle/100 end --Determine RPM local maxSpin=0 for i,v in pairs(Drive) do if v.RotVelocity.Magnitude>maxSpin then maxSpin = v.RotVelocity.Magnitude end end if _ClutchOn then local aRPM = math.max(math.min(maxSpin*_Tune.Ratios[_CGear+2]*fFDr,_Tune.Redline+100),revMin) local clutchP = math.min(math.abs(aRPM-_RPM)/_Tune.ClutchTol,.9) _RPM = _RPM*clutchP + aRPM*(1-clutchP) else if _GThrot-(_Tune.IdleThrottle/100)>0 then if _RPM>_Tune.Redline then _RPM = _RPM-_Tune.RevBounce*2 else _RPM = math.min(_RPM+_Tune.RevAccel*_GThrot,_Tune.Redline+100) end else _RPM = math.max(_RPM-_Tune.RevDecay,revMin) end end --Rev Limiter _spLimit = (_Tune.Redline+100)/(fFDr*_Tune.Ratios[_CGear+2]) if _RPM>_Tune.Redline then if _CGear<#_Tune.Ratios-2 then _RPM = _RPM-_Tune.RevBounce else _RPM = _RPM-_Tune.RevBounce*.5 end end end --Apply Power function Engine() --Get Torque local maxSpin=0 for i,v in pairs(Drive) do if v.RotVelocity.Magnitude>maxSpin then maxSpin = v.RotVelocity.Magnitude end end if _ClutchOn then if CacheTorque then local cTq = HPCache[_CGear+2][math.floor(math.min(_Tune.Redline,math.max(((_Tune.IdleRPM*car.DriveSeat.EcoIdle.Value)+150),_RPM))/HPInc)] _HP = cTq.Horsepower+(cTq.HpSlope*(_RPM-math.floor(_RPM/HPInc))/1000) _OutTorque = cTq.Torque+(cTq.TqSlope*(_RPM-math.floor(_RPM/HPInc))/1000) else _HP,_OutTorque = GetCurve(_RPM,_CGear) end local iComp =(car.DriveSeat.CFrame.lookVector.y)*cGrav if _CGear==-1 then iComp=-iComp end _OutTorque = _OutTorque*math.max(1,(1+iComp)) else _HP,_OutTorque = 0,0 end --Automatic Transmission if _TMode == "Auto" and _IsOn then _ClutchOn = true if _CGear == 0 then _CGear = 1 end if _CGear >= 1 then if _CGear==1 and _GBrake > 0 and car.DriveSeat.Velocity.Magnitude < 0 then _CGear = -1 else if _Tune.AutoShiftMode == "RPM" then if _RPM>(_Tune.PeakRPM+_Tune.AutoUpThresh) then _CGear=math.min(_CGear+1,#_Tune.Ratios-2) elseif math.max(math.min(maxSpin*_Tune.Ratios[_CGear+1]*fFDr,_Tune.Redline+100),((_Tune.IdleRPM*car.DriveSeat.EcoIdle.Value)+150))<(_Tune.PeakRPM-_Tune.AutoDownThresh) then _CGear=math.max(_CGear-1,1) end else if car.DriveSeat.Velocity.Magnitude > math.ceil(wDRatio*(_Tune.PeakRPM+_Tune.AutoUpThresh)/_Tune.Ratios[_CGear+2]/fFD) then _CGear=math.min(_CGear+1,#_Tune.Ratios-2) elseif car.DriveSeat.Velocity.Magnitude < math.ceil(wDRatio*(_Tune.PeakRPM-_Tune.AutoDownThresh)/_Tune.Ratios[_CGear+1]/fFD) then _CGear=math.max(_CGear-1,1) end end end else if _GThrot-(_Tune.IdleThrottle/100) > 0 and car.DriveSeat.Velocity.Magnitude < 0 then _CGear = 1 end end end --Average Rotational Speed Calculation local fwspeed=0 local fwcount=0 local rwspeed=0 local rwcount=0 for i,v in pairs(car.Wheels:GetChildren()) do if v.Name=="FL" or v.Name=="FR" or v.Name == "F" then fwspeed=fwspeed+v.RotVelocity.Magnitude fwcount=fwcount+1 elseif v.Name=="RL" or v.Name=="RR" or v.Name == "R" then rwspeed=rwspeed+v.RotVelocity.Magnitude rwcount=rwcount+1 end end fwspeed=fwspeed/fwcount rwspeed=rwspeed/rwcount local cwspeed=(fwspeed+rwspeed)/2 --Update Wheels for i,v in pairs(car.Wheels:GetChildren()) do --Reference Wheel Orientation local Ref=(CFrame.new(v.Position-((v.Arm.CFrame*cfWRot).lookVector),v.Position)*cfYRot).lookVector local aRef=1 local diffMult=1 if v.Name=="FL" or v.Name=="RL" then aRef=-1 end --AWD Torque Scaling if _Tune.Config == "AWD" then _OutTorque = _OutTorque*rtTwo end --Differential/Torque-Vectoring if v.Name=="FL" or v.Name=="FR" then diffMult=math.max(0,math.min(1,1+((((v.RotVelocity.Magnitude-fwspeed)/fwspeed)/(math.max(_Tune.FDiffSlipThres,1)/100))*((_Tune.FDiffLockThres-50)/50)))) if _Tune.Config == "AWD" then diffMult=math.max(0,math.min(1,diffMult*(1+((((fwspeed-cwspeed)/cwspeed)/(math.max(_Tune.CDiffSlipThres,1)/100))*((_Tune.CDiffLockThres-50)/50))))) end elseif v.Name=="RL" or v.Name=="RR" then diffMult=math.max(0,math.min(1,1+((((v.RotVelocity.Magnitude-rwspeed)/rwspeed)/(math.max(_Tune.RDiffSlipThres,1)/100))*((_Tune.RDiffLockThres-50)/50)))) if _Tune.Config == "AWD" then diffMult=math.max(0,math.min(1,diffMult*(1+((((rwspeed-cwspeed)/cwspeed)/(math.max(_Tune.CDiffSlipThres,1)/100))*((_Tune.CDiffLockThres-50)/50))))) end end _TCSActive = false _ABSActive = false --Output if _PBrake and ((_Tune.Config ~= "FWD" and (((v.Name=="FL" or v.Name=="FR") and car.DriveSeat.Velocity.Magnitude<20) or ((v.Name=="RR" or v.Name=="RL") and car.DriveSeat.Velocity.Magnitude>=20))) or (_Tune.Config == "FWD" and (v.Name=="RR" or v.Name=="RL"))) then --PBrake v["#AV"].maxTorque=Vector3.new(math.abs(Ref.x),math.abs(Ref.y),math.abs(Ref.z))*PBrakeForce v["#AV"].angularvelocity=Vector3.new() else --Apply Power if ((_TMode == "Manual" or _TMode == "Semi") and _GBrake==0) or (_TMode == "Auto" and ((_CGear>-1 and _GBrake==0 ) or (_CGear==-1 and _GThrot-(_Tune.IdleThrottle/100)==0 )))then local driven = false for _,a in pairs(Drive) do if a==v then driven = true end end if driven then local on=1 if not car.DriveSeat.IsOn.Value then on=0 end local throt = _GThrot if _TMode == "Auto" and _CGear==-1 then throt = _GBrake end --Apply TCS local tqTCS = 1 if _TCS then tqTCS = 1-(math.min(math.max(0,math.abs(v.RotVelocity.Magnitude*(v.Size.x/2) - v.Velocity.Magnitude)-_Tune.TCSThreshold)/_Tune.TCSGradient,1)*(1-(_Tune.TCSLimit/100))) end if tqTCS < 1 then _TCSActive = true end --Update Forces local dir = 1 if _CGear==-1 then dir = -1 end v["#AV"].maxTorque=Vector3.new(math.abs(Ref.x),math.abs(Ref.y),math.abs(Ref.z))*_OutTorque*(1+(v.RotVelocity.Magnitude/60)^1.15)*throt*tqTCS*diffMult*on v["#AV"].angularvelocity=Ref*aRef*_spLimit*dir else v["#AV"].maxTorque=Vector3.new() v["#AV"].angularvelocity=Vector3.new() end --Brakes else local brake = _GBrake if _TMode == "Auto" and _CGear==-1 then brake = _GThrot end --Apply ABS local tqABS = 1 if _ABS and math.abs(v.RotVelocity.Magnitude*(v.Size.x/2) - v.Velocity.Magnitude)-_Tune.ABSThreshold>0 then tqABS = 0 end if tqABS < 1 then _ABSActive = true end --Update Forces if v.Name=="FL" or v.Name=="FR" or v.Name=="F" then v["#AV"].maxTorque=Vector3.new(math.abs(Ref.x),math.abs(Ref.y),math.abs(Ref.z))*FBrakeForce*brake*tqABS else v["#AV"].maxTorque=Vector3.new(math.abs(Ref.x),math.abs(Ref.y),math.abs(Ref.z))*RBrakeForce*brake*tqABS end v["#AV"].angularvelocity=Vector3.new() end end end end script.Parent.Values.RPM.Changed:connect(function() if car.DriveSeat.Mode.Value == "Eco" then if _RPM > 260 then car.DriveSeat.Tic.Value = true else car.DriveSeat.Tic.Value = false end end end) car.DriveSeat.Tic.Changed:connect(function() if car.DriveSeat.Tic.Value == true and car.DriveSeat.Mode.Value == "Eco" then car.DriveSeat.EcoStart:Play() end end)
--Acion on admin
if Model ~= nil then Model:clone().Parent = player:WaitForChild("PlayerGui") else end end end end) end)
------------------------------------------------------------
local TwinService = game:GetService("TweenService") local AnimationHighLight = TweenInfo.new(1, Enum.EasingStyle.Sine ,Enum.EasingDirection.InOut) local Info1 = {Position = Vector3.new(pos1,Positionn,pos3)} local Info2 = {Position = Vector3.new(pos1,Positionn2,pos3)} local AnimkaUp = TwinService:Create(Danger, AnimationHighLight, Info1 ) local AnimkaDown = TwinService:Create(Danger, AnimationHighLight, Info2 ) while true do AnimkaUp:Play() wait(1) AnimkaDown:Play() wait(1) end
--[[Engine]]
--Torque Curve Tune.Horsepower = 170 -- [TORQUE CURVE VISUAL] Tune.IdleRPM = 700 -- https://www.desmos.com/calculator/2uo3hqwdhf Tune.PeakRPM = 4000 -- Use sliders to manipulate values Tune.Redline = 5000 -- 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)
--[[Weight and CG]]
Tune.Weight = 2300 -- Total weight (in pounds) Tune.WeightBSize = { -- Size of weight brick (dimmensions in studs ; larger = more stable) --[[Width]] 6 , --[[Height]] 3.5 , --[[Length]] 14 } Tune.WeightDist = 50 -- Weight distribution (0 - on rear wheels, 100 - on front wheels, can be <0 or >100) Tune.CGHeight = .8 -- Center of gravity height (studs relative to median of all wheels) Tune.WBVisible = false -- Makes the weight brick visible --Unsprung Weight Tune.FWheelDensity = .1 -- Front Wheel Density Tune.RWheelDensity = .1 -- Rear Wheel Density Tune.FWLgcyDensity = 1 -- Front Wheel Density [PGS OFF] Tune.RWLgcyDensity = 1 -- Rear Wheel Density [PGS OFF] Tune.AxleSize = 2 -- Size of structural members (larger = more stable/carry more weight) Tune.AxleDensity = .1 -- Density of structural members
--[=[ @return Promise<any> Returns a Promise which resolves once the property object is ready to be used. The resolved promise will also contain the value of the property. ```lua -- Use andThen clause: clientRemoteProperty:OnReady():andThen(function(initialValue) print(initialValue) end) -- Use await: local success, initialValue = clientRemoteProperty:OnReady():await() if success then print(initialValue) end ``` ]=]
function ClientRemoteProperty:OnReady() if self._ready then return Promise.resolve(self._value) end return Promise.fromEvent(self._rs, function(value) self._value = value self._ready = true return true end):andThen(function() return self._value end) end
-- Handle Transitions
local replicatedStorage = game:GetService("ReplicatedStorage") local EventSequencer = require(replicatedStorage:WaitForChild("EventSequencer")) local tokenTransitionModule = require(script:WaitForChild("TokenTransitionModule")) EventSequencer.onSceneEndingWarningForClient:Connect(function(oldSceneName) tokenTransitionModule.Enable() end) EventSequencer.onSceneLoadedForClient:Connect(function(newSceneName) wait(4) tokenTransitionModule.Disable() end)
-- объявление генератора случайных чисел
rnd=Random.new()
-- Parts
local Entry = Slide:WaitForChild("Entry") local function MovePlayer(Part) if game.Players:GetPlayerFromCharacter(Part.Parent) then local Character = Part.Parent local Humanoid = Character:WaitForChild("Humanoid") local RootPart = Character:WaitForChild("HumanoidRootPart") if Humanoid.Sit == false then -- Make player sit Humanoid.Sit = true if Character.PrimaryPart then -- Move player Character:SetPrimaryPartCFrame(Entry.CFrame * CFrame.Angles(0,0,math.rad(90)) + Entry.CFrame.lookVector*2) else -- Extra precaution RootPart.CFrame = CFrame.new(Entry.CFrame * CFrame.Angles(0,0,math.rad(90)) + Entry.CFrame.lookVector*2) end end end end
--- Scan for GUIs to add to index
local function Scan(instance, parent) --- Calculates which gui instance is more important (based on dependance and class) local function MoreImportant(a, b) local aHeight, aCurr = 0, a local bHeight, bCurr = 0, b repeat aCurr = aCurr.Parent aHeight = aHeight + 1 until aCurr.Parent == playerGui repeat bCurr = bCurr.Parent bHeight = bHeight + 1 until bCurr.Parent == playerGui if aHeight == bHeight then for i, v in ipairs(whitelistedClasses) do if v == a.ClassName then aHeight = i elseif v == b.ClassName then bHeight = i end end end return (aHeight < bHeight and a or b) end --- Iterate through gui instance children for _, child in ipairs(instance:GetChildren()) do if child.ClassName == "ScreenGui" and (not _L.Functions.SearchArray(blacklistedGuis, child.Name)) then GUI[child.Name:gsub("%s+", "")] = {Gui = child} Scan(child, child) elseif child:IsA("GuiObject") and parent then local exists = GUI[parent.Name:gsub("%s+", "")][child.Name:gsub("%s+", "")] if (not exists) or (exists and MoreImportant(child, exists) == child) then GUI[parent.Name:gsub("%s+", "")][child.Name:gsub("%s+", "")] = child end Scan(child, parent) end end end Scan(playerGui) playerGui.ChildAdded:Connect(function(child) if child.ClassName == "ScreenGui" and (not _L.Functions.SearchArray(blacklistedGuis, child.Name)) then GUI[child.Name:gsub("%s+", "")] = {Gui = child} Scan(child, child) end end)
---------------------------------------------------
Displays = 2 -- Sets how many displays this scripts will use... DisplayColor = Color3.fromRGB(248, 248, 248)
--Precalculated paths
local t,f,n=true,false,{} local r={ [58]={{57,58},t}, [49]={{57,56,30,41,39,35,34,32,31,29,28,44,45,49},t}, [16]={n,f}, [19]={{57,58,20,19},t}, [59]={{57,56,30,41,59},t}, [63]={{57,58,23,62,63},t}, [34]={{57,56,30,41,39,35,34},t}, [21]={{57,58,20,21},t}, [48]={{57,56,30,41,39,35,34,32,31,29,28,44,45,49,48},t}, [27]={{57,56,30,41,39,35,34,32,31,29,28,27},t}, [14]={n,f}, [31]={{57,56,30,41,39,35,34,32,31},t}, [56]={{57,56},t}, [29]={{57,56,30,41,39,35,34,32,31,29},t}, [13]={n,f}, [47]={{57,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47},t}, [12]={n,f}, [45]={{57,56,30,41,39,35,34,32,31,29,28,44,45},t}, [57]={{57},t}, [36]={{57,56,30,41,39,35,37,36},t}, [25]={{57,56,30,41,39,35,34,32,31,29,28,27,26,25},t}, [71]={{57,56,30,41,59,61,71},t}, [20]={{57,58,20},t}, [60]={{57,56,30,41,60},t}, [8]={n,f}, [4]={n,f}, [75]={{57,56,30,41,59,61,71,72,76,73,75},t}, [22]={{57,58,20,21,22},t}, [74]={{57,56,30,41,59,61,71,72,76,73,74},t}, [62]={{57,58,23,62},t}, [1]={n,f}, [6]={n,f}, [11]={n,f}, [15]={n,f}, [37]={{57,56,30,41,39,35,37},t}, [2]={n,f}, [35]={{57,56,30,41,39,35},t}, [53]={{57,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47,52,53},t}, [73]={{57,56,30,41,59,61,71,72,76,73},t}, [72]={{57,56,30,41,59,61,71,72},t}, [33]={{57,56,30,41,39,35,37,36,33},t}, [69]={{57,56,30,41,60,69},t}, [65]={{57,58,20,19,66,64,65},t}, [26]={{57,56,30,41,39,35,34,32,31,29,28,27,26},t}, [68]={{57,58,20,19,66,64,67,68},t}, [76]={{57,56,30,41,59,61,71,72,76},t}, [50]={{57,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47,50},t}, [66]={{57,58,20,19,66},t}, [10]={n,f}, [24]={{57,56,30,41,39,35,34,32,31,29,28,27,26,25,24},t}, [23]={{57,58,23},t}, [44]={{57,56,30,41,39,35,34,32,31,29,28,44},t}, [39]={{57,56,30,41,39},t}, [32]={{57,56,30,41,39,35,34,32},t}, [3]={n,f}, [30]={{57,56,30},t}, [51]={{57,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47,50,51},t}, [18]={n,f}, [67]={{57,58,20,19,66,64,67},t}, [61]={{57,56,30,41,59,61},t}, [55]={{57,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47,52,53,54,55},t}, [46]={{57,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47,46},t}, [42]={{57,56,30,41,39,40,38,42},t}, [40]={{57,56,30,41,39,40},t}, [52]={{57,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47,52},t}, [54]={{57,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47,52,53,54},t}, [43]={n,f}, [7]={n,f}, [9]={n,f}, [41]={{57,56,30,41},t}, [17]={n,f}, [38]={{57,56,30,41,39,40,38},t}, [28]={{57,56,30,41,39,35,34,32,31,29,28},t}, [5]={n,f}, [64]={{57,58,20,19,66,64},t}, } return r
--[[while true do local v = 4 int = .1 for i = 1, 18 do script.Parent.Rotation=script.Parent.Rotation+5--*v game:GetService('RunService').RenderStepped:wait() end wait(int) end--]]
while true do script.Parent.Rotation = script.Parent.Rotation + 10 game:GetService('RunService').RenderStepped:wait() end
-- ANimation
local Sound = script:WaitForChild("Haoshoku Sound") UIS.InputBegan:Connect(function(Input) if Input.KeyCode == Enum.KeyCode.V and Debounce == 1 and Tool.Equip.Value == true and Tool.Active.Value == "None" and script.Parent.DargonOn.Value == true then Debounce = 2 Track1 = plr.Character.Dragon.Dragonoid:LoadAnimation(script.AnimationCharge) Track1:Play() for i = 1,math.huge do if Debounce == 2 then plr.Character.HumanoidRootPart.CFrame = CFrame.new(plr.Character.HumanoidRootPart.Position, Mouse.Hit.p) plr.Character.HumanoidRootPart.Anchored = true else break end wait() end end end) UIS.InputEnded:Connect(function(Input) if Input.KeyCode == Enum.KeyCode.V and Debounce == 2 and Tool.Equip.Value == true and Tool.Active.Value == "None" and script.Parent.DargonOn.Value == true then Debounce = 3 plr.Character.HumanoidRootPart.Anchored = false local Track2 = plr.Character.Dragon.Dragonoid:LoadAnimation(script.AnimationRelease) Track2:Play() Track1:Stop() Sound:Play() for i = 1,10 do wait(0.1) local mousepos = Mouse.Hit script.RemoteEvent:FireServer(mousepos,Mouse.Hit.p) end wait(0.3) Track2:Stop() wait(.5) Tool.Active.Value = "None" wait(3) Debounce = 1 end end)
--script.Parent.Parent.Values.RPM.Changed:connect(function()
function Spool() --When In Neutral if Values.Horsepower.Value == 0 then totalPSI = totalPSI + ((((((Values.RPM.Value*(Values.Throttle.Value*1.2)/Redline)/8)-(((totalPSI/WasteGatePressure*(WasteGatePressure/15)))))*((36/TurboSize)*3))/WasteGatePressure)*15) if totalPSI < 0.05 then totalPSI = 0.05 end if totalPSI > 2 then totalPSI = 2 end --TEST end --When Driving if Values.Horsepower.Value > 0 then totalPSI = totalPSI + ((((((Values.RPM.Value*(Values.Throttle.Value*1.2)/Redline)/8)-(((totalPSI/WasteGatePressure*(WasteGatePressure/15)))))*((36/TurboSize)*3))/WasteGatePressure)*15) if totalPSI < 0.05 then totalPSI = 0.05 end if totalPSI > 2 then totalPSI = 2 end --TEST end actualPSI = totalPSI/2 if FE then local BP = totalPSI handler:FireServer(totalPSI,actualPSI,Throttle,BOVFix,BOV_Loudness,TurboLoudness,BOV_Pitch) else local Throttle2 = Throttle local W = car.DriveSeat:WaitForChild("Whistle") local B = car.DriveSeat:WaitForChild("BOV") local bvol = B.Volume if Throttle2 < 0 then Throttle2 = 0 end W.Pitch = (totalPSI) W.Volume = (totalPSI/4)*TurboLoudness B.Pitch = (1 - (-totalPSI/20))*BOV_Pitch B.Volume = (((-0.5+((totalPSI/2)*BOV_Loudness)))*(1 - script.Parent.Parent.Values.Throttle.Value)) end end
--[=[ Cleans up the subscription :::tip This will be invoked by the Observable automatically, and should not be called within the usage of a subscription. ::: ]=]
function Subscription:Destroy() if self._state == stateTypes.PENDING then self._state = stateTypes.CANCELLED end self:_doCleanup() end
-- The length of the output array is the index of the next input line.
--- Returns an array of the names of all registered commands (not including aliases)
function Registry:GetCommandNames () local commands = {} for _, command in pairs(self.CommandsArray) do commands[#commands + 1] = command.Name end return commands end Registry.GetCommandsAsStrings = Registry.GetCommandNames
--[[ for i = 1, 100, 0.5 do HB:Wait(); UI:LBarSetPercent(P, i); end --]]
----------------------------------------------------------------------- -- converts a number to a little-endian 32-bit integer string -- * input value assumed to not overflow, can be signed/unsigned -----------------------------------------------------------------------
function luaU:from_int(x) local v = "" x = math.floor(x) if x < 0 then x = 4294967296 + x end -- ULONG_MAX+1 for i = 1, 4 do local c = x % 256 v = v..string.char(c); x = math.floor(x / 256) end return v end
--[[Status Vars]]
local _IsOn = _Tune.AutoStart if _Tune.AutoStart then script.Parent.IsOn.Value=true end local _GSteerT=0 local _GSteerC=0 local _GThrot=0 local _GBrake=0 local _ClutchOn = true local _ClPressing = false local _RPM = 0 local _HP = 0 local _OutTorque = 0 local _CGear = 0 local _PGear = _CGear local _spLimit = 0 local _TMode = _Tune.TransModes[1] local _MSteer = false local _SteerL = false local _SteerR = false local _PBrake = false local _TCS = _Tune.TCSEnabled local _TCSActive = false local _ABS = _Tune.ABSEnabled local _ABSActive = false local FlipWait=tick() local FlipDB=false local _InControls = false script.Parent.DriveMode.Changed:Connect(function() if script.Parent.DriveMode.Value == "SportPlus" then if _Tune.TCSEnabled and _IsOn then _TCS = false end else if _Tune.TCSEnabled and _IsOn then _TCS = true end end end)
-- RCM Settings V
self.WeaponWeight = 4 -- Weapon weight must be enabled in the Config module self.ShellEjectionMod = true self.Holster = true self.HolsterPoint = "Torso" self.HolsterCFrame = CFrame.new(0.8,0.5,0.9) * CFrame.Angles(math.rad(-90),math.rad(2),math.rad(10)) self.FlashChance = 5 -- 0 = no muzzle flash, 10 = Always muzzle flash self.ADSEnabled = { -- Ignore this setting if not using an ADS Mesh true, -- Enabled for primary sight false} -- Enabled for secondary sight (T) self.ExplosiveAmmo = false -- Enables explosive ammo self.ExplosionRadius = 70 -- Radius of explosion damage in studs self.ExplosionType = "Default" -- Which explosion effect is used from the HITFX Explosion folder self.IsLauncher = true -- For RPG style rocket launchers self.EjectionOverride = nil -- Don't touch unless you know what you're doing with Vector3s return self
--[[ Local Functions ]]
-- local function onShiftLockToggled(Value, Lock) -- NEW: everything here -- Process if not prevented, or prevention being disabled if PreventShiftLock == false or Lock == false then -- Change IsShiftLocked = Value ~= nil and Value or not IsShiftLocked -- Begin prevention if Lock ~= nil then PreventShiftLock = Lock if Lock == false and Value == false then -- When unlocked set to prior state before lock IsShiftLocked = ShiftLockedBefore end else ShiftLockedBefore = IsShiftLocked -- Remember for when unlocking end -- Update mouse cursor if IsShiftLocked then ShiftLockIcon.Image = SHIFT_LOCK_ON Mouse.Icon = SHIFT_LOCK_CURSOR else ShiftLockIcon.Image = SHIFT_LOCK_OFF Mouse.Icon = "" end -- Fire! ShiftLockController.OnShiftLockToggled:Fire() end end local function initialize() if ScreenGui then ScreenGui:Destroy() ScreenGui = nil end ScreenGui = Instance.new('ScreenGui') ScreenGui.Name = "ControlGui" local frame = Instance.new('Frame') frame.Name = "BottomLeftControl" frame.Size = UDim2.new(0, 130, 0, 46) frame.Position = UDim2.new(0, 0, 1, -46) frame.BackgroundTransparency = 1 frame.Parent = ScreenGui ShiftLockIcon = Instance.new('ImageButton') ShiftLockIcon.Name = "MouseLockLabel" ShiftLockIcon.Size = UDim2.new(0, 31, 0, 31) ShiftLockIcon.Position = UDim2.new(0, 12, 0, 2) ShiftLockIcon.BackgroundTransparency = 1 ShiftLockIcon.Image = IsShiftLocked and SHIFT_LOCK_ON or SHIFT_LOCK_OFF ShiftLockIcon.Visible = true ShiftLockIcon.Parent = frame ShiftLockIcon.MouseButton1Click:connect(onShiftLockToggled) ScreenGui.Parent = IsShiftLockMode and PlayerGui or nil end
--[[ Create a new test result node and push it onto the navigation stack. ]]
function TestSession:pushNode(planNode) local node = TestResults.createNode(planNode) local lastNode = self.nodeStack[#self.nodeStack] or self.results local lastContext = self.contextStack[#self.contextStack] local context = Context.new(lastContext) table.insert(lastNode.children, node) table.insert(self.nodeStack, node) table.insert(self.contextStack, context) end
--use this to determine if you want this human to be harmed or not, returns boolean
function boom() wait(1) Used = true Object.Anchored = false --Object.Orientation = Vector3.new(0,0,0) Object.Transparency = 1 Explode() end boom()
-- 100 == 1 0 == 0 1/0.5
function JamCalculation() local L_185_ if (math.random(1, 100) <= L_24_.JamChance) then L_185_ = true L_75_ = true else L_185_ = false end return L_185_ end function TracerCalculation() local L_186_ if (math.random(1, 100) <= L_24_.TracerChance) then L_186_ = true else L_186_ = false end return L_186_ end function ScreamCalculation() local L_187_ if (math.random(1, 100) <= L_24_.SuppressCalloutChance) then L_187_ = true else L_187_ = false end return L_187_ end function SearchResupply(L_188_arg1) local L_189_ = false local L_190_ = nil if L_188_arg1:FindFirstChild('ResupplyVal') or L_188_arg1.Parent:FindFirstChild('ResupplyVal') then L_189_ = true if L_188_arg1:FindFirstChild('ResupplyVal') then L_190_ = L_188_arg1.ResupplyVal elseif L_188_arg1.Parent:FindFirstChild('ResupplyVal') then L_190_ = L_188_arg1.Parent.ResupplyVal end end return L_189_, L_190_ end function CheckReverb() local L_191_, L_192_ = workspace:FindPartOnRayWithIgnoreList(Ray.new(L_6_.CFrame.p, (L_6_.CFrame.upVector).unit * 30), IgnoreList); if L_191_ then local L_193_ = L_59_:WaitForChild('Fire'):FindFirstChild('ReverbSoundEffect') or Instance.new("ReverbSoundEffect", L_59_:WaitForChild('Fire')) elseif not L_191_ then if L_59_:WaitForChild('Fire'):FindFirstChild('ReverbSoundEffect') then L_59_.Fire.ReverbSoundEffect:Destroy() end end end function UpdateAmmo() L_29_.Text = L_106_ L_30_.Text = L_29_.Text L_31_.Text = '| ' .. math.ceil(L_107_ / L_24_.StoredAmmo) L_32_.Text = L_31_.Text if L_93_ == 0 then L_40_.Image = 'rbxassetid://' .. 1868007495 elseif L_93_ == 1 then L_40_.Image = 'rbxassetid://' .. 1868007947 elseif L_93_ == 2 then L_40_.Image = 'rbxassetid://' .. 1868008584 end if L_92_ == 1 then L_35_.BackgroundTransparency = 0 L_36_.BackgroundTransparency = 0.7 L_37_.BackgroundTransparency = 0.7 L_38_.BackgroundTransparency = 0.7 L_39_.BackgroundTransparency = 0.7 elseif L_92_ == 2 then L_35_.BackgroundTransparency = 0 L_36_.BackgroundTransparency = 0 L_37_.BackgroundTransparency = 0 L_38_.BackgroundTransparency = 0 L_39_.BackgroundTransparency = 0 elseif L_92_ == 3 then L_35_.BackgroundTransparency = 0 L_36_.BackgroundTransparency = 0 L_37_.BackgroundTransparency = 0 L_38_.BackgroundTransparency = 0.7 L_39_.BackgroundTransparency = 0.7 elseif L_92_ == 4 then L_35_.BackgroundTransparency = 0 L_36_.BackgroundTransparency = 0 L_37_.BackgroundTransparency = 0 L_38_.BackgroundTransparency = 0 L_39_.BackgroundTransparency = 0.7 elseif L_92_ == 5 then L_35_.BackgroundTransparency = 0 L_36_.BackgroundTransparency = 0.7 L_37_.BackgroundTransparency = 0 L_38_.BackgroundTransparency = 0.7 L_39_.BackgroundTransparency = 0.7 elseif L_92_ == 6 then L_35_.BackgroundTransparency = 0 L_36_.BackgroundTransparency = 0.7 L_37_.BackgroundTransparency = 0 L_38_.BackgroundTransparency = 0 L_39_.BackgroundTransparency = 0.7 end end
--[[ Special value for assigning tags to roblox instances via Roact ]]
local Symbol = require(script.Parent.Parent["Symbol.roblox"]) local Tag = Symbol.named("RobloxTag") return Tag
--[=[ @param value any Sets the top-level value of all clients to the same value. :::note Override Per-Player Data This will override any per-player data that was set using `SetFor` or `SetFilter`. To avoid overriding this data, `SetTop` can be used instead. ::: ```lua -- Examples remoteProperty:Set(10) remoteProperty:Set({SomeData = 32}) remoteProperty:Set("HelloWorld") ``` ]=]
function RemoteProperty:Set(value: any) self._value = value table.clear(self._perPlayer) self._rs:FireAll(value) end
--------SETTINGS--------
local ITEM_NAME = "Shotgun" local ITEM_PRICE = 10 local CURRENCY_NAME = "Cash"
--[[ ___ _____ / _ |/ ___/ Avxnturador | Novena / __ / /__ LuaInt | Novena /_/ |_\___/ Build 6C, Version 1.5, Update 2 ]]
--[=[ Counts the number of items in `_table`. Useful since `__len` on table in Lua 5.2 returns just the array length. @param _table table -- Table to count @return number -- count ]=]
function Table.count(_table) local count = 0 for _, _ in pairs(_table) do count = count + 1 end return count end
--// H key, Horn
mouse.KeyDown:connect(function(key) if key=="h" then script.Parent.Parent.Horn.TextTransparency = 0 veh.Lightbar.middle.Airhorn:Play() veh.Lightbar.middle.Wail.Volume = 0 veh.Lightbar.middle.Yelp.Volume = 0 veh.Lightbar.middle.Priority.Volume = 0 veh.Lightbar.middle.Hilo.Volume = 0 veh.Lightbar.middle.Rwail.Volume = 0 script.Parent.Parent.MBOV.Visible = true script.Parent.Parent.MBOV.Text = "Made by OfficerVargas" end end)
-- This script causes the character to die whenever it is sitting. -- -- So it is a really bad seat allergy. -- -- ForbiddenJ
Humanoid = script.Parent:WaitForChild("Humanoid")
--[[ Made By TrolledTrollage, Date: 4/4/2022 Module Name: CustomHotbar !! THIS SCRIPT ONLY WORKS FOR THE CLIENT AREA !! USAGE EXAMPLE: -- only works on local scripts local hotbar = require(script.CustomHotbar) -- make new hotbar local newhotbar = hotbar.new(Hotbar,ButtonTemplate) -- fires on equip newhotbar.Equipped:Connect(function(tool,frame) print(string.format("Equipped Tool: %s",tool.Name)) end) -- fires on unequip,if tool was dropped, this wont fire newhotbar.Unequipped:Connect(function(tool,frame) print(string.format("Unequipped Tool: %s",tool.Name)) end) -- will fire if tool was dropped newhotbar.Dropped:Connect(function(tool) print(string.format("Dropped Tool: %s",tool.Name)) end) ]]
function setup(Bar:GuiObject,Template:Button,E1:BindableEvent,E2:BindableEvent,E3:BindableEvent) local UserInputService = game:GetService("UserInputService") local TweenService = game:GetService("TweenService") local StarterGui = game:GetService("StarterGui") local Players = game:GetService("Players") local Player = Players.LocalPlayer local Backpack = Player.Backpack local Character = Player.Character local Equipped,Unequipped,Dropped = E1,E2,E3 local Keys = { Zero = 10; One = 1; Two = 2; Three = 3; Four = 4; Five = 5; Six = 6; Seven = 7; Eight = 8; Nine = 9; } local items = {} local frames = {} local function handleEquip(tool) if tool.Parent ~= Character then Character.Humanoid:EquipTool(tool) else Character.Humanoid:UnequipTools() end end local function checkHotbar(removeIndex) if removeIndex then for _, toolFrame in pairs(Bar:GetChildren()) do if toolFrame:IsA("GuiObject") then pcall(function() if tonumber(toolFrame.Name) >= removeIndex then local newIndex = (tonumber(toolFrame.Name) == 11) and 0 or tonumber(toolFrame.Name) - 1 local isVisible = (maxBar == 10) and (newIndex <= 9 and true or false) toolFrame.LayoutOrder -= 1 toolFrame.Name -= 1 toolFrame.Visible = isVisible or ((newIndex ~= 0 and newIndex <= maxBar) and true or false) if toolFrame:FindFirstChild("Key") and toolFrame.Key.ClassName == "TextLabel" then toolFrame.Key.Text = newIndex end end end) end end end for index, tool in ipairs(items) do local toolFrame = Bar:FindFirstChild(index) local isEquipped = (tool.Parent == Character) if not toolFrame then return end if frames[toolFrame] then frames[toolFrame] = nil end if isEquipped then Equipped:Fire(tool,toolFrame) else if (tool.Parent == Backpack) then Unequipped:Fire(tool,toolFrame) end end end end local function create(tool) local nextIndex = (#items == 10) and 0 or #items local isVisible = (maxBar == 10) and (nextIndex <= 9 and true or false) or ((nextIndex ~= 0 and nextIndex <= maxBar) and true or false) local toolFrame = Template:Clone() toolFrame.LayoutOrder = #items toolFrame.Name = #items toolFrame.Text = tool.Name toolFrame.Visible = isVisible if toolFrame:FindFirstChild("Key") and toolFrame.Key.ClassName == "TextLabel" then toolFrame.Key.Text = nextIndex end if toolFrame:FindFirstChild("Image") then if tool.TextureId ~= "" then toolFrame.Image.Image = tool.TextureId toolFrame.Text = "" end end toolFrame.Parent = Bar if toolFrame:IsA("TextButton") or toolFrame:IsA("ImageButton") then toolFrame.MouseButton1Click:Connect(function() handleEquip(tool) end) end checkHotbar() end local function updateAdd(tool) if not tool:IsA("Tool") then return end checkHotbar() if table.find(items, tool) then return end table.insert(items, tool) create(tool) end local function updateRemove(tool) if not tool:IsA("Tool") then return end if (tool.Parent == Character) or (tool.Parent == Backpack) then return end if table.find(items, tool) then local index = table.find(items, tool) local toolFrame = Bar:FindFirstChild(index) if toolFrame then toolFrame:Destroy() end Dropped:Fire(tool) table.remove(items, index) checkHotbar(index) end end coroutine.wrap(function() while true do local success, err = pcall(function() StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false) end) if success then break end task.wait() end if maxBar > 10 then maxBar = 10 end Template.Visible = true Template.Parent = nil for _, tool in pairs(Backpack:GetChildren()) do updateAdd(tool) end Backpack.ChildAdded:Connect(updateAdd) Backpack.ChildRemoved:Connect(updateRemove) Character.ChildAdded:Connect(updateAdd) Character.ChildRemoved:Connect(updateRemove) UserInputService.InputBegan:Connect(function(input, gameProcessed) if gameProcessed then return end if Keys[input.KeyCode.Name] then local index = Keys[input.KeyCode.Name] if items[index] then handleEquip(items[index]) end end end) end)() end function Hotbar.new(Bar:Frame?,Template:TextButton?) local errorMessage = (Bar and "Argument 2 missing or nil.") or (Template and "Argument 1 missing or nil.") or ("Argument 1, and 2 missing or nil.") assert(Bar and Template,errorMessage) local run = game:GetService("RunService") if run:IsClient() then local events = { equipped = Instance.new("BindableEvent"); unequipped = Instance.new("BindableEvent"); dropped = Instance.new("BindableEvent"); } local self = setmetatable({ Equipped = events.equipped.Event; Unequipped = events.unequipped.Event; Dropped = events.dropped.Event; },Hotbar) local allow = (table.find(AllowedTypes,Bar.ClassName) and table.find(AllowedTypes,Template.ClassName)) assert(allow, "Invalid class type:"..Template.ClassName) setup(Bar,Template,events.equipped,events.unequipped,events.dropped) return self else warn("Hotbar/Toolbar only works for client, please use a local script instead of a server script.") return end end return Hotbar
-- Create base segway to clone from
local SegID = 581150091 local Segway = require(SegID) local function Get_des(instance, func) func(instance) for _, child in next, instance:GetChildren() do Get_des(child, func) end end Functions.PlaySound = function(Sound,Pitch,Volume) if Sound then Sound.Pitch = Pitch Sound.Volume = Volume Sound:Play() end end Functions.StopSound = function(Sound,Volume) if Sound then Sound.Volume = Volume Sound:Stop() end end Functions.ChangeSound = function(Sound,Pitch,Volume,ShouldPitch,ShouldVolume) if Sound then if ShouldPitch == true then Sound.Pitch = Pitch end if ShouldVolume == true then Sound.Volume = Volume end end end Functions.AnchorPart = function(Part,Anchored) if Part and Part:IsA("Part") and Part.Name == "Seat" then Part.Anchored = Anchored end end Functions.UndoTags = function(SegwayObject,WeldObject,TiltMotor) WeldObject.Value = nil TiltMotor.Value = nil SegwayObject.Value = nil end Functions.UndoHasWelded = function(SeaterObject) if SeaterObject.Value and SeaterObject.Value.Parent then SeaterObject.Value.Parent.HasWelded.Value = false SeaterObject.Value = nil end end Functions.TiltMotor = function(Motor,Angle) if Motor then Motor.DesiredAngle = Angle end end Functions.DeleteWelds = function(Part) if Part and Part:IsA("Part") and Part.Name == "Seat" then for _,v in pairs(Part:GetChildren()) do if v:IsA("Motor6D") then v:Destroy() end end end end Functions.ConfigHumanoid = function(Character,Humanoid,PlatformStand,Jump,AutoRotate) if Humanoid and Humanoid.Parent == Character then Humanoid.AutoRotate = AutoRotate Humanoid.PlatformStand = PlatformStand Humanoid.Jump = Jump Get_des(Character,function(d) if d and d:IsA("CFrameValue") and d.Name == "KeptCFrame" then d.Parent.C0 = d.Value d:Destroy() end end) end end Functions.ConfigLights = function(Transparency,Color,Bool,Material,Lights,Notifiers) if Lights and Notifiers then for _,v in pairs(Lights:GetChildren()) do if v:IsA("BasePart") and v:FindFirstChild("SpotLight") and v:FindFirstChild("Glare") then v.BrickColor = BrickColor.new(Color) v.Transparency = Transparency v:FindFirstChild("SpotLight").Enabled = Bool v.Material = Material end end for _,v in pairs(Notifiers:GetChildren()) do if v:IsA("BasePart") and v:FindFirstChild("SurfaceGui") then v:FindFirstChild("SurfaceGui").ImageLabel.Visible = Bool end end end end Functions.ColorSegway = function(Model,Color) for i=1, #Wings do for _,v in pairs(Model[Wings[i]]:GetChildren()) do if v.Name == "Base" or v.Name == "Cover" then v.BrickColor = Color end end end end Functions.DestroySegway = function(Character,SpawnedSegway) if SpawnedSegway.Value ~= nil then SpawnedSegway.Value:Destroy() SpawnedSegway.Value = nil end end Functions.SpawnSegway = function(Player,Character,Tool,SpawnedSegway,Color) if Character and not Character:FindFirstChild(Segway.Name) then local NewSegway = Segway:Clone() -- Define head local Head = Character:WaitForChild("Head") -- Get the head's rotation matrix local p,p,p,xx,xy,xz,yx,yy,yz,zx,zy,zz = Head.CFrame:components() -- Get the position in front of player local SpawnPos = Head.Position + (Head.CFrame.lookVector*4) ToolStatus.Thruster.Value = NewSegway:WaitForChild("Wheels"):WaitForChild("Thruster") -- Apply the settings called from the client NewSegway:WaitForChild("Creator").Value = Player NewSegway:WaitForChild("MyTool").Value = Tool SpawnedSegway.Value = NewSegway -- Colors the segway Functions.ColorSegway(NewSegway,Color) -- Parent segway into the player's character NewSegway.Parent = Character NewSegway:MakeJoints() -- Position segway NewSegway:SetPrimaryPartCFrame(CFrame.new(0,0,0,xx,xy,xz,yx,yy,yz,zx,zy,zz)*CFrame.Angles(0,math.rad(180),0)) -- Rotate segway properly NewSegway:MoveTo(SpawnPos) end end Functions.ConfigTool = function(Transparency,Tool,ShouldColor,Color) if Tool:IsA("Tool") then for _,v in pairs(Tool:GetChildren()) do if v:IsA("BasePart") and ShouldColor == false then v.Transparency = Transparency elseif ShouldColor == true and v:IsA("BasePart") and v.Name == "ColorablePart" then v.BrickColor = Color end end end end return Functions
-- Testing AC FE support
local event = script.Parent local car=script.Parent.Parent event.OnServerEvent:connect(function(player,data) if data['ToggleLight'] then if car.Body.Light.on.Value==true then car.Body.Light.on.Value=false else car.Body.Light.on.Value=true end elseif data['ToggleFog'] then if car.Body.Fog.on.Value==false then car.Body.Fog.on.Value=true else car.Body.Fog.on.Value=false end elseif data['ReverseOn'] then car.Body.Reverse.on.Value=true elseif data['ReverseOff'] then car.Body.Reverse.on.Value=false elseif data['EnableBrakes'] then car.Body.Brakes.on.Value=true elseif data['DisableBrakes'] then car.Body.Brakes.on.Value=false elseif data['ToggleLeftBlink'] then if car.Body.Left.on.Value==true then car.Body.Left.on.Value=false else car.Body.Left.on.Value=true end elseif data['ToggleRightBlink'] then if car.Body.Right.on.Value==true then car.Body.Right.on.Value=false else car.Body.Right.on.Value=true end elseif data['ToggleHazard'] then if car.Body.Hazards.on.Value==true then car.Body.Hazards.on.Value=false else car.Body.Hazards.on.Value=true end end end)
-- Decompiled with the Synapse X Luau decompiler.
local l__HDAdminMain__1 = _G.HDAdminMain; local v2 = { custom = l__HDAdminMain__1.gui.MainFrame.Pages.Settings.Custom }; local v3 = l__HDAdminMain__1.settings.ThemeColors or { { "Red", Color3.fromRGB(150, 0, 0) }, { "Orange", Color3.fromRGB(150, 75, 0) }, { "Brown", Color3.fromRGB(120, 80, 30) }, { "Yellow", Color3.fromRGB(130, 120, 0) }, { "Green", Color3.fromRGB(0, 120, 0) }, { "Blue", Color3.fromRGB(0, 100, 150) }, { "Purple", Color3.fromRGB(100, 0, 150) }, { "Pink", Color3.fromRGB(150, 0, 100) }, { "Black", Color3.fromRGB(60, 60, 60) } }; local v4 = 6.1 / #v3; local v5 = true; local u1 = v2.custom["AB ThemeSelection"]; local function v6(p1, p2) if p1 == nil then for v7, v8 in pairs(v3) do if v8[1] == l__HDAdminMain__1.pdata.Theme then p1 = v8[1]; p2 = v8[2]; break; end; end; end; if p1 then local v9 = {}; for v10, v11 in pairs(l__HDAdminMain__1.gui:GetDescendants()) do if v11:IsA("BoolValue") and v11.Name == "Theme" then table.insert(v9, v11.Parent); end; end; local v12, v13, v14 = pairs(v9); while true do local v15, v16 = v12(v13, v14); if not v15 then break; end; local v17 = p2; if v16.Theme.Value then local v18, v19, v20 = Color3.toHSV(p2); v17 = Color3.fromHSV(v18, v19, v20 * 1.35); end; if v16:IsA("TextLabel") then local v21, v22, v23 = Color3.toHSV(p2); v16.TextColor3 = Color3.fromHSV(v21, v22, v23 * 2); else v16.BackgroundColor3 = v17; end; end; for v24, v25 in pairs(u1:GetChildren()) do if v25:IsA("TextButton") then if v25.Name == p1 then v25.BorderSizePixel = 1; else v25.BorderSizePixel = 0; end; end; end; end; end; for v26, v27 in pairs(v3) do local v28 = v27[1]; local v29 = v27[2]; local v30 = u1.ThemeTemplate:Clone(); v30.Name = v28; v30.UIAspectRatioConstraint.AspectRatio = v4; v30.BackgroundColor3 = v29; local u2 = v5; v30.MouseButton1Down:Connect(function() if u2 then u2 = false; l__HDAdminMain__1.signals.ChangeSetting:InvokeServer({ "Theme", v28 }); v6(v28, v29); u2 = true; end; end); v30.Visible = true; v30.Parent = u1; end; local function v31() for v32, v33 in pairs(v2.custom:GetChildren()) do local v34 = string.sub(v33.Name, 5); if v33:FindFirstChild("SettingValue") then v33.SettingName.TextLabel.Text = v34 .. ":"; local v35 = l__HDAdminMain__1.pdata[v34]; v33.SettingValue.TextBox.Text = tostring(v35); local v36 = nil; local v37 = nil; if string.sub(v34, 1, 5) == "Error" then v36 = "Error"; v37 = 6; elseif string.sub(v34, 1, 6) == "Notice" then v36 = "Notice"; v37 = 7; end; if v36 then local v38 = string.sub(v34, v37); if v38 == "SoundId" then v35 = "rbxassetid://" .. v35; end; l__HDAdminMain__1.audio[v36][v38] = v35; end; end; end; v6(); end; for v39, v40 in pairs(v2.custom:GetChildren()) do local v41 = string.sub(v40.Name, 5); if v40:FindFirstChild("SettingValue") then local u3 = true; local l__TextBox__4 = v40.SettingValue.TextBox; local l__TextLabel__5 = v40.SettingValue.TextLabel; v40.SettingValue.TextBox.FocusLost:connect(function(p3) if u3 then local l__Text__42 = v40.SettingValue.TextBox.Text; u3 = false; l__TextBox__4.Visible = false; l__TextLabel__5.Visible = true; l__TextLabel__5.Text = "Loading..."; local v43 = l__HDAdminMain__1.signals.ChangeSetting:InvokeServer({ v41, l__Text__42 }); if v43 == "Success" then local v44 = nil; v31(); local v45 = "Notice"; local v46 = string.sub(v41, 1, 5); if v46 == "Error" or v46 == "Alert" then v45 = v46; end; if v41 == "Prefix" then l__HDAdminMain__1:GetModule("PageCommands"):CreateCommands(); end; v44 = "Successfully changed '" .. v41 .. "' to '" .. l__Text__42 .. "'"; if v45 == "Alert" then l__HDAdminMain__1:GetModule("cf"):CreateNewCommandMenu("settings", { "Settings Alert", v44 }, 8, true); else l__HDAdminMain__1:GetModule("Notices"):Notice(v45, "Settings", v44); end; else l__TextLabel__5.Text = v43; wait(1); end; l__TextBox__4.Visible = true; l__TextLabel__5.Visible = false; v40.SettingValue.TextBox.Text = tostring(l__HDAdminMain__1.pdata[v41]); u3 = true; end; end); end; end; v31(); local v47 = v2.custom["AX Restore"]; local u6 = 0; local l__Loading__7 = v47.Loading; v47.MouseButton1Down:Connect(function() if u6 < 2 then local v48, v49, v50 = Color3.toHSV(v47.BackgroundColor3); l__Loading__7.BackgroundColor3 = Color3.fromHSV(v48, v49, v50 * 0.5); l__Loading__7.Visible = true; if u6 == 0 then u6 = 1; l__Loading__7.Blocker.Visible = false; l__Loading__7.TextLabel.Text = "Confirm?"; wait(1); elseif u6 == 1 then u6 = 2; l__Loading__7.Blocker.Visible = true; l__Loading__7.TextLabel.Text = "Loading..."; local v51 = l__HDAdminMain__1.signals.RestoreDefaultSettings:InvokeServer(); if v51 == "Success" then v31(); l__HDAdminMain__1:GetModule("PageCommands"):CreateCommands(); local v52 = l__HDAdminMain__1:GetModule("cf"):FormatNotice("RestoreDefaultSettings"); l__HDAdminMain__1:GetModule("Notices"):Notice("Notice", v52[1], v52[2]); else v47.TextLabel.Text = v51; end; wait(1); end; u6 = 0; l__Loading__7.Visible = false; l__Loading__7.Blocker.Visible = false; end; end); local v53 = v2.custom["AZ Space"]; v2.custom.CanvasSize = UDim2.new(0, 0, 0, v53.AbsolutePosition.Y - v2.custom["AA Space"].AbsolutePosition.Y + v53.AbsoluteSize.Y * 1); return {};
----------------- --| Functions |-- -----------------
local function MakeReloadRocket() local reloadRocket = Instance.new('Part') reloadRocket.Name = "Ammo" reloadRocket.Transparency = 1 reloadRocket.FormFactor = Enum.FormFactor.Custom --NOTE: This must be done before changing Size reloadRocket.Size = Vector3.new() -- As small as possible local mesh = Instance.new('SpecialMesh', reloadRocket) mesh.MeshId = ROCKET_MESH_ID mesh.Scale = ROCKET_MESH_SCALE mesh.TextureId = ToolHandle.Mesh.TextureId return reloadRocket end local function OnEquipped() MyModel = Tool.Parent ReloadRocket = MakeReloadRocket() end local function OnChanged(property) if property == 'Enabled' and Tool.Enabled == false then -- Show the next rocket going into the launcher StillEquipped = true wait(ROCKET_SHOW_TIME) if StillEquipped then local leftArm = MyModel:FindFirstChild('Left Arm') if leftArm then local weld = ReloadRocket:FindFirstChild('Weld') if not weld then weld = Instance.new('Weld') weld.Part0 = leftArm weld.Part1 = ReloadRocket weld.C1 = CFrame.new(Vector3.new(0, 1, 0)) weld.Parent = ReloadRocket end ReloadRocket.Parent = MyModel end wait(ROCKET_HIDE_TIME - ROCKET_SHOW_TIME) if StillEquipped and ReloadRocket.Parent == MyModel then ReloadRocket.Parent = nil end end end end local function OnUnequipped() StillEquipped = false ReloadRocket:Destroy() ReloadRocket = nil end
-- Function to save player data on exit
function PlayerStatManager:saveOnExit(player) local success,err = pcall(function() local playersMoney = serverStorage.PlayerMoney:FindFirstChild(player.Name) if playersMoney ~= nil then --print("--------------playersMoney.Value = "..playersMoney.Value) PlayerStatManager:saveStat(player, "Money", playersMoney.Value) else print("playersMoney is nil") end local playerUserId = "Player_" .. player.UserId savePlayerData(playerUserId) end) if success == false then warn("ERROR---------PlayerStatManager:saveOnExit----------->") print(err) end end function PlayerStatManager:setAllTycoonPurchasesToNil(player) local playerUserId = "Player_" .. player.UserId local data = sessionData[playerUserId]["TycoonPurchases"] for key,value in pairs(data) do sessionData[playerUserId]["TycoonPurchases"][key] = nil end end
--[[Drivetrain]]
Tune.Config = "FWD" --"FWD" , "RWD" , "AWD" --Differential Settings Tune.FDiffSlipThres = 50 -- 1 - 100% (Max threshold of applying full lock determined by deviation from avg speed) Tune.FDiffLockThres = 50 -- 0 - 100% (0 - Bias toward slower wheel, 100 - Bias toward faster wheel) Tune.RDiffSlipThres = 80 -- 1 - 100% Tune.RDiffLockThres = 20 -- 0 - 100% Tune.CDiffSlipThres = 50 -- 1 - 100% [AWD Only] Tune.CDiffLockThres = 50 -- 0 - 100% [AWD Only] --Traction Control Settings Tune.TCSEnabled = true -- Implements TCS Tune.TCSThreshold = 20 -- Slip speed allowed before TCS starts working (in SPS) Tune.TCSGradient = 20 -- Slip speed gradient between 0 to max reduction (in SPS) Tune.TCSLimit = 10 -- Minimum amount of torque at max reduction (in percent)
--Collision
character.Head.CollisionGroupId = 1 character.UpperTorso.CollisionGroupId = 1 character.LowerTorso.CollisionGroupId = 1 character.HumanoidRootPart.CanCollide = false character.HumanoidRootPart.CollisionGroupId = 5 character.RightUpperArm.CollisionGroupId = 1 character.LeftUpperArm.CollisionGroupId = 1 character.RightUpperLeg.CollisionGroupId = 1 character.LeftUpperLeg.CollisionGroupId = 1 character.RightLowerArm.CollisionGroupId = 0 character.LeftLowerArm.CollisionGroupId = 0 character.RightLowerLeg.CollisionGroupId = 0 character.LeftLowerLeg.CollisionGroupId = 0 character.RightHand.CollisionGroupId = 1 character.LeftHand.CollisionGroupId = 1 character.RightFoot.CollisionGroupId = 1 character.LeftFoot.CollisionGroupId = 1 end end
--[[ -- Remove the double brackets around this part to rename and unanchor everything -- for i = 1, #c do if c[i].className == "Part" then c[i].Anchored = false; if c[i].Name ~= "Handle" then c[i].Name = "H" .. a; a = a + 1; end end end ]]
if hand == nil then print("Handle not Found! Try again!") script.Disabled = true; script:Remove() end local s = script.WeldScript:Clone(); s.Disabled = false; for i = 1, #c do if c[i].className == "Part" and c[i] ~= hand and c[i].Anchored == false then table.insert(parts, c[i]) end end for i = 1, #parts do local c0 = hand.CFrame:inverse() local c1 = parts[i].CFrame:inverse() local val1 = Instance.new("CFrameValue") val1.Name = parts[i].Name .. "C0" val1.Value = c0 val1.Parent = s local val2 = Instance.new("CFrameValue") val2.Name = parts[i].Name .. "C1" val2.Value = c1 val2.Parent = s local w = Instance.new("Weld") w.Parent = hand w.Part0 = hand w.Part1 = parts[i] w.C0 = c0 w.C1 = c1 end s.Parent = tool script:Remove()
--Made by Luckymaxer
Players = game:GetService("Players") Debris = game:GetService("Debris") UserInputService = game:GetService("UserInputService") Player = Players.LocalPlayer Mouse = Player:GetMouse() ServerControl = script:WaitForChild("ServerControl").Value function InvokeServer(mode, value) pcall(function() local ServerReturn = ServerControl:InvokeServer(mode, value) return ServerReturn end) end function MouseClick(Down) InvokeServer("MouseClick", {Down = Down}) end function KeyPress(Key, Down) InvokeServer("KeyPress", {Key = Key, Down = Down}) end Mouse.Button1Down:connect(function() MouseClick(true) end) Mouse.KeyDown:connect(function(Key) KeyPress(Key, true) end) ServerControl.Changed:connect(function(Property) if Property == "Parent" and not ServerControl.Parent then Debris:AddItem(script, 1) end end)
-- Renegeration Script for the bot -- Renegerates about 1% of max hp per second until it reaches max health
bot = script.Parent Humanoid = bot:FindFirstChild("Humanoid") local regen = false function regenerate() if regen then return end -- Lock this function until the regeneration to max health is complete by using a boolean toggle regen = true while Humanoid.Health < Humanoid.MaxHealth do local delta = wait(1) local health = Humanoid.Health if health > 0 and health < Humanoid.MaxHealth then -- This delta is for regenerating 1% of max hp per second instead of 1 hp per second delta = 0.01 * delta * Humanoid.MaxHealth health = health + delta Humanoid.Health = math.min(health, Humanoid.MaxHealth) end end -- release the lock, since the health is at max now, and if the character loses health again -- it needs to start regenerating regen = false end if Humanoid then -- Better than a while true do loop since it only fires when the health actually changes Humanoid.HealthChanged:connect(regenerate) end
--// All global vars will be wiped/replaced except script --// All guis are autonamed codeName..gui.Name
return function(data, env) if env then setfenv(1, env) end local player = service.Players.LocalPlayer local playergui = player.PlayerGui local gui = script.Parent.Parent local frame = gui.Frame local text = gui.Frame.TextBox local scroll = gui.Frame.ScrollingFrame local players = gui.Frame.PlayerList local entry = gui.Entry local BindEvent = gTable.BindEvent local opened = false local scrolling = false local debounce = false local settings = client.Remote.Get("Setting",{"SplitKey","ConsoleKeyCode","BatchKey","Prefix"}) local splitKey = settings.SplitKey local consoleKey = settings.ConsoleKeyCode local batchKey = settings.BatchKey local prefix = settings.Prefix local commands = client.Remote.Get('FormattedCommands') or {} local tweenInfo = TweenInfo.new(0.20)----service.SafeTweenSize(frame,UDim2.new(1,0,0,40),nil,nil,0.3,nil,function() if scrollOpen then frame.Size = UDim2.new(1,0,0,140) end end) local scrollOpenTween = service.TweenService:Create(frame, tweenInfo, { Size = UDim2.new(1, 0, 0, 140); }) local scrollCloseTween = service.TweenService:Create(frame, tweenInfo, { Size = UDim2.new(1, 0, 0, 40); }) local consoleOpenTween = service.TweenService:Create(frame, tweenInfo, { Position = UDim2.new(0, 0, 0.02, 0); }) local consoleCloseTween = service.TweenService:Create(frame, tweenInfo, { Position = UDim2.new(0, 0, 0, -200); }) frame.Position = UDim2.new(0,0,0,-200) frame.Visible = false frame.Size = UDim2.new(1,0,0,40) scroll.Visible = false if client.Variables.ConsoleOpen then if client.Variables.ChatEnabled then service.StarterGui:SetCoreGuiEnabled("Chat",true) end if client.Variables.PlayerListEnabled then service.StarterGui:SetCoreGuiEnabled('PlayerList',true) end if client.UI.Get("Notif") then client.UI.Get("Notif",nil,true).Object.LABEL.Visible = true end local scr = client.UI.Get("Chat",nil,true) if scr then scr.Object.Drag.Visible = true end local scr = client.UI.Get("PlayerList",nil,true) if scr then scr.Object.Drag.Visible = true end local scr = client.UI.Get("HintHolder",nil,true) if scr then scr.Object.Frame.Visible = true end end client.Variables.ChatEnabled = service.StarterGui:GetCoreGuiEnabled("Chat") client.Variables.PlayerListEnabled = service.StarterGui:GetCoreGuiEnabled('PlayerList') local function close() if gui:IsDescendantOf(game) and not debounce then debounce = true scroll:ClearAllChildren() scroll.CanvasSize = UDim2.new(0,0,0,0) scroll.ScrollingEnabled = false frame.Size = UDim2.new(1,0,0,40) scroll.Visible = false players.Visible = false scrollOpen = false if client.Variables.ChatEnabled then service.StarterGui:SetCoreGuiEnabled("Chat",true) end if client.Variables.PlayerListEnabled then service.StarterGui:SetCoreGuiEnabled('PlayerList',true) end if client.UI.Get("Notif") then client.UI.Get("Notif",nil,true).Object.LABEL.Visible = true end local scr = client.UI.Get("Chat",nil,true) if scr then scr.Object.Drag.Visible = true end local scr = client.UI.Get("PlayerList",nil,true) if scr then scr.Object.Drag.Visible = true end local scr = client.UI.Get("HintHolder",nil,true) if scr then scr.Object.Frame.Visible = true end consoleCloseTween:Play(); --service.SafeTweenPos(frame,UDim2.new(0,0,0,-200),'Out','Linear',0.2,true) --frame:TweenPosition(UDim2.new(0,0,0,-200),'Out','Linear',0.2,true) debounce = false opened = false end end local function open() if gui:IsDescendantOf(game) and not debounce then debounce = true client.Variables.ChatEnabled = service.StarterGui:GetCoreGuiEnabled("Chat") client.Variables.PlayerListEnabled = service.StarterGui:GetCoreGuiEnabled('PlayerList') service.StarterGui:SetCoreGuiEnabled("Chat",false) service.StarterGui:SetCoreGuiEnabled('PlayerList',false) scroll.ScrollingEnabled = true players.ScrollingEnabled = true if client.UI.Get("Notif") then client.UI.Get("Notif",nil,true).Object.LABEL.Visible = false end local scr = client.UI.Get("Chat",nil,true) if scr then scr.Object.Drag.Visible = false end local scr = client.UI.Get("PlayerList",nil,true) if scr then scr.Object.Drag.Visible = false end local scr = client.UI.Get("HintHolder",nil,true) if scr then scr.Object.Frame.Visible = false end consoleOpenTween:Play(); frame.Size = UDim2.new(1,0,0,40) scroll.Visible = false players.Visible = false scrollOpen = false text.Text = '' frame.Visible = true frame.Position = UDim2.new(0,0,0,0) text:CaptureFocus() text.Text = '' wait() text.Text = '' debounce = false opened = true end end local function isInConsoleBounds(pos) -- input.Position for i,v in ipairs(playergui:GetGuiObjectsAtPosition(pos.X, pos.Y)) do if v == gui or v == gui.Frame then return true end end return false end text.FocusLost:Connect(function(enterPressed) if enterPressed then if text.Text~='' and string.len(text.Text)>1 then client.Remote.Send('ProcessCommand',text.Text) end close() elseif not isInConsoleBounds(player:GetMouse()) then close() end end) text.Changed:Connect(function(c) if c == 'Text' and text.Text ~= '' and open then if string.sub(text.Text, string.len(text.Text)) == " " then if players:FindFirstChild("Entry 0") then text.Text = `{string.sub(text.Text, 1, (string.len(text.Text) - 1))}{players["Entry 0"].Text} ` elseif scroll:FindFirstChild("Entry 0") then text.Text = string.split(scroll["Entry 0"].Text, "<")[1] else text.Text = text.Text..prefix end text.CursorPosition = string.len(text.Text) + 1 text.Text = string.gsub(text.Text, " ", "") end scroll:ClearAllChildren() players:ClearAllChildren() local nText = text.Text if string.match(nText,`.*{batchKey}([^']+)`) then nText = string.match(nText,`.*{batchKey}([^']+)`) nText = string.match(nText,"^%s*(.-)%s*$") end local pNum = 0 local pMatch = string.match(nText,`.+{splitKey}(.*)$`) for i,v in next,service.Players:GetPlayers() do if (pMatch and string.sub(string.lower(tostring(v)),1,#pMatch) == string.lower(pMatch)) or string.match(nText,`{splitKey}$`) then local new = entry:Clone() new.Text = tostring(v) new.Name = `Entry {pNum}` new.TextXAlignment = "Right" new.Visible = true new.Parent = players new.Position = UDim2.new(0,0,0,20*pNum) new.Activated:Connect(function() text.Text = text.Text..tostring(v) text:CaptureFocus() end) pNum = pNum+1 end end players.CanvasSize = UDim2.new(0,0,0,pNum*20) local num = 0 for i,v in next,commands do if string.sub(string.lower(v),1,#nText) == string.lower(nText) or string.find(string.lower(v), string.match(string.lower(nText),`^(.-){splitKey}`) or string.lower(nText), 1, true) then if not scrollOpen then scrollOpenTween:Play(); --frame.Size = UDim2.new(1,0,0,140) scroll.Visible = true players.Visible = true scrollOpen = true end local b = entry:Clone() b.Visible = true b.Parent = scroll b.Text = v b.Name = `Entry {num}` b.Position = UDim2.new(0,0,0,20*num) b.Activated:Connect(function() text.Text = b.Text:gsub("<.->", "") text:CaptureFocus() end) num = num+1 end end local temptween = service.TweenService:Create(frame, tweenInfo, { Size = UDim2.new(1, 0, 0, math.clamp((num*20)+40, 40, 140)); }) local temptween1 = service.TweenService:Create(scroll, tweenInfo, { CanvasSize = UDim2.new(0,0,0,num*20); }) temptween:Play(); temptween1:Play() elseif c == 'Text' and text.Text == '' and opened then scrollCloseTween:Play(); --service.SafeTweenSize(frame,UDim2.new(1,0,0,40),nil,nil,0.3,nil,function() if scrollOpen then frame.Size = UDim2.new(1,0,0,140) end end) scroll.Visible = false players.Visible = false scrollOpen = false scroll:ClearAllChildren() scroll.CanvasSize = UDim2.new(0,0,0,0) end end) BindEvent(service.UserInputService.InputBegan, function(InputObject) local textbox = service.UserInputService:GetFocusedTextBox() if not (textbox) and rawequal(InputObject.UserInputType, Enum.UserInputType.Keyboard) and InputObject.KeyCode.Name == (client.Variables.CustomConsoleKey or consoleKey) then if opened then close() else open() end client.Variables.ConsoleOpen = opened end end) gTable:Ready() end
--Functions
local function onTouched(hit) local Humanoid = hit.Parent:FindFirstChild("Humanoid") local player = game.Players:GetPlayerFromCharacter(hit.Parent) if Humanoid and Debounce == false then local leaderstats = player:FindFirstChild("leaderstats") Debounce = true if Debounce == true and leaderstats then local sound = script.Parent["Game Sound Correct"] if not sound.IsPlaying then sound:Play() leaderstats.Guesses.Value = leaderstats.Guesses.Value + AMOUNT_GIVEN wait(2) wait(10) Debounce = false end end end end
-- Decompiled with the Synapse X Luau decompiler.
local v1 = require(script.Parent:WaitForChild("BaseCharacterController")); local v2 = setmetatable({}, v1); v2.__index = v2; function v2.new() local v3 = setmetatable(v1.new(), v2); v3.parentUIFrame = nil; v3.jumpButton = nil; v3.characterAddedConn = nil; v3.humanoidStateEnabledChangedConn = nil; v3.humanoidJumpPowerConn = nil; v3.humanoidParentConn = nil; v3.externallyEnabled = false; v3.jumpPower = 0; v3.jumpStateEnabled = true; v3.isJumping = false; v3.humanoid = nil; return v3; end; local l__Players__1 = game:GetService("Players"); function v2.EnableButton(p1, p2) if p2 then if not p1.jumpButton then p1:Create(); end; local v4 = l__Players__1.LocalPlayer.Character and l__Players__1.LocalPlayer.Character:FindFirstChildOfClass("Humanoid"); if v4 and p1.externallyEnabled and p1.externallyEnabled and v4.JumpPower > 0 then p1.jumpButton.Visible = true; return; end; else p1.jumpButton.Visible = false; p1.isJumping = false; p1.jumpButton.ImageRectOffset = Vector2.new(1, 146); end; end; function v2.UpdateEnabled(p3) if p3.jumpPower > 0 and p3.jumpStateEnabled then p3:EnableButton(true); return; end; p3:EnableButton(false); end; function v2.HumanoidChanged(p4, p5) local v5 = l__Players__1.LocalPlayer.Character and l__Players__1.LocalPlayer.Character:FindFirstChildOfClass("Humanoid"); if v5 then if p5 == "JumpPower" then p4.jumpPower = v5.JumpPower; p4:UpdateEnabled(); return; end; if p5 == "Parent" and not v5.Parent then p4.humanoidChangeConn:Disconnect(); end; end; end; function v2.HumanoidStateEnabledChanged(p6, p7, p8) if p7 == Enum.HumanoidStateType.Jumping then p6.jumpStateEnabled = p8; p6:UpdateEnabled(); end; end; function v2.CharacterAdded(p9, p10) if p9.humanoidChangeConn then p9.humanoidChangeConn:Disconnect(); p9.humanoidChangeConn = nil; end; p9.humanoid = p10:FindFirstChildOfClass("Humanoid"); while not p9.humanoid do p10.ChildAdded:wait(); p9.humanoid = p10:FindFirstChildOfClass("Humanoid"); end; p9.humanoidJumpPowerConn = p9.humanoid:GetPropertyChangedSignal("JumpPower"):Connect(function() p9.jumpPower = p9.humanoid.JumpPower; p9:UpdateEnabled(); end); p9.humanoidParentConn = p9.humanoid:GetPropertyChangedSignal("Parent"):Connect(function() if not p9.humanoid.Parent then p9.humanoidJumpPowerConn:Disconnect(); p9.humanoidJumpPowerConn = nil; p9.humanoidParentConn:Disconnect(); p9.humanoidParentConn = nil; end; end); p9.humanoidStateEnabledChangedConn = p9.humanoid.StateEnabledChanged:Connect(function(p11, p12) p9:HumanoidStateEnabledChanged(p11, p12); end); p9.jumpPower = p9.humanoid.JumpPower; p9.jumpStateEnabled = p9.humanoid:GetStateEnabled(Enum.HumanoidStateType.Jumping); p9:UpdateEnabled(); end; function v2.SetupCharacterAddedFunction(p13) p13.characterAddedConn = l__Players__1.LocalPlayer.CharacterAdded:Connect(function(p14) p13:CharacterAdded(p14); end); if l__Players__1.LocalPlayer.Character then p13:CharacterAdded(l__Players__1.LocalPlayer.Character); end; end; function v2.Enable(p15, p16, p17) if p17 then p15.parentUIFrame = p17; end; p15.externallyEnabled = p16; p15:EnableButton(p16); end; local l__GuiService__2 = game:GetService("GuiService"); function v2.Create(p18) if not p18.parentUIFrame then return; end; if p18.jumpButton then p18.jumpButton:Destroy(); p18.jumpButton = nil; end; local v6 = math.min(p18.parentUIFrame.AbsoluteSize.x, p18.parentUIFrame.AbsoluteSize.y) <= 500; if v6 then local v7 = 70; else v7 = 120; end; p18.jumpButton = Instance.new("ImageButton"); p18.jumpButton.Name = "JumpButton"; p18.jumpButton.Visible = false; p18.jumpButton.BackgroundTransparency = 1; p18.jumpButton.Image = "rbxasset://textures/ui/Input/TouchControlsSheetV2.png"; p18.jumpButton.ImageRectOffset = Vector2.new(1, 146); p18.jumpButton.ImageRectSize = Vector2.new(144, 144); p18.jumpButton.Size = UDim2.new(0, v7, 0, v7); p18.jumpButton.Position = v6 and UDim2.new(1, -(v7 * 1.5 - 10), 1, -v7 - 20) or UDim2.new(1, -(v7 * 1.5 - 10), 1, -v7 * 1.75); local u3 = nil; p18.jumpButton.InputBegan:connect(function(p19) if not (not u3) or p19.UserInputType ~= Enum.UserInputType.Touch or p19.UserInputState ~= Enum.UserInputState.Begin then return; end; u3 = p19; p18.jumpButton.ImageRectOffset = Vector2.new(146, 146); p18.isJumping = true; end); p18.jumpButton.InputEnded:connect(function(p20) if p20 == u3 then u3 = nil; p18.isJumping = false; p18.jumpButton.ImageRectOffset = Vector2.new(1, 146); end; end); l__GuiService__2.MenuOpened:connect(function() if u3 then u3 = nil; p18.isJumping = false; p18.jumpButton.ImageRectOffset = Vector2.new(1, 146); end; end); if not p18.characterAddedConn then p18:SetupCharacterAddedFunction(); end; p18.jumpButton.Parent = p18.parentUIFrame; end; return v2;
-- ROBLOX deviation END chalk_supportsColor -- ROBLOX deviation END chalk_chainable
exports.default = function(result: TestResult, globalConfig: Config_GlobalConfig, projectConfig: Config_ProjectConfig?) local testPath = result.testFilePath local formattedTestPath = formatTestPath(projectConfig or globalConfig, testPath) -- ROBLOX deviation START: no terminal-link package available just use the path local fileLink = formattedTestPath -- ROBLOX deviation END if result.numFailingTests == nil then result.numFailingTests = 0 end local status = if result.numFailingTests > 0 or result.testExecError ~= nil then FAIL else PASS local testDetail = {} if result.perfStats ~= nil and Boolean.toJSBoolean(result.perfStats.slow) then local runTime = result.perfStats.runtime / 1000 table.insert(testDetail, LONG_TEST_COLOR(formatTime(runTime, 0))) end if result.memoryUsage ~= nil then local toMB = function(bytes: number) return math.floor(bytes / 1024 / 1024) end table.insert(testDetail, (" %sMB heap size"):format(tostring(toMB(result.memoryUsage)))) end local projectDisplayName = if projectConfig ~= nil and Boolean.toJSBoolean(projectConfig.displayName) then printDisplayName(projectConfig) .. " " else "" return string.format("%s %s%s %s", status, projectDisplayName, fileLink, table.concat(testDetail, " ")) end return exports
-- Weapons Tab
local WeaponsFrame = InventoryFrame.Main.Weapons; local ActionsFrame = WeaponsFrame.Actions; local EquippedFrame = WeaponsFrame.Equipped; local ItemsFrame = WeaponsFrame.Items; local ActionContainer = ActionsFrame.ActionContainer local CraftingFrame = ActionContainer.Craft; local EquipButton = ActionsFrame.Equip; local CraftButton = ActionsFrame.Craft; local RecycleButton = ActionsFrame.Recycle; local RecipesFrame = InventoryFrame.Recipes; local Sizes = { [ItemsFrame] = { [EquipButton] = { Size = ItemsFrame.Size; Position = ItemsFrame.Position; }; [CraftButton] = { Size = UDim2.new(0,-427,1,-155); Position = ItemsFrame.Position; }; [RecycleButton] = { Size = UDim2.new(0,-427,1,-200); Position = ItemsFrame.Position; }; }; [ActionsFrame] = { [EquipButton] = { Size = ActionsFrame.Size; Position = ActionsFrame.Position; }; [CraftButton] = { Size = UDim2.new(1,0,0,160); Position = UDim2.new(0,0,1,-160); }; [RecycleButton] = { Size = UDim2.new(1,0,0,205); Position = UDim2.new(0,0,1,-205); }; }; [EquippedFrame] = { [EquipButton] = { Size = EquippedFrame.Size; Position = EquippedFrame.Position; }; [CraftButton] = { Size = UDim2.new(0,130,1,-155); Position = UDim2.new(1,0,0,0); }; [RecycleButton] = { Size = UDim2.new(0,130,1,-200); Position = EquippedFrame.Position; }; }; [RecipesFrame] = { [EquipButton] = { Size = RecipesFrame.Size; Position = RecipesFrame.Position; }; [CraftButton] = { Size = UDim2.new(0,292,1,-155); Position = RecipesFrame.Position; --EquippedFrame.Position; }; [RecycleButton] = { Size = UDim2.new(0,0,1,-200); Position = ItemsFrame.Position; }; }; }; local Buttons = {EquipButton,CraftButton,RecycleButton}; local function ChangeAction(Button,CustomTime) CurrentAction = Button.Name; for _,B in pairs(Buttons) do B.Style = (B==Button and Enum.ButtonStyle.RobloxRoundDefaultButton) or Enum.ButtonStyle.RobloxRoundButton; end; if Button.Name ~= "Equip" then for _,F in pairs(ActionContainer:GetChildren()) do F.Visible = (F.Name==Button.Name); end; end; for Frame,Data in pairs(Sizes) do Frame:TweenSizeAndPosition( Data[Button].Size, Data[Button].Position, Direction,Style,((tonumber(CustomTime)~=nil and CustomTime) or Time) ); end end for _,Button in pairs(Buttons) do Button.MouseButton1Click:connect(function() ChangeAction(Button); end) end
--Front Suspension
Tune.FSusDamping = 500 -- Spring Dampening Tune.FSusStiffness = 9000 -- Spring Force Tune.FAntiRoll = 50 -- Anti-Roll (Gyro Dampening) Tune.FSusLength = 2 -- Suspension length (in studs) Tune.FPreCompress = .3 -- Pre-compression adds resting length force Tune.FExtensionLim = .3 -- Max Extension Travel (in studs) Tune.FCompressLim = .30 -- Max Compression Travel (in studs) Tune.FSusAngle = 80 -- Suspension Angle (degrees from horizontal) Tune.FWsBoneLen = 5 -- Wishbone Length Tune.FWsBoneAngle = 0 -- Wishbone angle (degrees from horizontal) Tune.FAnchorOffset = { -- Suspension anchor point offset (relative to center of wheel) --[[Lateral]] -.4 , -- positive = outward --[[Vertical]] -.5 , -- positive = upward --[[Forward]] 0 } -- positive = forward
-- constants
local PLAYER_DATA = ReplicatedStorage.PlayerData local REMOTES = ReplicatedStorage.Remotes local CURRENT_SEASON = 1
-- Local Variables
local Events = game.ReplicatedStorage.Events local DisplayIntermission = Events.DisplayIntermission local FetchConfiguration = Events.FetchConfiguration local Camera = game.Workspace.CurrentCamera local Player = game.Players.LocalPlayer local ScreenGui = script.ScreenGui local InIntermission = false local IsTeams = nil
-- Fired from server after initial data is sent:
rev_ReplicaRequestData.OnClientEvent:Connect(function() ReplicaController.InitialDataReceived = true print("[ReplicaController]: Initial data received") ReplicaController.InitialDataReceivedSignal:Fire() end)
--[[* * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. ]] --[[ ROBLOX deviation: no equivalent in Lua. Always returning false original code: import {isCI} from 'ci-info'; export default !!process.stdout.isTTY && process.env.TERM !== 'dumb' && !isCI; ]]
return { default = false, }
--[[Engine]]
--Torque Curve Tune.Horsepower = 1500 -- [TORQUE CURVE VISUAL] Tune.IdleRPM = 2000 -- https://www.desmos.com/calculator/2uo3hqwdhf Tune.PeakRPM = 6000 -- Use sliders to manipulate values Tune.Redline = 9000 -- Copy and paste slider values into the respective tune values Tune.EqPoint = 1900 Tune.PeakSharpness = 4.9 Tune.CurveMult = 0.12 --Incline Compensation Tune.InclineComp = 1.0 -- Torque compensation multiplier for inclines (applies gradient from 0-90 degrees) --Misc Tune.RevAccel = 100 -- RPM acceleration when clutch is off Tune.RevDecay = 50 -- RPM decay when clutch is off Tune.RevBounce = 500 -- RPM kickback from redline Tune.IdleThrottle = 10 -- Percent throttle at idle Tune.ClutchTol = 500 -- Clutch engagement threshold (higher = faster response)
--------LEFT DOOR --------
game.Workspace.doorleft.l41.BrickColor = BrickColor.new(1013) game.Workspace.doorleft.l31.BrickColor = BrickColor.new(106) game.Workspace.doorleft.pillar.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
-- Localplayer
local player = Players.LocalPlayer local PlayerGui = player:FindFirstChild("PlayerGui") local TopBar = PlayerGui:FindFirstChild("TopBar") local CheckpointFrame = TopBar:FindFirstChild("CheckpointFrame") local CheckpointCount = CheckpointFrame:FindFirstChild("CheckpointCount")
------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------
function onRunning(speed) if speed>0.5 then playAnimation("walk", 0.2, Humanoid) pose = "Walking" elseif speed<0.5 then playAnimation("idle", 0.2, Humanoid) pose = "Standing" end end function onDied() pose = "Dead" end function onGettingUp() pose = "GettingUp" end function onFallingDown() pose = "FallingDown" end function onPlatformStanding() pose = "PlatformStanding" end local lastTick = 0 function stepAnimate(currentTime) local amplitude = 1 local frequency = 1 local deltaTime = currentTime - lastTick lastTick = currentTime if (pose == "Dead" or pose == "GettingUp" or pose == "FallingDown" or pose == "Seated" or pose == "PlatformStanding") then stopAllAnimations() amplitude = 0.1 frequency = 1 end end
-- local MatcherHintOptions = JestMatcherUtils.MatcherHintOptions
local RECEIVED_COLOR = JestMatcherUtils.RECEIVED_COLOR local matcherErrorMessage = JestMatcherUtils.matcherErrorMessage local matcherHint = JestMatcherUtils.matcherHint local printWithType = JestMatcherUtils.printWithType local stringify = JestMatcherUtils.stringify
-- Libraries
local Libraries = Tool:WaitForChild 'Libraries' local Support = require(Libraries:WaitForChild 'SupportLibrary') local Signal = require(Libraries:WaitForChild 'Signal') local Make = require(Libraries:WaitForChild 'Make') local InstancePool = require(Libraries:WaitForChild 'InstancePool') TargetingModule = {}; TargetingModule.TargetingMode = 'Scoped' TargetingModule.TargetingModeChanged = Signal.new() TargetingModule.Scope = Workspace TargetingModule.IsScopeLocked = true TargetingModule.TargetChanged = Signal.new() TargetingModule.ScopeChanged = Signal.new() TargetingModule.ScopeTargetChanged = Signal.new() TargetingModule.ScopeLockChanged = Signal.new() function TargetingModule:EnableTargeting() -- Begin targeting parts from the mouse -- Get core API local Core = GetCore(); local Connections = Core.Connections; -- Create reference to mouse Mouse = Core.Mouse; -- Listen for target changes Connections.Targeting = Mouse.Move:Connect(function () self:UpdateTarget(self.Scope) end) -- Listen for target clicks Connections.Selecting = Mouse.Button1Up:Connect(self.SelectTarget) -- Listen for sibling selection middle clicks Connections.SiblingSelecting = Support.AddUserInputListener('Began', 'MouseButton3', true, function () self.SelectSiblings(Mouse.Target, not Selection.Multiselecting) end); -- Listen for 2D selection Connections.RectSelectionStarted = Mouse.Button1Down:Connect(self.StartRectangleSelecting); Connections.RectSelectionFinished = Support.AddUserInputListener('Ended', 'MouseButton1', true, self.FinishRectangleSelecting); -- Hide target box when tool is unequipped Connections.HideTargetBoxOnDisable = Core.Disabling:Connect(self.HighlightTarget); -- Cancel any ongoing selection when tool is unequipped Connections.CancelSelectionOnDisable = Core.Disabling:Connect(self.CancelRectangleSelecting); -- Enable scope selection self:EnableScopeSelection() -- Enable automatic scope resetting self:EnableScopeAutoReset() -- Enable targeting mode hotkeys self:BindTargetingModeHotkeys() end; function TargetingModule:SetScope(Scope) if self.Scope ~= Scope then self.Scope = Scope self.ScopeChanged:Fire(Scope) end end local function IsVisible(Item) return Item:IsA 'Model' or Item:IsA 'BasePart' end local function IsTargetable(Item) return Item:IsA 'Model' or Item:IsA 'BasePart' or Item:IsA 'Tool' or Item:IsA 'Accessory' or Item:IsA 'Accoutrement' end
--//Controller//--
for _, Button in pairs(Buttons:GetChildren()) do if Button.Name == "Button" then local Trigger = Button:WaitForChild("ProximityPrompt") Trigger.Triggered:Connect(function() if Button.Color == Color3.fromRGB(255, 0, 0) then Button.Color = Color3.fromRGB(0, 255, 0) table.insert(ActivatedButtons, Button) if #ActivatedButtons == Settings.Buttons then FloorConfiguration.TasksDone.Value = true end end end) end end
--------------------) Settings
Damage = 0 -- the ammout of health the player or mob will take Cooldown = 1 -- cooldown for use of the tool again ZoneModelName = "Ink Star" -- name the zone model MobHumanoidName = "Humanoid"-- the name of player or mob u want to damage
--Brew FX
function doTheBrew(humanoid, character) if db == true then db = false local goal = {} goal.Size = character.Head.Size * 2 goal.Color = Color3.new(math.random(), math.random(), math.random()) local tween = TweenService:Create(character.Head, tweenInfo, goal) tween:Play() brew.Sizzle:Play() humanoid:TakeDamage(5) wait(tweenInfo.Time) local goal = {} goal.Size = character.Head.Size / 2 goal.Color = character["Body Colors"].HeadColor3 local tween = TweenService:Create(character.Head, tweenInfo, goal) tween:Play() wait(tweenInfo.Time) db = true end end
--------------------------- --[[ --Main anchor point is the DriveSeat <car.Body.CarName.Value.VehicleSeat> Usage: MakeWeld(Part1,Part2,WeldType*,MotorVelocity**) *default is "Weld" **Applies to Motor welds only ModelWeld(Model,MainPart) Example: MakeWeld(car.Body.CarName.Value.VehicleSeat,misc.PassengerSeat) MakeWeld(car.Body.CarName.Value.VehicleSeat,misc.SteeringWheel,"Motor",.2) ModelWeld(car.Body.CarName.Value.VehicleSeat,misc.Door) ]]
--Code--
local function PlayerTouched(Part) local Parent = Part.Parent if game.Players:GetPlayerFromCharacter(Parent) then Parent.Humanoid.Health = 0 end end Brick.Touched:connect(PlayerTouched)
---[[ Message Settings ]]
module.MaximumMessageLength = 200 module.DisallowedWhiteSpace = {"\n", "\r", "\t", "\v", "\f"} module.ClickOnPlayerNameToWhisper = true module.ClickOnChannelNameToSetMainChannel = true module.BubbleChatMessageTypes = {ChatConstants.MessageTypeDefault, ChatConstants.MessageTypeWhisper}
-- Set up the event handlers for the ImageButton icons in the Wallpaper Apps shelf
local icons2 = wallShelf:GetChildren() for _, icon in ipairs(icons2) do if icon:IsA("ImageButton") then icon.MouseButton1Click:Connect(function() toggleWindow(icon) end) end end
-- Constants
local Gamemodes = script.Parent:WaitForChild("Gamemodes") local Current_Gamemode = Gamemodes[script:GetAttribute("Gamemode")] local Current_GameStateObject = Current_Gamemode.GameState
--////////////////////////////// Methods --//////////////////////////////////////
local methods = {} methods.__index = methods function methods:CreateGuiObjects(targetParent) self.ChatBarParentFrame = targetParent local backgroundImagePixelOffset = 7 local textBoxPixelOffset = 5 local BaseFrame = Instance.new("Frame") BaseFrame.Selectable = false BaseFrame.BackgroundTransparency = 0.6 BaseFrame.BorderSizePixel = 0 BaseFrame.BackgroundColor3 = ChatSettings.ChatBarBackGroundColor BaseFrame.Size = UDim2.new(1, 0, 0, 46) BaseFrame.Parent = targetParent local BoxFrame = Instance.new("Frame") BoxFrame.Selectable = false BoxFrame.Name = "BoxFrame" BoxFrame.BackgroundTransparency = 0.6 BoxFrame.BorderSizePixel = 0 BoxFrame.BackgroundColor3 = ChatSettings.ChatBarBoxColor BoxFrame.Size = UDim2.new(1, -backgroundImagePixelOffset * 2, 1, -backgroundImagePixelOffset * 2) BoxFrame.Position = UDim2.new(0, backgroundImagePixelOffset, 0, backgroundImagePixelOffset) BoxFrame.Parent = BaseFrame local TextBoxHolderFrame = Instance.new("Frame") TextBoxHolderFrame.BackgroundTransparency = 1 TextBoxHolderFrame.Size = UDim2.new(1, -textBoxPixelOffset * 2, 1, -textBoxPixelOffset * 2) TextBoxHolderFrame.Position = UDim2.new(0, textBoxPixelOffset, 0, textBoxPixelOffset) TextBoxHolderFrame.Parent = BoxFrame local TextBox = Instance.new("TextBox") TextBox.Selectable = ChatSettings.GamepadNavigationEnabled TextBox.Name = "ChatBar" TextBox.BackgroundTransparency = 1 TextBox.Size = UDim2.new(1, 0, 1, 0) TextBox.Position = UDim2.new(0, 0, 0, 0) TextBox.TextSize = ChatSettings.ChatBarTextSize TextBox.Font = ChatSettings.ChatBarFont TextBox.TextColor3 = ChatSettings.ChatBarTextColor TextBox.TextTransparency = 0.4 TextBox.TextStrokeTransparency = 1 TextBox.ClearTextOnFocus = false TextBox.TextXAlignment = Enum.TextXAlignment.Left TextBox.TextYAlignment = Enum.TextYAlignment.Top TextBox.TextWrapped = true TextBox.Text = "" TextBox.Parent = TextBoxHolderFrame local MessageModeTextButton = Instance.new("TextButton") MessageModeTextButton.Selectable = false MessageModeTextButton.Name = "MessageMode" MessageModeTextButton.BackgroundTransparency = 1 MessageModeTextButton.Position = UDim2.new(0, 0, 0, 0) MessageModeTextButton.TextSize = ChatSettings.ChatBarTextSize MessageModeTextButton.Font = ChatSettings.ChatBarFont MessageModeTextButton.TextXAlignment = Enum.TextXAlignment.Left MessageModeTextButton.TextWrapped = true MessageModeTextButton.Text = "" MessageModeTextButton.Size = UDim2.new(0, 0, 0, 0) MessageModeTextButton.TextYAlignment = Enum.TextYAlignment.Center MessageModeTextButton.TextColor3 = self:GetDefaultChannelNameColor() MessageModeTextButton.Visible = true MessageModeTextButton.Parent = TextBoxHolderFrame local TextLabel = Instance.new("TextLabel") TextLabel.Selectable = false TextLabel.TextWrapped = true TextLabel.BackgroundTransparency = 1 TextLabel.Size = TextBox.Size TextLabel.Position = TextBox.Position TextLabel.TextSize = TextBox.TextSize TextLabel.Font = TextBox.Font TextLabel.TextColor3 = TextBox.TextColor3 TextLabel.TextTransparency = TextBox.TextTransparency TextLabel.TextStrokeTransparency = TextBox.TextStrokeTransparency TextLabel.TextXAlignment = TextBox.TextXAlignment TextLabel.TextYAlignment = TextBox.TextYAlignment TextLabel.Text = "..." TextLabel.Parent = TextBoxHolderFrame self.GuiObject = BaseFrame self.TextBox = TextBox self.TextLabel = TextLabel self.GuiObjects.BaseFrame = BaseFrame self.GuiObjects.TextBoxFrame = BoxFrame self.GuiObjects.TextBox = TextBox self.GuiObjects.TextLabel = TextLabel self.GuiObjects.MessageModeTextButton = MessageModeTextButton self:AnimGuiObjects() self:SetUpTextBoxEvents(TextBox, TextLabel, MessageModeTextButton) if self.UserHasChatOff then self:DoLockChatBar() end self.eGuiObjectsChanged:Fire() end
-- << BANLAND >>
local Banned = {"SmokeyRBX","Example1","Example2"}
--game.Players:GetPlayerFromCharacter(hit.Parent) --or game.Players:FindFirstChild(hit.Parent.Name)
--[[while true do wait() script.Value = math.random(1,2) end while true do wait() if script.Value == 1 then script.Sound.ChorusSoundEffect.Enabled = true script.Sound.DistortionSoundEffect.Enabled = false script.sound.EchoSoundEffect.Enabled = true script.Sound.PitchShiftSoundEffect.Enabled = false script.Sound.Reverb.Enabled = true else if script.Value == 2 then script.Sound.ChorusSoundEffect.Enabled = false script.Sound.DistortionSoundEffect.Enabled = true script.sound.EchoSoundEffect.Enabled = false script.Sound.PitchShiftSoundEffect.Enabled = true script.Sound.Reverb.Enabled = false end end end]]
--
--// Move cam
local maxTilt = 10 game:GetService("RunService").RenderStepped:Connect(function() cam.CFrame = camPart.CFrame * CFrame.Angles( math.rad((((mouse.Y - mouse.ViewSizeY / 300) / mouse.ViewSizeY)) * -maxTilt), math.rad((((mouse.X - mouse.ViewSizeX / 300) / mouse.ViewSizeX)) * -maxTilt), 0 ) end)