prompt
stringlengths
2
14.7k
completion
stringlengths
1
99.7k
--- An expensive way to spawn a function. However, unlike spawn(), it executes on the same frame, and -- unlike coroutines, does not obscure errors -- @module fastSpawn
return function(func, ...) assert(type(func) == "function") local args = {...} local count = select("#", ...) local bindable = Instance.new("BindableEvent") bindable.Event:Connect(function() func(unpack(args, 1, count)) end) bindable:Fire() bindable:Destroy() end
-- check if the player is moving and not climbing
humanoid.Running:Connect(function(speed) if humanoid.MoveDirection.Magnitude > 0 and speed > 0 and humanoid:GetState() ~= Enum.HumanoidStateType.Climbing then if oldWalkSpeed ~= humanoid.WalkSpeed then getSoundProperties() update() end currentSound.Playing = true currentSound.Looped = true else currentSound:Stop() end end)
--s.Pitch = 0.7 --[[for x = 1, 50 do s.Pitch = s.Pitch + 0.20 1.900 s:play() wait(0.001) end]] --[[Chopper level 5=1.2, Chopper level 4=1.04]]
s.Volume=1 while s.Pitch<1 do s.Pitch=s.Pitch+0.010 s:Play() if s.Pitch>1 then s.Pitch=1 end wait(-9) end while true do for x = 1, 500 do s:play() wait(-9) end end
--[[Weld functions]]
local JS = game:GetService("JointsService") local PGS_ON = workspace:PGSIsEnabled() function MakeWeld(x,y,type,s) if type==nil then type="Weld" end local W=Instance.new(type,JS) W.Part0=x W.Part1=y W.C0=x.CFrame:inverse()*x.CFrame W.C1=y.CFrame:inverse()*x.CFrame if type=="Motor" and s~=nil then W.MaxVelocity=s end return W end function ModelWeld(a,b) if a:IsA("BasePart") and a.Parent.Name ~= ("Hood") then MakeWeld(b,a,"Weld") for i,v in pairs(a:GetChildren()) do if v ~= nil and v:IsA("BasePart") then ModelWeld(v,b) end end elseif a:IsA("Model") then for i,v in pairs(a:GetChildren()) do ModelWeld(v,b) end end end function UnAnchor(a) if a:IsA("BasePart") then a.Anchored=false end for i,v in pairs(a:GetChildren()) do UnAnchor(v) end end
--- Get (or create) BindableEvent
function GetEvent(eventName) --- Variables eventName = string.lower(eventName) local event = events[eventName] --- Check if event already exists if not event then --- Create event event = Instance.new("BindableEvent") event.Name = eventName events[eventName] = event end -- return event end
--// Modules
local Zone = require(script['Zone']) local module = {} module.SpawnHB = function(data) local part = data.part local cf = data.cf or part.CFrame local Shape = data.Shape or 'Square' local size = data.size or Vector3.new(5,5,5) local tim = data.tim local HB = script.Storage[Shape]:Clone() HB.Parent = workspace.World.Hitbox HB.CFrame = cf HB.Size = size if tim then game.Debris:AddItem(HB, tim) end return HB end
--Change sound id to the id you want to play
debounce = false script.Parent.Touched:connect(function(hit) if not debounce then debounce = true if(hit.Parent:FindFirstChild("Humanoid")~=nil)then local player = game.Players:GetPlayerFromCharacter(hit.Parent) local sound = script.Parent.Sound:Clone() sound.Parent = player.PlayerGui sound:Play() wait(10)--change to how long before the sound plays again after retouching it end debounce = false end end)
-- SETUP ICON TEMPLATE
local topbarPlusGui = Instance.new("ScreenGui") topbarPlusGui.Enabled = true topbarPlusGui.DisplayOrder = 0 topbarPlusGui.IgnoreGuiInset = true topbarPlusGui.ResetOnSpawn = false topbarPlusGui.Name = "TopbarPlus" local activeItems = Instance.new("Folder") activeItems.Name = "ActiveItems" activeItems.Parent = topbarPlusGui local topbarContainer = Instance.new("Frame") topbarContainer.BackgroundTransparency = 1 topbarContainer.Name = "TopbarContainer" topbarContainer.Position = UDim2.new(0, 0, 0, 0) topbarContainer.Size = UDim2.new(1, 0, 0, 36) topbarContainer.Visible = true topbarContainer.ZIndex = 1 topbarContainer.Parent = topbarPlusGui topbarContainer.Active = false local iconContainer = Instance.new("Frame") iconContainer.BackgroundTransparency = 1 iconContainer.Name = "IconContainer" iconContainer.Position = UDim2.new(0, 104, 0, 4) iconContainer.Visible = false iconContainer.ZIndex = 1 iconContainer.Parent = topbarContainer iconContainer.Active = false local iconButton = Instance.new("TextButton") iconButton.Name = "IconButton" iconButton.Visible = true iconButton.Text = "" iconButton.ZIndex = 10--2 iconButton.BorderSizePixel = 0 iconButton.AutoButtonColor = false iconButton.Parent = iconContainer iconButton.Active = true iconButton.TextTransparency = 1 iconButton.RichText = true local iconImage = Instance.new("ImageLabel") iconImage.BackgroundTransparency = 1 iconImage.Name = "IconImage" iconImage.AnchorPoint = Vector2.new(0, 0.5) iconImage.Visible = true iconImage.ZIndex = 11--3 iconImage.ScaleType = Enum.ScaleType.Fit iconImage.Parent = iconButton iconImage.Active = false local iconLabel = Instance.new("TextLabel") iconLabel.BackgroundTransparency = 1 iconLabel.Name = "IconLabel" iconLabel.AnchorPoint = Vector2.new(0, 0.5) iconLabel.Position = UDim2.new(0.5, 0, 0.5, 0) iconLabel.Text = "" iconLabel.RichText = true iconLabel.TextScaled = false iconLabel.ClipsDescendants = true iconLabel.ZIndex = 11--3 iconLabel.Active = false iconLabel.AutoLocalize = true iconLabel.Parent = iconButton local fakeIconLabel = iconLabel:Clone() fakeIconLabel.Name = "FakeIconLabel" fakeIconLabel.AnchorPoint = Vector2.new(0, 0) fakeIconLabel.Position = UDim2.new(0, 0, 0, 0) fakeIconLabel.Size = UDim2.new(1, 0, 1, 0) fakeIconLabel.TextTransparency = 1 fakeIconLabel.AutoLocalize = false fakeIconLabel.Parent = iconLabel.Parent local iconGradient = Instance.new("UIGradient") iconGradient.Name = "IconGradient" iconGradient.Enabled = true iconGradient.Parent = iconButton local iconCorner = Instance.new("UICorner") iconCorner.Name = "IconCorner" iconCorner.Parent = iconButton local iconOverlay = Instance.new("Frame") iconOverlay.Name = "IconOverlay" iconOverlay.BackgroundTransparency = 1 iconOverlay.Position = iconButton.Position iconOverlay.Size = UDim2.new(1, 0, 1, 0) iconOverlay.Visible = true iconOverlay.ZIndex = iconButton.ZIndex + 1 iconOverlay.BorderSizePixel = 0 iconOverlay.Parent = iconContainer iconOverlay.Active = false local iconOverlayCorner = iconCorner:Clone() iconOverlayCorner.Name = "IconOverlayCorner" iconOverlayCorner.Parent = iconOverlay
--[=[ DataStore manager for player that automatically saves on player leave and game close. @server @class PlayerDataStoreManager ]=]
local require = require(script.Parent.loader).load(script) local Players = game:GetService("Players") local RunService = game:GetService("RunService") local BaseObject = require("BaseObject") local DataStore = require("DataStore") local PromiseUtils = require("PromiseUtils") local PendingPromiseTracker = require("PendingPromiseTracker") local Maid = require("Maid") local Promise = require("Promise") local PlayerDataStoreManager = setmetatable({}, BaseObject) PlayerDataStoreManager.ClassName = "PlayerDataStoreManager" PlayerDataStoreManager.__index = PlayerDataStoreManager
--EQUIP ANIMATION
Debounce = false Stance = "Nothing" local KeyUsed = {} local function KeyChecked(key) for i=1,#KeyUsed do if key == KeyUsed[i] then return true end end return false end Character = Player.Character Mouse.KeyDown:connect(function(key) key = string.lower(key) if key == "y" then SEs.ChangeVal:FireServer(k,Tool.Skrimish,not Tool.Skrimish.Value) elseif key == "c" and not Attacking then SEs.Crouch:FireServer(k,script.CRC,Character) elseif Stance == "Nothing" and not Debounce then if key == "" then CarrySabre() elseif key == "" then PresentSabre() elseif key == "" then AtEase() elseif key == "" then EyeRight() end elseif Stance ~= "Nothing" and not Debounce and KeyChecked(key) then if Stance == "Carry" then CarrySabre() elseif Stance == "Present" then PresentSabre() elseif Stance == "Ease" then AtEase() elseif Stance == "Right" then EyeRight() end end end) Mouse.Button1Down:connect(function() if Stance == "Nothing" then if not Attacking and not Blocking then SEs.ChangeVal:FireServer(k,Tool.Direction,AttackDirection) Attack = true Attacking = true if AttackDirection == "U" then Turning = true NeckRotation = math.rad(10) Animate( CFrame.new(1.5, 0, 0) * CFrame.fromEulerAnglesXYZ(math.rad(0), math.rad(10), math.rad(0)) * CFrame.new(0,1.5,0) ,CFrame.new(-1.5, 0.1+((0.6)), 0.1+((0.4))) * CFrame.fromEulerAnglesXYZ(math.rad(-20)+(math.rad(-100)), math.rad(-10), 0)* CFrame.new(0,1.5,0) ,CFrame.new(-1.5, 0.1+((0.6)), 0.1+((0.4))) * CFrame.fromEulerAnglesXYZ(math.rad(-20)+(math.rad(-100)), math.rad(-10), 0)* CFrame.new(0,1.5,0) ,CFrame.new(0,0,0) * CFrame.fromEulerAnglesXYZ(0,math.rad(10),0) ,0.2) Turning = false repeat wait() until not Attack PlaySound(Tool.Handle.Swing) BladeReady = true Turning = true NeckRotation = math.rad(-10) Animate( CFrame.new(1.5, 0, 0) * CFrame.fromEulerAnglesXYZ(math.rad(0), math.rad(-10), math.rad(0)) * CFrame.new(0,1.5,0) ,CFrame.new(-1.5, 0.7+((-0.3)), 0.5) * CFrame.fromEulerAnglesXYZ(math.rad(-120)+(math.rad(95)), math.rad(-10), 0)* CFrame.new(0,1.5,0) ,CFrame.new(-1.5, 0.7+((-0.3)), 0.5) * CFrame.fromEulerAnglesXYZ(math.rad(-120)+(math.rad(95)), math.rad(-10), 0)* CFrame.new(0,1.5,0) ,CFrame.new(0,0,0) * CFrame.fromEulerAnglesXYZ(0,math.rad(-10),0) ,0.1) BladeReady = false wait(0.2) NeckRotation = math.rad(0) Animate( CFrame.new(1.5, 0, 0) * CFrame.fromEulerAnglesXYZ(math.rad(0), math.rad(0), math.rad(0)) * CFrame.new(0,1.5,0) ,CFrame.new(-1.5, 0.4+((-0.3)), 0.5+((-0.4))) * CFrame.fromEulerAnglesXYZ(math.rad(-25)+(math.rad(5)), math.rad(-10), 0)* CFrame.new(0,1.5,0) ,CFrame.new(-1.5, 0.4+((-0.3)), 0.5+((-0.4))) * CFrame.fromEulerAnglesXYZ(math.rad(-25)+(math.rad(5)), math.rad(-10), 0)* CFrame.new(0,1.5,0) ,CFrame.new(0,0,0) * CFrame.fromEulerAnglesXYZ(0,0,0) ,0.2) Turning = false elseif AttackDirection == "D" then Turning = true NeckRotation = math.rad(10) Animate( CFrame.new(1.5, 0, 0) * CFrame.fromEulerAnglesXYZ(math.rad(0), math.rad(10), math.rad(0)) * CFrame.new(0,1.5,0) ,CFrame.new(-1.5, 0.1+((-0.1)), 0.1+((-0.4))) * CFrame.fromEulerAnglesXYZ(math.rad(-20)+(math.rad(30)), math.rad(-10)+(math.rad(10)), 0)* CFrame.new(0,1.5,0) ,CFrame.new(-1.5, 0.1+((-0.1)), 0.1+((-0.4))) * CFrame.fromEulerAnglesXYZ(math.rad(-20)+(math.rad(30)), math.rad(-10)+(math.rad(10)), 0)* CFrame.new(0,1.5,0) ,CFrame.new(0,0,0) * CFrame.fromEulerAnglesXYZ(0,math.rad(10),0) ,0.2) Turning = false repeat wait() until not Attack PlaySound(Tool.Handle.Swing) BladeReady = true Turning = true NeckRotation = math.rad(-60) Animate( CFrame.new(1.5, 0, 0) * CFrame.fromEulerAnglesXYZ(math.rad(0), math.rad(-60), math.rad(0)) * CFrame.new(0,1.5,0) ,CFrame.new(-0.7, -0.65, 1.6+0.55) * CFrame.fromEulerAnglesXYZ(math.rad(-5), 0+(math.rad(-10)), 0)* CFrame.new(0,1.5,0) ,CFrame.new(-0.7, 0.1+1.4, 0+0.8) * CFrame.fromEulerAnglesXYZ(math.rad(5)+(math.rad(-80)), 0+(math.rad(-10)), 0)* CFrame.new(0,1.5,0) ,CFrame.new(0,0,0) * CFrame.fromEulerAnglesXYZ(0,math.rad(-60),0) ,0.1) BladeReady = false wait(0.2) NeckRotation = 0 Animate( CFrame.new(1.5, 0, 0) * CFrame.fromEulerAnglesXYZ(math.rad(0), math.rad(0), math.rad(0)) * CFrame.new(0,1.5,0) ,CFrame.new(-1.5, 0+((0.1)), 0.2+((-0.1))) * CFrame.fromEulerAnglesXYZ(math.rad(-45)+(math.rad(25)), math.rad(-20)+(math.rad(10)), 0)* CFrame.new(0,1.5,0) ,CFrame.new(-1.5, 0+((0.1)), 0.2+((-0.1))) * CFrame.fromEulerAnglesXYZ(math.rad(-45)+(math.rad(25)), math.rad(-20)+(math.rad(10)), 0)* CFrame.new(0,1.5,0) ,CFrame.new(0,0,0) * CFrame.fromEulerAnglesXYZ(0,0,0) ,0.3) Turning = false elseif AttackDirection == "L" then Turning = true NeckRotation = math.rad(-30) Animate( CFrame.new(1.5, 0, 0) * CFrame.fromEulerAnglesXYZ(math.rad(0), math.rad(-30), math.rad(0)) * CFrame.new(0,1.5,0) ,CFrame.new(-1.5+((0.7)), 0.1+((0.6)), 0.1+((-1.4))) * CFrame.fromEulerAnglesXYZ(math.rad(-20)+(math.rad(-95)), math.rad(-10)+(math.rad(10)), 0+(math.rad(-75)))* CFrame.new(0,1.5,0) ,CFrame.new(-1.5+((0.7)), 0.1+((0.6)), 0.1+((-1.4))) * CFrame.fromEulerAnglesXYZ(math.rad(-20)+(math.rad(-95)), math.rad(-10)+(math.rad(10)), 0+(math.rad(-75)))* CFrame.new(0,1.5,0) ,CFrame.new(0,0,0) * CFrame.fromEulerAnglesXYZ(0,math.rad(-30),0) ,0.3) Turning = false repeat wait() until not Attack PlaySound(Tool.Handle.Swing) BladeReady = true Turning = true NeckRotation = math.rad(20) Animate( CFrame.new(1.5, 0, 0) * CFrame.fromEulerAnglesXYZ(math.rad(0), math.rad(20), math.rad(0)) * CFrame.new(0,1.5,0) ,CFrame.new(-0.7, 1.12, 0.48) * CFrame.fromEulerAnglesXYZ(math.rad(-115)+(math.rad(130)), 0, math.rad(-75))* CFrame.new(0,1.5,0) ,CFrame.new(-0.7, 0.8, -1.2) * CFrame.fromEulerAnglesXYZ(math.rad(-115)+(math.rad(70)), 0, math.rad(-75))* CFrame.new(0,1.5,0) ,CFrame.new(0,0,0) * CFrame.fromEulerAnglesXYZ(0,math.rad(20),0) ,0.1) BladeReady = false wait(0.2) NeckRotation = math.rad(0) Animate( CFrame.new(1.5, 0, 0) * CFrame.fromEulerAnglesXYZ(math.rad(0), math.rad(0), math.rad(0)) * CFrame.new(0,1.5,0) ,CFrame.new(-0.9+((-0.6)), 1.2+((-1.1)), -0.9+((1))) * CFrame.fromEulerAnglesXYZ(math.rad(-55)+(math.rad(35)), 0+(math.rad(-10)), math.rad(-75)+(math.rad(75)))* CFrame.new(0,1.5,0) ,CFrame.new(-0.9+((-0.6)), 1.2+((-1.1)), -0.9+((1))) * CFrame.fromEulerAnglesXYZ(math.rad(-55)+(math.rad(35)), 0+(math.rad(-10)), math.rad(-75)+(math.rad(75)))* CFrame.new(0,1.5,0) ,CFrame.new(0,0,0) * CFrame.fromEulerAnglesXYZ(0,0,0) ,0.3) Turning = false elseif AttackDirection == "R" then Turning = true NeckRotation = math.rad(10) Animate( CFrame.new(1.5, 0, 0) * CFrame.fromEulerAnglesXYZ(math.rad(0), math.rad(10), math.rad(0)) * CFrame.new(0,1.5,0) ,CFrame.new(-1.5+((0.3)), 0.1+((0.7)), 0.1+((0.65))) * CFrame.fromEulerAnglesXYZ(math.rad(-20)+(math.rad(-55)), math.rad(-10)+(math.rad(40)), 0+(math.rad(10)))* CFrame.new(0,1.5,0) ,CFrame.new(-1.5+((0.3)), 0.1+((0.7)), 0.1+((0.65))) * CFrame.fromEulerAnglesXYZ(math.rad(-20)+(math.rad(-55)), math.rad(-10)+(math.rad(40)), 0+(math.rad(10)))* CFrame.new(0,1.5,0) ,CFrame.new(0,0,0) * CFrame.fromEulerAnglesXYZ(0,math.rad(10),0) ,0.3) Turning = false repeat wait() until not Attack PlaySound(Tool.Handle.Swing) BladeReady = true Turning = true NeckRotation = math.rad(-30) Animate( CFrame.new(1.5, 0, 0) * CFrame.fromEulerAnglesXYZ(math.rad(0), math.rad(-30), math.rad(0)) * CFrame.new(0,1.5,0) ,CFrame.new(0, -1.18, 1.34) * CFrame.fromEulerAnglesXYZ(math.rad(-75)+(math.rad(90)), math.rad(30)+(math.rad(-35)), math.rad(10)+(math.rad(60)))* CFrame.new(0,1.5,0) ,CFrame.new(0, 0.1, 1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-75)+(math.rad(45)), math.rad(30)+(math.rad(-35)), math.rad(10)+(math.rad(60)))* CFrame.new(0,1.5,0) ,CFrame.new(0,0,0) * CFrame.fromEulerAnglesXYZ(0,math.rad(-30),0) ,0.1) BladeReady = false wait(0.2) NeckRotation = math.rad(0) Animate( CFrame.new(1.5, 0, 0) * CFrame.fromEulerAnglesXYZ(math.rad(0), math.rad(0), math.rad(0)) * CFrame.new(0,1.5,0) ,CFrame.new(-1.5, 0.1, 0.1) * CFrame.fromEulerAnglesXYZ(math.rad(-30)+(math.rad(10)), math.rad(-5)+(math.rad(-5)), math.rad(70)+(math.rad(-70)))* CFrame.new(0,1.5,0) ,CFrame.new(-1.5, 0.1, 0.1) * CFrame.fromEulerAnglesXYZ(math.rad(-30)+(math.rad(10)), math.rad(-5)+(math.rad(-5)), math.rad(70)+(math.rad(-70)))* CFrame.new(0,1.5,0) ,CFrame.new(0,0,0) * CFrame.fromEulerAnglesXYZ(0,0,0) ,0.3) Turning = false end SEs.ChangeVal:FireServer(k,Tool.Direction,"") Attacking = false end end end) Mouse.Button2Down:connect(function() if Stance == "Nothing" then if not Blocking and not Attacking then SEs.ChangeVal:FireServer(k,Tool.Direction,"") Block = true Blocking = true Animate( CFrame.new(1.5, 0, 0) * CFrame.fromEulerAnglesXYZ(math.rad(0), math.rad(0), math.rad(0)) * CFrame.new(0,1.5,0) ,CFrame.new(-1.5+((0.6)), 0.1+((0.5)), 0.1+((-1.2))) * CFrame.fromEulerAnglesXYZ(math.rad(-20)+(math.rad(-60)), math.rad(-10)+(math.rad(10)), 0+(math.rad(-65)))* CFrame.new(0,1.5,0) ,CFrame.new(-1.5+((0.6)), 0.1+((0.5)), 0.1+((-1.2))) * CFrame.fromEulerAnglesXYZ(math.rad(-20)+(math.rad(-60)), math.rad(-10)+(math.rad(10)), 0+(math.rad(-65)))* CFrame.new(0,1.5,0) ,CFrame.new(0,0,0) * CFrame.fromEulerAnglesXYZ(0,0,0) ,0.2) SEs.ChangeVal:FireServer(k,Tool.Block,true) repeat wait() until not Block Animate( CFrame.new(1.5, 0, 0) * CFrame.fromEulerAnglesXYZ(math.rad(0), math.rad(0), math.rad(0)) * CFrame.new(0,1.5,0) ,CFrame.new(-0.9+((-0.6)), 0.6+((-0.5)), -1.1+((1.2))) * CFrame.fromEulerAnglesXYZ(math.rad(-80)+(math.rad(60)), math.rad(0)+(math.rad(-10)), math.rad(-65)+(math.rad(65)))* CFrame.new(0,1.5,0) ,CFrame.new(-0.9+((-0.6)), 0.6+((-0.5)), -1.1+((1.2))) * CFrame.fromEulerAnglesXYZ(math.rad(-80)+(math.rad(60)), math.rad(0)+(math.rad(-10)), math.rad(-65)+(math.rad(65)))* CFrame.new(0,1.5,0) ,CFrame.new(0,0,0) * CFrame.fromEulerAnglesXYZ(0,0,0) ,0.2) SEs.ChangeVal:FireServer(k,Tool.Block,false) Blocking = false end end end) Mouse.Button1Up:connect(function() if Stance == "Nothing" then Attack = false end end) Mouse.Button2Up:connect(function() if Stance == "Nothing" then Block = false end end) end else print("sh") end else print("arms") end end script.CRC.Changed:Connect(function() if not script.CRC.Value then TweenService:Create(torso.Parent.Humanoid,TweenInfo.new(0.3), {CameraOffset = torso.Parent.Humanoid.CameraOffset + (Vector3.new(0,0,0) - torso.Parent.Humanoid.CameraOffset)}):Play() Tool.Hig.Value = 0 Animate( weld1C1 ,weld2C1 ,weld3C1 ,tweldC1 ,0.3) chr.Humanoid.WalkSpeed = script.Speed.Value else TweenService:Create(torso.Parent.Humanoid,TweenInfo.new(0.3), {CameraOffset = torso.Parent.Humanoid.CameraOffset + (Vector3.new(0,-1,0) - torso.Parent.Humanoid.CameraOffset)}):Play() Tool.Hig.Value = 1 chr.Humanoid.WalkSpeed = 0 Animate( weld1C1 ,weld2C1 ,weld3C1 ,tweldC1 ,0.3) end end) function DamageHorse(Humanoid, SpeedDamage) SEs.Damage:FireServer(k,Tool,Humanoid) end function DamageConstruct(Hit) SEs.Damage:FireServer(k,Tool,Hit) end function IsHorse(Hit) -- This function is incredibly ugly. if Hit.Parent.Name == "Horse" then HorseHumanoid = Hit.Parent.Humanoid return true elseif Hit.Parent.Parent.Name == "Horse" then HorseHumanoid = Hit.Parent.Parent.Humanoid return true elseif Hit.Parent.Parent ~= game then if Hit.Parent.Parent.Parent.Name == "Horse" then HorseHumanoid = Hit.Parent.Parent.Parent.Humanoid return true elseif Hit.Parent.Parent.Parent ~= game then if Hit.Parent.Parent.Parent.Parent.Name == "Horse" then HorseHumanoid = Hit.Parent.Parent.Parent.Parent.Humanoid return true else return false end else return false end else return false end end local BladeDebounce = false function Blade(Hit) if BladeReady then if IsHorse(Hit) and not BladeDebounce and Hit.Parent ~= Tool.Parent and HorseHumanoid.Parent:FindFirstChild("CurrentSpeed") then if HorseHumanoid.Parent.CurrentSpeed.Value > 15 then local WallDetection = Ray.new(Character.Torso.Position, (Tool.Blade.Position - Character.Torso.Position).unit*(Tool.Blade.Position - Character.Torso.Position).magnitude) local Ignore = {Character, arms[2].Mweld3.Part1.Parent, Hit.Parent} local WallHit, WallHitPos = game.Workspace:FindPartOnRayWithIgnoreList(WallDetection, Ignore) if not WallHit then BladeDebounce = true DamageHorse(HorseHumanoid, true) PlaySound(Tool.Blade.HitFlesh) wait(0.4) BladeDebounce = false end end elseif IsHorse(Hit) and not BladeDebounce and Hit.Parent ~= Tool.Parent then local WallDetection = Ray.new(Character.Torso.Position, (Tool.Blade.Position - Character.Torso.Position).unit*(Tool.Blade.Position - Character.Torso.Position).magnitude) local Ignore = {Character, arms[2].Mweld3.Part1.Parent, Hit.Parent} local WallHit, WallHitPos = game.Workspace:FindPartOnRayWithIgnoreList(WallDetection, Ignore) if not WallHit then BladeDebounce = true DamageHorse(HorseHumanoid, false) PlaySound(Tool.Blade.HitFlesh) wait(0.4) BladeDebounce = false end elseif Hit.Parent:FindFirstChild("Integrity") and not BladeDebounce then BladeDebounce = true DamageConstruct(Hit) PlaySound(Tool.Blade.HitConstruct) wait(0.4) BladeDebounce = false else if Hit.Parent:FindFirstChild("Humanoid") and Hit.Parent:FindFirstChild("Torso") and not BladeDebounce and Hit.Parent ~= Tool.Parent then for _,V in ipairs(Hit.Parent:GetChildren()) do if V:IsA("Tool") then HitTool = V end end if HitTool then if HitTool:FindFirstChild("Direction") then if CheckIfBlocked(HitTool.Direction.Value, Tool.Direction.Value, HitTool.Block.Value, Tool.Block.Value) and CheckIfFacing(Tool.Parent.Head,Hit.Parent.Head) > 1.5 then if HitTool.Handle.Block.Volume == 0.5 then HitTool.Handle.Block.Volume = 1 PlaySound(HitTool.Handle.Block,Character) wait(0.4) HitTool.Handle.Block.Volume = 0.5 end else local WallDetection = Ray.new(Character.Torso.Position, (Tool.Blade.Position - Character.Torso.Position).unit*(Tool.Blade.Position - Character.Torso.Position).magnitude) local Ignore = {Character, arms[2].Mweld3.Part1.Parent, Hit.Parent} local WallHit, WallHitPos = game.Workspace:FindPartOnRayWithIgnoreList(WallDetection, Ignore) BladeDebounce = true DamagePlayer(Hit.Parent.Humanoid,Hit) PlaySound(Tool.Blade.HitFlesh) wait(0.4) BladeDebounce = false end else local WallDetection = Ray.new(Character.Torso.Position, (Tool.Blade.Position - Character.Torso.Position).unit*(Tool.Blade.Position - Character.Torso.Position).magnitude) local Ignore = {Character, arms[2].Mweld3.Part1.Parent, Hit.Parent} local WallHit, WallHitPos = game.Workspace:FindPartOnRayWithIgnoreList(WallDetection, Ignore) BladeDebounce = true DamagePlayer(Hit.Parent.Humanoid,Hit) PlaySound(Tool.Blade.HitFlesh) wait(0.4) BladeDebounce = false end else local WallDetection = Ray.new(Character.Torso.Position, (Tool.Blade.Position - Character.Torso.Position).unit*(Tool.Blade.Position - Character.Torso.Position).magnitude) local Ignore = {Character, arms[2].Mweld3.Part1.Parent, Hit.Parent} local WallHit, WallHitPos = game.Workspace:FindPartOnRayWithIgnoreList(WallDetection, Ignore) BladeDebounce = true DamagePlayer(Hit.Parent.Humanoid,Hit) PlaySound(Tool.Blade.HitFlesh) wait(0.4) BladeDebounce = false end end end end end function CheckIfBlocked(One,Two,BlockOne,BlockTwo) if One == "U" and Two == "U" then return true elseif One == "D" and Two == "D" then return true elseif One == "L" and Two == "R" then return true elseif One == "R" and Two == "L" then return true elseif BlockOne or BlockTwo then return true end end function CheckIfFacing(One,Two) local Magnitude = ((One.CFrame.lookVector*Vector3.new(1,0,1)) - (Two.CFrame.lookVector*Vector3.new(1,0,1))).magnitude return Magnitude end Tool:waitForChild("Blade") Tool.Blade.Touched:connect(Blade) function DamagePlayer(Humanoid,Hit) if game.Players:GetPlayerFromCharacter(Humanoid.Parent) then if game.Players:GetPlayerFromCharacter(Humanoid.Parent).TeamColor ~= game.Players.LocalPlayer.TeamColor or Tool.TK.Value then DamageHumanoid(Humanoid,Hit) end else DamageHumanoid(Humanoid,Hit) end end function DamageHumanoid(Humanoid,Hit) if Hit.Name == "Torso" or Hit.Name == "Head" then SEs.Damage:FireServer(k,Tool,Humanoid.Parent["Left Arm"],Player) else SEs.Damage:FireServer(k,Tool,Humanoid.Parent["Left Leg"],Player) end end function AtEase() local n = 6 if Stance == "Nothing" then if not script.CRC.Value then Player.Character.Humanoid.WalkSpeed = 12 else Player.Character.Humanoid.WalkSpeed = 0 end script.Speed.Value = 12 Debounce = true Stance = "Ease" Animate( CFrame.new(1.5+((-1/6)*n), 0-((0.3/6)*n), 0-((0.8/6)*n)) * CFrame.fromEulerAnglesXYZ(math.rad(0)+(math.rad(40/6)*n), math.rad(0), 0-(math.rad(45/6)*n)) * CFrame.new(0,1.5,0) ,CFrame.new(-1.5, 0.1, 0.165-((0.065))) * CFrame.fromEulerAnglesXYZ(math.rad(-35)+(math.rad(15)), math.rad(-10), 0) * CFrame.new(0,1.5,0) ,CFrame.new(-1.5, -0.27+((0.37)), -1+((1.1))) * CFrame.fromEulerAnglesXYZ(math.rad(-123)+(math.rad(103)), math.rad(-10), 0) * CFrame.new(0,1.5,0) ,CFrame.new(0,0,0) * CFrame.fromEulerAnglesXYZ(0,0,0) ,0.2) Debounce = false else Debounce = true Animate( CFrame.new(1.5, 0, 0) * CFrame.fromEulerAnglesXYZ(math.rad(0), math.rad(0), math.rad(0)) * CFrame.new(0,1.5,0) ,CFrame.new(-1.5, 0.1, 0.165-((0.065))) * CFrame.fromEulerAnglesXYZ(math.rad(-35)+(math.rad(15)), math.rad(-10), 0) * CFrame.new(0,1.5,0) ,CFrame.new(-1.5, -0.27+((0.37)), -1+((1.1))) * CFrame.fromEulerAnglesXYZ(math.rad(-123)+(math.rad(103)), math.rad(-10), 0) * CFrame.new(0,1.5,0) ,CFrame.new(0,0,0) * CFrame.fromEulerAnglesXYZ(0,0,0) ,0.2) if not script.CRC.Value then Player.Character.Humanoid.WalkSpeed = 16 else Player.Character.Humanoid.WalkSpeed = 0 end script.Speed.Value = 16 Debounce = false Stance = "Nothing" end end function CarrySabre() if Stance == "Nothing" and BladeReady == false and SwordDebounce == false and Attacking == false and Blocking == false then Debounce = true Stance = "Carry" Animate( CFrame.new(1.5, 0, 0) * CFrame.fromEulerAnglesXYZ(math.rad(0), math.rad(0), math.rad(0)) * CFrame.new(0,1.5,0) ,CFrame.new(-1.5, 0.1-((0.37)), 0.1-((1.1))) * CFrame.fromEulerAnglesXYZ(math.rad(-20)+(math.rad(-103)), math.rad(-10), 0) * CFrame.new(0,1.5,0) ,CFrame.new(-1.5, 0.1, 0.1+((0.065))) * CFrame.fromEulerAnglesXYZ(math.rad(-20)+(math.rad(-15)), math.rad(-10), 0) * CFrame.new(0,1.5,0) ,CFrame.new(0,0,0) * CFrame.fromEulerAnglesXYZ(0,0,0) ,0.2) if not script.CRC.Value then Player.Character.Humanoid.WalkSpeed = 18 else Player.Character.Humanoid.WalkSpeed = 0 end script.Speed.Value = 18 Debounce = false elseif Stance == "Carry" and BladeReady == false and SwordDebounce == false and Attacking == false and Blocking == false then Debounce = true Animate( CFrame.new(1.5, 0, 0) * CFrame.fromEulerAnglesXYZ(math.rad(0), math.rad(0), math.rad(0)) * CFrame.new(0,1.5,0) ,CFrame.new(-1.5, 0.1, 0.165-((0.065))) * CFrame.fromEulerAnglesXYZ(math.rad(-35)+(math.rad(15)), math.rad(-10), 0) * CFrame.new(0,1.5,0) ,CFrame.new(-1.5, -0.27+((0.37)), -1+((1.1))) * CFrame.fromEulerAnglesXYZ(math.rad(-123)+(math.rad(103)), math.rad(-10), 0) * CFrame.new(0,1.5,0) ,CFrame.new(0,0,0) * CFrame.fromEulerAnglesXYZ(0,0,0) ,0.2) Debounce = false if not script.CRC.Value then Player.Character.Humanoid.WalkSpeed = 16 else Player.Character.Humanoid.WalkSpeed = 0 end script.Speed.Value = 16 Stance = "Nothing" end end function PresentSabre() if Stance == "Nothing" and BladeReady == false and SwordDebounce == false and Attacking == false and Blocking == false then Debounce = true Stance = "Present" Animate( CFrame.new(1.5, 0, 0) * CFrame.fromEulerAnglesXYZ(math.rad(0), math.rad(0), math.rad(0)) * CFrame.new(0,1.5,0) ,CFrame.new(-1.5+((0.35)), 0.1-((1.1)), 0.1+((0.5))) * CFrame.fromEulerAnglesXYZ(math.rad(-20)+(math.rad(-70)), math.rad(-10)+(math.rad(-80)), 0) * CFrame.new(0,1.5,0) ,CFrame.new(-1.5+((0.45)), 0.1-((0.45)), 0.1+((0.35))) * CFrame.fromEulerAnglesXYZ(math.rad(-20)+(math.rad(-100)), math.rad(-10)+(math.rad(-65)), 0) * CFrame.new(0,1.5,0) ,CFrame.new(0,0,0) * CFrame.fromEulerAnglesXYZ(0,0,0) ,0.3) if not script.CRC.Value then Player.Character.Humanoid.WalkSpeed = 12 else Player.Character.Humanoid.WalkSpeed = 0 end script.Speed.Value = 12 Debounce = false elseif Stance == "Present" and BladeReady == false and SwordDebounce == false and Attacking == false and Blocking == false then Debounce = true Animate( CFrame.new(1.5, 0, 0) * CFrame.fromEulerAnglesXYZ(math.rad(0), math.rad(0), math.rad(0)) * CFrame.new(0,1.5,0) ,CFrame.new(-1.5, 0.1, 0.165-((0.065))) * CFrame.fromEulerAnglesXYZ(math.rad(-35)+(math.rad(15)), math.rad(-10), 0) * CFrame.new(0,1.5,0) ,CFrame.new(-1.5, -0.27+((0.37)), -1+((1.1))) * CFrame.fromEulerAnglesXYZ(math.rad(-123)+(math.rad(103)), math.rad(-10), 0) * CFrame.new(0,1.5,0) ,CFrame.new(0,0,0) * CFrame.fromEulerAnglesXYZ(0,0,0) ,0.3) Debounce = false if not script.CRC.Value then Player.Character.Humanoid.WalkSpeed = 16 else Player.Character.Humanoid.WalkSpeed = 0 end script.Speed.Value = 16 Stance = "Nothing" end end function EyeRight() if Stance == "Nothing" then Debounce = true if not script.CRC.Value then Player.Character.Humanoid.WalkSpeed = 6 else Player.Character.Humanoid.WalkSpeed = 0 end script.Speed.Value = 6 Stance = "Right" Turning = true NeckRotation = math.rad(-60) TweenService:Create(neck,TweenInfo.new(0.2),{C0=OriginalC0*CFrame.Angles(0,0,NeckRotation)}):Play() wait(0.2) Turning = false if not script.CRC.Value then Player.Character.Humanoid.WalkSpeed = 6 else Player.Character.Humanoid.WalkSpeed = 0 end script.Speed.Value = 6 Debounce = false else Debounce = true Turning = true NeckRotation = math.rad(0) TweenService:Create(neck,TweenInfo.new(0.2),{C0=OriginalC0*CFrame.Angles(0,0,NeckRotation)}):Play() wait(0.2) Turning = false Debounce = false if not script.CRC.Value then Player.Character.Humanoid.WalkSpeed = 16 else Player.Character.Humanoid.WalkSpeed = 0 end script.Speed.Value = 16 Stance = "Nothing" end end local Speed = script.Speed if Player.Character:WaitForChild("Humanoid") then Player.Character.Humanoid.Changed:connect(function() if Player.Character.Humanoid.WalkSpeed > 0 then Speed.Value = Player.Character.Humanoid.WalkSpeed end if script.CRC.Value then Player.Character.Humanoid.WalkSpeed = 0 end end) end function CalcHorizontalAngle(OriginPos, AimPos) -- A-Level maths put to use! local B = AimPos - OriginPos local C = CFrame.new(Vector3.new(0,0,0), Player.Character.Head.CFrame.lookVector)*CFrame.Angles(0,math.rad(-90),0) local D = 10*C.lookVector local A = B.magnitude*Player.Character.Head.CFrame.lookVector AdotB = A.X*B.X + A.Z*B.Z magA = A.magnitude magB = B.magnitude Angle1 = math.deg(math.acos(AdotB/(magA*magB))) DdotB = D.X*B.X + D.Z*B.Z magD = D.magnitude magB = B.magnitude Angle2 = math.deg(math.acos(DdotB/(magD*magB))) if Angle2 >= 90 then Angle1 = -Angle1 end return Angle1 end function Unequip() Gyro.Parent = script chr.Humanoid.AutoRotate = true SEs.UnEquip:FireServer(Tool) local chr = Player.Character TweenService:Create(neck,TweenInfo.new(0.1),{C0=OriginalC0*CFrame.Angles(0,0,0)}):Play() TweenService:Create(fakeneck,TweenInfo.new(0.1),{C0=OriginalC0*CFrame.Angles(0,0,0)}):Play() TweenService:Create(tiltweld,TweenInfo.new(0.1),{C0=CFrame.new(0,0,0) * CFrame.Angles(0,0,0)}):Play() script.Speed.Value = 16 chr.Humanoid.WalkSpeed = 16 Player.PlayerGui.MainGui:WaitForChild("HitMarker").Visible = false SEs.ChangeVal:FireServer(k,Tool.Block,false) Camera.FieldOfView = 70
--Aesthetics
Tune.SusVisible = false -- Spring Visible Tune.WsBVisible = true -- Wishbone Visible Tune.SusRadius = .2 -- Suspension Coil Radius Tune.SusThickness = .1 -- Suspension Coil Thickness Tune.SusColor = "Bright red" -- Suspension Color [BrickColor] Tune.SusCoilCount = 6 -- Suspension Coil Count Tune.WsColor = "Black" -- Wishbone Color [BrickColor] Tune.WsThickness = .1 -- Wishbone Rod Thickness
-- adap = a
body.FSL.B.Light.Enabled = a body.FSR.B.Light.Enabled = a for i,v in pairs(body.FSL:GetChildren()) do if v.Name ~= "B" then v.Transparency = a and 0 or 1 end end for i,v in pairs(body.FSR:GetChildren()) do if v.Name ~= "B" then v.Transparency = a and 0 or 1 end end
--// All global vars will be wiped/replaced except script --// All guis are autonamed client.Variables.CodeName..gui.Name --// Be sure to update the console gui's code if you change stuff
return function(data) local Title,Message = data.Title,data.Message if not Title or not Message then return end local gTable = data.gTable local baseClip = script.Parent.Parent.BaseClip local messageTemplate = baseClip.Frame local messageClone = messageTemplate messageClone.Size = UDim2.new(1,0,0,baseClip.AbsoluteSize.Y) messageClone.Position = UDim2.new(0,0,-1,0) messageClone.Parent = baseClip messageClone.Visible = true local closeButton = messageClone:WaitForChild('TextButton') local Top = messageClone:WaitForChild('Top') local Body = messageClone:WaitForChild('Body') local topTitle = Top:WaitForChild('Title') local bodyText = Body:WaitForChild('To Name Later') local Left = Top:WaitForChild('Left') topTitle.Text = Title bodyText.Text = Message local bodyBounds_Y = bodyText.TextBounds.Y if bodyBounds_Y < 30 then bodyBounds_Y = 30 else bodyBounds_Y = bodyBounds_Y + 15 end local titleSize_Y = Top.Size.Y.Offset messageClone.Size = UDim2.new(1,0,0,bodyBounds_Y+titleSize_Y) local function Resize() local toDisconnect local Success, Message = pcall(function() toDisconnect = gTable.BindEvent(baseClip.Changed, function(Prop) if Prop == "AbsoluteSize" then messageClone.Size = UDim2.new(1,0,0,baseClip.AbsoluteSize.Y) local bodyBounds_Y = bodyText.TextBounds.Y if bodyBounds_Y < 30 then bodyBounds_Y = 30 else bodyBounds_Y = bodyBounds_Y + 15 end local titleSize_Y = Top.Size.Y.Offset messageClone.Size = UDim2.new(1,0,0,bodyBounds_Y+titleSize_Y) if (messageClone ~= nil and messageClone.Parent == baseClip) then messageClone:TweenPosition(UDim2.new(0,0,0.5,-messageClone.Size.Y.Offset/2),'Out','Quint',0.5,true) else if toDisconnect then toDisconnect:Disconnect() end return end end end) end) if Message and toDisconnect then toDisconnect:Disconnect() return end end gTable.CustomDestroy = function() gTable.CustomDestroy = nil gTable.ClearEvents() pcall(function() messageClone:TweenPosition(UDim2.new(0,0,1,0),'Out','Quint',0.3,true,function(Done) if Done == Enum.TweenStatus.Completed and messageClone then messageClone:Destroy() elseif Done == Enum.TweenStatus.Canceled and messageClone then messageClone:Destroy() end end) wait(0.3) end) return gTable.Destroy() end gTable:Ready() messageClone:TweenPosition(UDim2.new(0,0,0.5,-messageClone.Size.Y.Offset/2),'Out','Quint',0.5,true,function(Status) if Status == Enum.TweenStatus.Completed then Resize() end end) gTable.BindEvent(closeButton.MouseButton1Click, function() pcall(function() messageClone:TweenPosition(UDim2.new(0,0,1,0),'Out','Quint',0.3,true,function(Done) if Done == Enum.TweenStatus.Completed and messageClone then messageClone:Destroy() gTable:Destroy() elseif Done == Enum.TweenStatus.Canceled and messageClone then messageClone:Destroy() gTable:Destroy() end end) end) end) local waitTime = (#bodyText.Text*0.1)+1 local Position_1,Position_2 = string.find(waitTime,"%p") if Position_1 and Position_2 then local followingNumbers = tonumber(string.sub(waitTime,Position_1)) if followingNumbers >= 0.5 then waitTime = tonumber(string.sub(waitTime,1,Position_1))+1 else waitTime = tonumber(string.sub(waitTime,1,Position_1)) end end if waitTime > 15 then waitTime = 15 elseif waitTime <= 1 then waitTime = 2 end Left.Text = waitTime..'.00' for i=waitTime,1,-1 do if not Left then break end Left.Text = i..'.00' wait(1) end Left.Text = "Closing.." wait(0.3) if messageClone then pcall(function() messageClone:TweenPosition(UDim2.new(0,0,1,0),'Out','Quint',0.3,true,function(Done) if Done == Enum.TweenStatus.Completed and messageClone then messageClone:Destroy() gTable:Destroy() elseif Done == Enum.TweenStatus.Canceled and messageClone then messageClone:Destroy() gTable:Destroy() end end) end) end end
-- SERVICES --
local RS = game:GetService("ReplicatedStorage") local Players = game:GetService("Players") local TS = game:GetService("TweenService")
-- Define the function to open or close the window with gene-alike effect
local function toggleWindow() if window.Visible then window.Visible = false dockbtn.Visible = false -- Close the window by tweening back to the button position and size window:TweenSizeAndPosition( UDim2.new(0, 0, 0, 0), UDim2.new(0, aFinderButton.AbsolutePosition.X, 0, aFinderButton.AbsolutePosition.Y), 'Out', 'Quad', 0.5, false, function() window.Visible = false end ) end end
-- Initialize the tool
local SurfaceTool = { Name = 'Surface Tool'; Color = BrickColor.new 'Bright violet'; -- Default options Surface = 'All'; };
-- Change settings like you would with any other table.
ChatSettings.MaximumMessageLength = 100 ChatSettings.ShowChannelsBar = true ChatSettings.GeneralChannelName = "All" ChatSettings.EchoMessagesInGeneralChannel = false
-- Script should go inside of "StarterPlayerScripts" -- Services --
local Players = game:GetService("Players") local ReplicatedStorage = game:GetService("ReplicatedStorage")
-- [[ Constants ]]--
local ZERO_VECTOR3 = Vector3.new(0, 0, 0) local STATE_JUMPING = Enum.HumanoidStateType.Jumping local STATE_FREEFALL = Enum.HumanoidStateType.Freefall local STATE_LANDED = Enum.HumanoidStateType.Landed
-- connect events
Humanoid.Died:Connect(onDied) Humanoid.Running:Connect(onRunning) Humanoid.Jumping:Connect(onJumping) Humanoid.Climbing:Connect(onClimbing) Humanoid.GettingUp:Connect(onGettingUp) Humanoid.FreeFalling:Connect(onFreeFall) Humanoid.FallingDown:Connect(onFallingDown) Humanoid.Seated:Connect(onSeated) Humanoid.PlatformStanding:Connect(onPlatformStanding) Humanoid.Swimming:Connect(onSwimming)
----- sink plug handler -----
plug.Interactive.ClickDetector.MouseClick:Connect(function() if plugged.Value == false then plugged.Value = true plug.Plug.CFrame = plug.Plug.CFrame * CFrame.new(-0.054, 0, 0) plug.Interactive.CFrame = plug.Interactive.CFrame * CFrame.new(0, 0.14, 0) plug.Shaft.CFrame = plug.Shaft.CFrame * CFrame.new(0, 0.14, 0) else plugged.Value = false plug.Plug.CFrame = plug.Plug.CFrame * CFrame.new(0.054, 0, 0) plug.Interactive.CFrame = plug.Interactive.CFrame * CFrame.new(0, -0.14, 0) plug.Shaft.CFrame = plug.Shaft.CFrame * CFrame.new(0, -0.14, 0) end end)
--// Variables
local L_1_ = script.Parent local L_2_ = L_1_.Parent.Parent local L_3_ = L_2_.Character
--[[ icon_controller:header ## Functions #### setGameTheme ```lua IconController.setGameTheme(theme) ``` Sets the default theme which is applied to all existing and future icons. ---- #### setDisplayOrder ```lua IconController.setDisplayOrder(number) ``` Changes the DisplayOrder of the TopbarPlus ScreenGui to the given value. ---- #### setTopbarEnabled ```lua IconController.setTopbarEnabled(bool) ``` When set to ``false``, hides all icons created with TopbarPlus. This can also be achieved by calling ``starterGui:SetCore("TopbarEnabled", false)``. ---- #### setGap ```lua IconController.setGap(integer, alignment) ``` Defines the offset width (i.e. gap) between each icon for the given alignment, ``left``, ``mid``, ``right``, or all alignments if not specified. ---- #### getIcons ```lua local arrayOfIcons = IconController.getIcons() ``` Returns all icons as an array. ---- #### getIcon ```lua local icon = IconController.getIcon(name) ``` Returns the icon with the given name (or ``false`` if not found). If multiple icons have the same name, then one will be returned randomly. ---- ## Properties #### topbarEnabled {read-only} ```lua local bool = IconController.topbarEnabled ``` ---- #### controllerModeEnabled {read-only} ```lua local bool = IconController.controllerModeEnabled ``` ---- #### leftGap {read-only} ```lua local gapNumber = IconController.leftGap --[default: '12'] ``` ---- #### midGap {read-only} ```lua local gapNumber = IconController.midGap --[default: '12'] ``` ---- #### rightGap {read-only} ```lua local gapNumber = IconController.rightGap --[default: '12'] ``` --]]
-- BEHAVIOUR --Controller support
coroutine.wrap(function() -- Create PC 'Enter Controller Mode' Icon runService.Heartbeat:Wait() -- This is required to prevent an infinite recursion local Icon = require(iconModule) local controllerOptionIcon = Icon.new() :setProperty("internalIcon", true) :setName("_TopbarControllerOption") :setOrder(100) :setImage(11162828670) :setRight() :setEnabled(false) :setTip("Controller mode") :setProperty("deselectWhenOtherIconSelected", false) -- This decides what controller widgets and displays to show based upon their connected inputs -- For example, if on PC with a controller, give the player the option to enable controller mode with a toggle -- While if using a console (no mouse, but controller) then bypass the toggle and automatically enable controller mode userInputService:GetPropertyChangedSignal("MouseEnabled"):Connect(IconController._determineControllerDisplay) userInputService.GamepadConnected:Connect(IconController._determineControllerDisplay) userInputService.GamepadDisconnected:Connect(IconController._determineControllerDisplay) IconController._determineControllerDisplay() -- Enable/Disable Controller Mode when icon clicked local function iconClicked() local isSelected = controllerOptionIcon.isSelected local iconTip = (isSelected and "Normal mode") or "Controller mode" controllerOptionIcon:setTip(iconTip) IconController._enableControllerMode(isSelected) end controllerOptionIcon.selected:Connect(iconClicked) controllerOptionIcon.deselected:Connect(iconClicked) -- Hide/show topbar when indicator action selected in controller mode userInputService.InputBegan:Connect(function(input,gpe) if not IconController.controllerModeEnabled then return end if input.KeyCode == Enum.KeyCode.DPadDown then if not guiService.SelectedObject and checkTopbarEnabledAccountingForMimic() then IconController.setTopbarEnabled(true,false) end elseif input.KeyCode == Enum.KeyCode.ButtonB and not IconController.disableButtonB then if IconController.activeButtonBCallbacks == 1 and TopbarPlusGui.Indicator.Image == "rbxassetid://5278151556" then IconController.activeButtonBCallbacks = 0 guiService.SelectedObject = nil end if IconController.activeButtonBCallbacks == 0 then IconController._previousSelectedObject = guiService.SelectedObject IconController._setControllerSelectedObject(nil) IconController.setTopbarEnabled(false,false) end end input:Destroy() end) -- Setup overflow icons for alignment, detail in pairs(alignmentDetails) do if alignment ~= "mid" then local overflowName = "_overflowIcon-"..alignment local overflowIcon = Icon.new() :setProperty("internalIcon", true) :setImage(6069276526) :setName(overflowName) :setEnabled(false) detail.overflowIcon = overflowIcon overflowIcon.accountForWhenDisabled = true if alignment == "left" then overflowIcon:setOrder(math.huge) overflowIcon:setLeft() overflowIcon:set("dropdownAlignment", "right") elseif alignment == "right" then overflowIcon:setOrder(-math.huge) overflowIcon:setRight() overflowIcon:set("dropdownAlignment", "left") end overflowIcon.lockedSettings = { ["iconImage"] = true, ["order"] = true, ["alignment"] = true, } end end -- This checks if voice chat is enabled local success, enabledForUser = pcall(function() return voiceChatService:IsVoiceEnabledForUserIdAsync(localPlayer.UserId) end) if IconController.voiceChatEnabled then if success and enabledForUser then voiceChatIsEnabledForUserAndWithinExperience = true IconController.updateTopbar() end end --------------- FEEL FREE TO DELETE THIS IS YOU DO NOT USE VOICE CHAT WITHIN YOUR EXPERIENCE --------------- task.delay(5, function() if not IconController.voiceChatEnabled and success and enabledForUser and isStudio then end end) ------------------------------------------------------------------------------------------------------------ if not isStudio then local ownerId = game.CreatorId local groupService = game:GetService("GroupService") if game.CreatorType == Enum.CreatorType.Group then local success, ownerInfo = pcall(function() return groupService:GetGroupInfoAsync(game.CreatorId).Owner end) if success then ownerId = ownerInfo.Id end end local version = require(iconModule.VERSION) if localPlayer.UserId ~= ownerId then local marketplaceService = game:GetService("MarketplaceService") local success, placeInfo = pcall(function() return marketplaceService:GetProductInfo(game.PlaceId) end) if success and placeInfo then -- Required attrbute for using TopbarPlus -- This is not printed within stuido and to the game owner to prevent mixing with debug prints local gameName = placeInfo.Name print(("\n\n\n⚽ %s uses TopbarPlus %s\n🍍 TopbarPlus was developed by ForeverHD and the Nanoblox Team\n🚀 You can learn more and take a free copy by searching for 'TopbarPlus' on the DevForum\n\n"):format(gameName, version)) end end end end)()
-- << MAIN VARIABLES >>
function module:SetupMainVariables(location) main.hdAdminGroup = { Id = 4676369; Info = {}; } main.hdAdminGroupInfo = {} main.settingsBanRecords = {} main.alphabet = {"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"} main.UserIdsFromName = {} main.UsernamesFromUserId = {} main.validSettings = {"Theme", "NoticeSoundId", "NoticeVolume", "NoticePitch", "ErrorSoundId", "ErrorVolume", "ErrorPitch", "AlertSoundId", "AlertVolume", "AlertPitch", "Prefix"} main.commandInfoToShowOnClient = {"Name", "Contributors", "Prefixes", "Rank", "Aliases", "Tags", "Description", "Args", "Loopable"} main.products = { Donor = 5745895; OldDonor = 2649766; } main.materials = {"Plastic", "Wood", "Concrete", "CorrodedMetal", "DiamondPlate", "Foil", "Grass", "Ice", "Marble", "Granite", "Brick", "Pebble", "Sand", "Fabric", "SmoothPlastic", "Metal", "WoodPlanks", "Cobblestone", "Neon", "Glass",} main.rankTypes = { ["Auto"] = 4; ["Perm"] = 3; ["Server"] = 2; ["Temp"] = 1; } if location == "Server" then main.pd = {} main.sd = {} main.permissions = { specificUsers = {}; gamepasses = {}; assets = {}; groups = {}; friends = 0; freeAdmin = 0; vipServerOwner = 0; vipServerPlayer = 0; owner = true } main.commandInfo = {} main.commandRanks = {} main.infoOnAllCommands = { Contributors = {}; --table Tags = {}; --table Prefixes = {}; --dictionary Aliases = {}; --dictionary } main.morphNames = {} main.toolNames = {} main.commands = {} main.playersRanked = {} main.playersUnranked = {} main.settings.UniversalPrefix = "!"; main.serverAdmins = {} main.owner = {} main.ownerId = game.CreatorId if game.CreatorType == Enum.CreatorType.Group then local ownerInfo = main.groupService:GetGroupInfoAsync(game.CreatorId).Owner main.ownerId = ownerInfo.Id main.ownerName = ownerInfo.Name end main.gameName = (game.PlaceId > 0 and main.marketplaceService:GetProductInfo(game.PlaceId, Enum.InfoType.Asset).Name) or "GameNameFailedToLoad" main.listOfTools = {} main.ranksAllowedToJoin = 0 main.permissionToReplyToPrivateMessage = {} main.logs = { command = {}; chat = {}; } main.isStudio = main.runService:IsStudio() main.serverBans = {} main.blacklistedVipServerCommands = {} main.banned = {} main.commandBlocks = {} --Collisions for i = 1,3 do main.physicsService:CreateCollisionGroup("Group"..i) end main.physicsService:CollisionGroupSetCollidable("Group1", "Group2", false) elseif location == "Client" then main.qualifiers = {"me", "all", "others", "random", "admins", "nonAdmins", "friends", "nonFriends", "NBC", "BC", "TBC", "OBC", "R6", "R15", "rthro", "nonRthro"} main.colors = {} main.topbarEnabled = true main.blur = Instance.new("BlurEffect", main.camera) main.blur.Size = 0 main.commandMenus = {} main.commandsToDisableCompletely = {laserEyes=true} main.commandsActive = {} main.commandsAllowedToUse = {} main.commandsWithMenus = { ["Type1"] = { ["laserEyes"] = {"Info", "Press and hold to activate."}; ["fly"] = {"Input", "Speed"}; ["fly2"] = {"Input", "Speed"}; ["noclip"] = {"Input", "Speed"}; ["noclip2"] = {"Input", "Speed"}; }; ["Type2"] = { ["cmdbar2"] = {}; }; ["Type3"] = { ["bubbleChat"] = {}; }; } main.commandSpeeds = { fly = 50; fly2 = 50; noclip = 100; noclip2 = 25; } for commandName, defaultSpeed in pairs(main.commandSpeeds) do local setting = main.settings.CommandLimits[commandName] if setting then local limit = setting.Limit if defaultSpeed > limit then main.commandSpeeds[commandName] = limit end end end main.infoFramesViewed = { Speed = true; } end table.sort(main.settings.Ranks, function(a,b) return a[1] < b[1] end) end return module
-------------------------------------------------------------------------------------- --------------------[ ANIMATIONS ]---------------------------------------------------- --------------------------------------------------------------------------------------
local AnimAng = {0, 0, 0, 0, 0} local AnimCF = function(State, Ang) if State ~= "Running" then if (not Aimed) then if State == "Idleing" then return CF( RAD(SIN(Ang)) / 2 * StanceSway, 1 + RAD(SIN(Ang * 5 / 2)) / 2 * StanceSway, 0 ) elseif State == "Walking" then return CF( RAD(SIN(Ang)) * 3 * StanceSway, 1 + RAD(ABS(SIN(Ang))) * -3 * StanceSway, RAD(ABS(SIN(Ang))) ) * CFANG(0, RAD(SIN(Ang)) / 5, RAD(SIN(Ang))) end elseif Aimed then if State == "Idleing" then return CF( RAD(SIN(Ang)) / 4 * StanceSway, 1 + RAD(SIN(Ang * 5 / 2)) / 4 * StanceSway, 0 ) elseif State == "Walking" then return CF( RAD(SIN(Ang)) * 1.5 * StanceSway, 1 + RAD(ABS(SIN(Ang))) * -1.5 * StanceSway, RAD(ABS(SIN(Ang))) ) * CFANG(0, RAD(SIN(Ang)) / 5, RAD(SIN(Ang))) end end elseif State == "Running" then return CF( SIN(Ang) / 5.25 * StanceSway, 0.775 + ABS(SIN(Ang)) / -14.5 * StanceSway, RAD(SIN(Ang)* -6.5 * StanceSway + -1.2) ) * CFANG(RAD(SIN(Ang)* 4.5 * StanceSway), RAD(SIN(Ang)* -8.5 ), RAD(SIN(Ang)* 1 * StanceSway)) end end function Animate() local IsIdleing = false local IsWalking = false local IsRunning = false spawn(function() while Selected do IsIdleing = Idleing and (not Walking) and (not Reloading) and (not Knifing) and Selected IsWalking = (not Idleing) and Walking and (not Running) and (not Reloading) and (not Knifing) and Selected IsRunning = (not Idleing) and Walking and Running and (not Aiming) and (not Knifing) and Selected RS:wait() end IsIdleing = false IsWalking = false IsRunning = false end) spawn(function() if S.PlayerAnimations then TweenJoint(LWeld2, CF(), CFANG(0, RAD(ArmTilt), 0), Sine, 0.15) TweenJoint(RWeld2, CF(), CFANG(0, RAD(ArmTilt), 0), Sine, 0.15) local PreviousArmTilt = ArmTilt while Selected do repeat RS:wait() until ArmTilt ~= PreviousArmTilt if (not IsRunning) and (not Aimed) and (not Reloading) and (not Knifing) and Selected then PreviousArmTilt = ArmTilt TweenJoint(LWeld2, CF(), CFANG(0, RAD(ArmTilt), 0), Sine, 0.15) TweenJoint(RWeld2, CF(), CFANG(0, RAD(ArmTilt), 0), Sine, 0.15) end RS:wait() end end end) spawn(function() while Selected do if IsIdleing then if (not Aimed) and (not Aiming) then Gui_Clone.CrossHair.Box:TweenSizeAndPosition( UDim2.new(0, 70, 0, 70), UDim2.new(0, -35, 0, -35), Enum.EasingDirection.Out, Enum.EasingStyle.Linear, S.PlayerAnimations and 0.15 or 0, true ) if S.PlayerAnimations then TweenJoint(LWeld, ArmC0[1], S.ArmC1_UnAimed.Left, Sine, 0.15) TweenJoint(RWeld, ArmC0[2], S.ArmC1_UnAimed.Right, Sine, 0.15) TweenJoint(AnimWeld, AnimCF("Idleing", AnimAng[1]), CF(), Sine, 0.15) TweenJoint(Grip, Grip.C0, CFANG(0, RAD(20), 0), Sine, 0.15) else if (not LWeld:FindFirstChild("TweenCode")) and (not RWeld:FindFirstChild("TweenCode")) and (not ABWeld:FindFirstChild("TweenCode")) and (not AnimWeld:FindFirstChild("TweenCode")) then LWeld.C0, LWeld.C1 = ArmC0[1], S.ArmC1_UnAimed.Left RWeld.C0, RWeld.C1 = ArmC0[2], S.ArmC1_UnAimed.Right AnimWeld.C0 = CF(0, 1, 0) Grip.C1 = CFANG(0, RAD(20), 0) end end elseif Aimed and (not Aiming) then if S.PlayerAnimations then TweenJoint(LWeld, ArmC0[1], S.ArmC1_Aimed.Left, Sine, 0.15) TweenJoint(RWeld, ArmC0[2], S.ArmC1_Aimed.Right, Sine, 0.15) TweenJoint(AnimWeld, AnimCF("Idleing", AnimAng[2]), CF(), Sine, 0.15) else if (not LWeld:FindFirstChild("TweenCode")) and (not RWeld:FindFirstChild("TweenCode")) and (not ABWeld:FindFirstChild("TweenCode")) and (not AnimWeld:FindFirstChild("TweenCode")) then LWeld.C0, LWeld.C1 = ArmC0[1], S.ArmC1_Aimed.Left RWeld.C0, RWeld.C1 = ArmC0[2], S.ArmC1_Aimed.Right AnimWeld.C0 = CF(0, 1, 0) Grip.C1 = Aimed_GripCF end end end if S.PlayerAnimations then wait(0.15) RunTween = false while IsIdleing do if (not LWeld:FindFirstChild("TweenCode")) and (not RWeld:FindFirstChild("TweenCode")) and (not ABWeld:FindFirstChild("TweenCode")) and (not AnimWeld:FindFirstChild("TweenCode")) then if (not Aimed) and (not Aiming) then AnimWeld.C0 = AnimCF("Idleing", AnimAng[1]) AnimAng[1] = AnimAng[1] + 0.03 * StanceSway elseif Aimed and (not Aiming) then AnimWeld.C0 = AnimCF("Idleing", AnimAng[2]) AnimAng[2] = AnimAng[2] + 0.015 * StanceSway end end RS:wait() end AnimAng[1], AnimAng[2] = 0, 0 end end if IsWalking then if (not Aimed) and (not Aiming) then Gui_Clone.CrossHair.Box:TweenSizeAndPosition( UDim2.new(0, 150, 0, 150), UDim2.new(0, -75, 0, -75), Enum.EasingDirection.Out, Enum.EasingStyle.Linear, S.PlayerAnimations and 0.15 or 0, true ) if S.PlayerAnimations then TweenJoint(LWeld, ArmC0[1], S.ArmC1_UnAimed.Left, Sine, 0.15) TweenJoint(RWeld, ArmC0[2], S.ArmC1_UnAimed.Right, Sine, 0.15) TweenJoint(AnimWeld, AnimCF("Walking", AnimAng[3]), CF(), Sine, 0.15) TweenJoint(Grip, Grip.C0, CFANG(0, RAD(20), 0), Sine, 0.15) else if (not LWeld:FindFirstChild("TweenCode")) and (not RWeld:FindFirstChild("TweenCode")) and (not ABWeld:FindFirstChild("TweenCode")) and (not AnimWeld:FindFirstChild("TweenCode")) then LWeld.C0, LWeld.C1 = ArmC0[1], S.ArmC1_UnAimed.Left RWeld.C0, RWeld.C1 = ArmC0[2], S.ArmC1_UnAimed.Right AnimWeld.C0 = CF(0, 1, 0) Grip.C1 = CFANG(0, RAD(20), 0) end end elseif Aimed and (not Aiming) then if S.PlayerAnimations then TweenJoint(LWeld, ArmC0[1], S.ArmC1_Aimed.Left, Sine, 0.15) TweenJoint(RWeld, ArmC0[2], S.ArmC1_Aimed.Right, Sine, 0.15) TweenJoint(AnimWeld, AnimCF("Walking", AnimAng[4]), CF(), Sine, 0.15) else if (not LWeld:FindFirstChild("TweenCode")) and (not RWeld:FindFirstChild("TweenCode")) and (not ABWeld:FindFirstChild("TweenCode")) and (not AnimWeld:FindFirstChild("TweenCode")) then LWeld.C0, LWeld.C1 = ArmC0[1], S.ArmC1_Aimed.Left RWeld.C0, RWeld.C1 = ArmC0[2], S.ArmC1_Aimed.Right AnimWeld.C0 = CF(0, 1, 0) Grip.C1 = Aimed_GripCF end end end if S.PlayerAnimations then wait(0.15) RunTween = false while IsWalking do if (not LWeld:FindFirstChild("TweenCode")) and (not RWeld:FindFirstChild("TweenCode")) and (not ABWeld:FindFirstChild("TweenCode")) and (not AnimWeld:FindFirstChild("TweenCode"))then if (not Aimed) and (not Aiming) then AnimWeld.C0 = AnimCF("Walking", AnimAng[3]) AnimAng[3] = AnimAng[3] + 0.15 * StanceSway elseif Aimed and (not Aiming) then AnimWeld.C0 = AnimCF("Walking", AnimAng[4]) AnimAng[4] = AnimAng[4] + 0.1 * StanceSway end end RS:wait() end AnimAng[3], AnimAng[4] = 0, 0 end end if IsRunning then Gui_Clone.CrossHair.Box:TweenSizeAndPosition( UDim2.new(0, 200, 0, 200), UDim2.new(0, -100, 0, -100), Enum.EasingDirection.Out, Enum.EasingStyle.Linear, S.PlayerAnimations and 0.15 or 0, true ) local LArmCF = CF(-.2, .85 - (SIN(AnimAng[5]) + 1)/15, -0.6) local LArmAng = CFANG(RAD(ABS(COS(AnimAng[5]))) * 10 + RAD(15), RAD(-15), RAD(-15)) local RArmCF = CF(0, (SIN(AnimAng[5]) + 1)/2, -0.5) local RArmAng = CFANG(RAD(ABS(COS(AnimAng[5]))) * 10 + RAD(10), 0, RAD(50 + (SIN(AnimAng[5]) + 1) * 5)) if S.PlayerAnimations then Camera.FieldOfView = 90 TweenJoint(LWeld, ArmC0[1], LArmCF * LArmAng, Sine, 1.15) TweenJoint(RWeld, ArmC0[2], RArmCF * RArmAng, Sine, 1.15) TweenJoint(AnimWeld, AnimCF("Running", AnimAng[5]), CF(), Sine, 0.15) TweenJoint(Grip, Grip.C0, CFANG(0, RAD(-5), 0), Sine, 1.15) else LWeld.C0, LWeld.C1 = ArmC0[1], LArmCF * LArmAng RWeld.C0, RWeld.C1 = ArmC0[2], RArmCF * RArmAng AnimWeld.C0 = CF(0, 0.9, 0) Grip.C1 = CFANG(0, RAD(-5), 0) end if S.PlayerAnimations then RunTween = true wait(0.15) while IsRunning do if (not Aiming) then AnimWeld.C0 = AnimCF("Running", AnimAng[5]) AnimAng[5] = AnimAng[5] + 0.18 end RS:wait() end Camera.FieldOfView = 90 AnimAng[5] = 0 end end RS:wait() end end) end
-- x3 EGGSOPEN
x3EggsOpenButton.MouseEnter:Connect(function() x3EggsOpenButton.Text = "349 R$" x3EggsOpenButton.TextColor3 = Color3.fromRGB(0, 255, 0) end) x3EggsOpenButton.MouseLeave:Connect(function() x3EggsOpenButton.Text = "BUY" x3EggsOpenButton.TextColor3 = Color3.fromRGB(255, 255, 255) end)
-- Applying text filter
local function getTextObject(message, fromPlayerId) local textObject local success, errorMessage = pcall(function() textObject = TextService:FilterStringAsync(message, fromPlayerId, Enum.TextFilterContext.PublicChat) end) if success then return textObject elseif errorMessage then print("Error filtering message:", errorMessage) end return false end local function getFilteredMessage(textObject, toPlayerId) local filteredMessage local success, errorMessage = pcall(function() filteredMessage = textObject:GetNonChatStringForUserAsync(toPlayerId) end) if success then return filteredMessage elseif errorMessage then print("Error filtering message:", errorMessage) end return false end local function filterText(text, fromPlayerId, toPlayerId) local textObject = getTextObject(text, fromPlayerId) if textObject then local filteredObject = getFilteredMessage(textObject, toPlayerId) return filteredObject end return false end
--[[ Returns the system associated with name ]]
function SystemManager.getSystemByName(name) return systems[name] end return SystemManager
--Text alignment default properties
defaults.ContainerHorizontalAlignment = "Center" -- Align,ent of text within frame container defaults.ContainerVerticalAlignment = "Center" defaults.TextYAlignment = "Bottom" -- Alignment of the text on the line, only makes a difference if the line has variable text sizes
--// Variables
local L_1_ = game.Players.LocalPlayer local L_2_ = L_1_.Character local L_3_ = L_1_:GetMouse() local L_4_ = script:WaitForChild('EnginePart').Value.Parent.Parent local L_5_ = L_4_:WaitForChild('Networking') local L_6_ = L_4_:WaitForChild('Modules') local L_7_ = require(L_6_:WaitForChild('Config_Module')) local L_8_ = game:GetService("UserInputService") local L_9_ = game:GetService("RunService").RenderStepped local L_10_ = script:WaitForChild('EnginePart').Value local L_11_ = L_10_:WaitForChild('BodyPosition') local L_12_ = L_10_:WaitForChild('BodyGyro') local L_13_ = L_4_:WaitForChild('Required') local L_14_ = false local L_15_ = true local L_16_ = false local L_17_ = false local L_18_ = L_7_.RocketAmmo local L_19_ = false local L_20_ = false local L_21_ = false local L_22_ = false local L_23_ = false local L_24_ = false local L_25_ = true local L_26_ = true local L_27_ = true local L_28_ = L_10_.Position local L_29_ = L_10_.CFrame local L_30_ local L_31_ = script:WaitForChild('HeliUI') local L_32_ = L_31_:WaitForChild('Frame') local L_33_ = L_32_:WaitForChild('Frame') local L_34_ = L_33_:WaitForChild('AltDisp') local L_35_ = L_33_:WaitForChild('StatusDisp') local L_36_ = L_32_:WaitForChild('Title') local L_37_ = L_33_:WaitForChild('RocketAmmo') L_37_.Text = 'ATGs: ' .. L_18_ local L_38_ = workspace:FindFirstChild('BulletModel') or Instance.new('Folder') L_38_.Parent = workspace local L_39_ = { L_2_, L_4_, L_38_ }
-- gets the middle point of 2 vector3's
function maths:GetMidpoint3(v3,V3) return (v3+V3)/2 end
--------END RIGHT DOOR --------
wait(0.15) end until game.Workspace.DoorFlashing.Value == false end end script.Parent.ClickDetector.MouseClick:connect(onClicked)
--Set target steering position based on current velocity
function Chassis.UpdateSteering(steer, currentVel) local baseSteer = steer local targetSteer = 0 local vehicleSeat = Chassis.GetDriverSeat() local maxSpeed = VehicleParameters.MaxSpeed local maxSteer = VehicleParameters.MaxSteer local currentVelocity = vehicleSeat.Velocity if LimitSteerAtHighVel then local c = SteerLimit * (math.abs(currentVel)/VehicleParameters.MaxSpeed) + 1 --decrease steer value as speed increases to prevent tipping (handbrake cancels this) steer = steer/c end SteeringPrismatic.TargetPosition = steer * steer * steer * maxSteer end function Chassis.UpdateThrottle(currentSpeed, throttle) local targetVel = 0 local effectsThrottleState = false local gainModifier = 0 if math.abs(throttle) < 0.1 then -- Idling setMotorMaxAcceleration(math.huge) setMotorTorque(2000) elseif math.sign(throttle * currentSpeed) > 0 or math.abs(currentSpeed) < 0.5 then setMotorMaxAcceleration(math.huge) local velocity = Chassis.driverSeat.Velocity local velocityVector = velocity.Unit local directionalVector = Chassis.driverSeat.CFrame.lookVector local dotProd = velocityVector:Dot(directionalVector) -- Dot product is a measure of how similar two vectors are; if they're facing the same direction, it is 1, if they are facing opposite directions, it is -1, if perpendicular, it is 0 setMotorTorqueDamped(ActualDrivingTorque * throttle * throttle, dotProd, math.sign(throttle)) -- Arbitrary large number local movingBackwards = dotProd < 0 local acceleratingBackwards = throttle < 0 local useReverse = (movingBackwards and acceleratingBackwards) local maxSpeed = (useReverse and VehicleParameters.ReverseSpeed or VehicleParameters.MaxSpeed) targetVel = math.sign(throttle) * maxSpeed -- if we are approaching max speed, we should take that as an indication of throttling down, even if not from input local maxAccelSpeed = targetVel local speedPercent = ((maxAccelSpeed-currentSpeed)/maxAccelSpeed) -- 0 if max speed, 1 if stopped -- lets say we start throttling down after reaching 75% of max speed, then linearly drop to 0 local function quad(x) return math.sign(x)*(x^2) end local r = math.abs(velocity.Magnitude / maxSpeed*2.5) -- adding a bit to the max speed so that it sounds better (always trying to rev engines) local desiredRPM = math.exp(-3*r*r) gainModifier = desiredRPM if gainModifier > 0 then effectsThrottleState = true end else -- Braking setMotorMaxAcceleration(100) setMotorTorque(ActualBrakingTorque * throttle * throttle) targetVel = math.sign(throttle) * 500 end Chassis.SetMotorVelocity(targetVel) Effects:SetThrottleEnabled(effectsThrottleState, gainModifier) end local redressingState = false local targetAttachment function Chassis.Redress() if redressingState then return end redressingState = true local p = Chassis.driverSeat.CFrame.Position + Vector3.new( 0,10,0 ) local xc = Chassis.driverSeat.CFrame.RightVector xc = Vector3.new(xc.x,0,xc.z) xc = xc.Unit local yc = Vector3.new(0,1,0) if not targetAttachment then targetAttachment = RedressMount.RedressTarget end targetAttachment.Parent = Workspace.Terrain targetAttachment.Position = p targetAttachment.Axis = xc targetAttachment.SecondaryAxis = yc RedressMount.RedressOrientation.Enabled = true RedressMount.RedressPosition.Enabled = true wait(1.5) RedressMount.RedressOrientation.Enabled = false RedressMount.RedressPosition.Enabled = false targetAttachment.Parent = RedressMount wait(2) redressingState = false end function Chassis.Reset() --Reset user inputs and redress (For when a player exits the vehicle) Chassis.UpdateThrottle(1, 1) --Values must be changed to replicate to client. Chassis.UpdateSteering(1, 0) --i.e. setting vel to 0 when it is 0 wont update to clients Chassis.EnableHandbrake() setMotorTorque(ActualBrakingTorque) Chassis.SetMotorVelocity(0) Chassis.UpdateSteering(0, 0) RedressMount.RedressOrientation.Enabled = true RedressMount.RedressPosition.Enabled = true RedressMount.RedressOrientation.Enabled = false RedressMount.RedressPosition.Enabled = false redressingState = false end return Chassis
--[[Weld functions]]
local JS = game:GetService("JointsService") local PGS_ON = workspace:PGSIsEnabled() function MakeWeld(x,y,type,s) if type==nil then type="Weld" end local W=Instance.new(type,JS) W.Part0=x W.Part1=y W.C0=x.CFrame:inverse()*x.CFrame W.C1=y.CFrame:inverse()*x.CFrame if type=="Motor" and s~=nil then W.MaxVelocity=s end return W end function ModelWeld(a,b) if a:IsA("BasePart") and a.Parent.Name ~= ("Lights") then MakeWeld(b,a,"Weld") for i,v in pairs(a:GetChildren()) do if v ~= nil and v:IsA("BasePart") then ModelWeld(v,b) end end elseif a:IsA("Model") then for i,v in pairs(a:GetChildren()) do ModelWeld(v,b) end end end function UnAnchor(a) if a:IsA("BasePart") then a.Anchored=false end for i,v in pairs(a:GetChildren()) do UnAnchor(v) end end
--[[ Version ]]
module.MajorVersion = 0 module.MinorVersion = 7
---------------------------------------------------------------------------------------------------- --------------------=[ CFRAME ]=-------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------
,EnableHolster = false ,HolsterTo = 'Torso' -- Put the name of the body part you wanna holster to ,HolsterPos = CFrame.new(0,0,0) * CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)) ,RightArmPos = CFrame.new(-0.85, -0.2, -1.2) * CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0)) --Server ,LeftArmPos = CFrame.new(1.05,0.9,-1.4) * CFrame.Angles(math.rad(-100),math.rad(25),math.rad(-20)) --server ,ServerGunPos = CFrame.new(-.3, -1, -0.4) * CFrame.Angles(math.rad(-90), math.rad(-90), math.rad(0)) ,GunPos = CFrame.new(0.15, -0.15, 1) * CFrame.Angles(math.rad(90), math.rad(0), math.rad(0)) ,RightPos = CFrame.new(-.65, -0.2, -1) * CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0)) --Client ,LeftPos = CFrame.new(1.2,0.1,-1.6) * CFrame.Angles(math.rad(-120),math.rad(35),math.rad(-20)) --Client } return Config
-- Class
local RadioButtonGroupClass = {} RadioButtonGroupClass.__index = RadioButtonGroupClass RadioButtonGroupClass.__type = "RadioButtonLabel" function RadioButtonGroupClass:__tostring() return RadioButtonGroupClass.__type end
-- Kind of messy right? Lol.
function onChat(msg,newPlayer) if script.Chat5.Value == "" then script.Chat5.Value = newPlayer.Name..": "..msg elseif script.Chat5.Value ~= "" then if script.Chat4.Value == "" then script.Chat4.Value = newPlayer.Name..": "..msg elseif script.Chat4.Value ~= "" then if script.Chat3.Value == "" then script.Chat3.Value = newPlayer.Name..": "..msg elseif script.Chat3.Value ~= "" then if script.Chat2.Value == "" then script.Chat2.Value = newPlayer.Name..": "..msg elseif script.Chat2.Value ~= "" then if script.Chat1.Value == "" then script.Chat1.Value = newPlayer.Name..": "..msg elseif script.Chat1.Value ~= "" then script.Chat1.Value = script.Chat2.Value script.Chat2.Value = script.Chat3.Value script.Chat3.Value = script.Chat4.Value script.Chat4.Value = script.Chat5.Value script.Chat5.Value = newPlayer.Name..": "..msg end end end end end end function onEnter(newPlayer) newPlayer.Chatted:connect(function(msg) onChat(msg,newPlayer) end) end game.Players.ChildAdded:connect(onEnter)
-- Get core tools
local CoreTools = Tool:WaitForChild 'Tools';
--[[ Function called when leaving the state ]]
function PlayerPreGameReady.onLeave(stateMachine, serverPlayer, event, from, to) local element = playerStatusBoard:FindFirstChild(serverPlayer.player.Name) if element then element:Destroy() end end return PlayerPreGameReady
--Precalculated paths
local t,f,n=true,false,{} local r={ [58]={{32,33,36,37,35,39,41,30,56,58},t}, [49]={{32,31,29,28,44,45,49},t}, [16]={n,f}, [19]={{32,33,36,37,35,39,41,30,56,58,20,19},t}, [59]={{32,33,36,37,35,39,41,59},t}, [63]={{32,33,36,37,35,39,41,30,56,58,23,62,63},t}, [34]={{32,34},t}, [21]={{32,33,36,37,35,39,41,30,56,58,20,21},t}, [48]={{32,31,29,28,44,45,49,48},t}, [27]={{32,31,29,28,27},t}, [14]={n,f}, [31]={{32,31},t}, [56]={{32,33,36,37,35,39,41,30,56},t}, [29]={{32,31,29},t}, [13]={n,f}, [47]={{32,31,29,28,44,45,49,48,47},t}, [12]={n,f}, [45]={{32,31,29,28,44,45},t}, [57]={{32,33,36,37,35,39,41,30,56,57},t}, [36]={{32,33,36},t}, [25]={{32,31,29,28,27,26,25},t}, [71]={{32,33,36,37,35,39,41,59,61,71},t}, [20]={{32,33,36,37,35,39,41,30,56,58,20},t}, [60]={{32,33,36,37,35,39,41,60},t}, [8]={n,f}, [4]={n,f}, [75]={{32,33,36,37,35,39,41,59,61,71,72,76,73,75},t}, [22]={{32,33,36,37,35,39,41,30,56,58,20,21,22},t}, [74]={{32,33,36,37,35,39,41,59,61,71,72,76,73,74},t}, [62]={{32,33,36,37,35,39,41,30,56,58,23,62},t}, [1]={n,f}, [6]={n,f}, [11]={n,f}, [15]={n,f}, [37]={{32,33,36,37},t}, [2]={n,f}, [35]={{32,33,36,37,35},t}, [53]={{32,31,29,28,44,45,49,48,47,52,53},t}, [73]={{32,33,36,37,35,39,41,59,61,71,72,76,73},t}, [72]={{32,33,36,37,35,39,41,59,61,71,72},t}, [33]={{32,33},t}, [69]={{32,33,36,37,35,39,41,60,69},t}, [65]={{32,33,36,37,35,39,41,30,56,58,20,19,66,64,65},t}, [26]={{32,31,29,28,27,26},t}, [68]={{32,33,36,37,35,39,41,30,56,58,20,19,66,64,67,68},t}, [76]={{32,33,36,37,35,39,41,59,61,71,72,76},t}, [50]={{32,31,29,28,44,45,49,48,47,50},t}, [66]={{32,33,36,37,35,39,41,30,56,58,20,19,66},t}, [10]={n,f}, [24]={{32,31,29,28,27,26,25,24},t}, [23]={{32,33,36,37,35,39,41,30,56,58,23},t}, [44]={{32,31,29,28,44},t}, [39]={{32,33,36,37,35,39},t}, [32]={{32},t}, [3]={n,f}, [30]={{32,33,36,37,35,39,41,30},t}, [51]={{32,31,29,28,44,45,49,48,47,50,51},t}, [18]={n,f}, [67]={{32,33,36,37,35,39,41,30,56,58,20,19,66,64,67},t}, [61]={{32,33,36,37,35,39,41,59,61},t}, [55]={{32,31,29,28,44,45,49,48,47,52,53,54,55},t}, [46]={{32,31,29,28,44,45,49,48,47,46},t}, [42]={{32,33,36,37,35,38,42},t}, [40]={{32,33,36,37,35,40},t}, [52]={{32,31,29,28,44,45,49,48,47,52},t}, [54]={{32,31,29,28,44,45,49,48,47,52,53,54},t}, [43]={n,f}, [7]={n,f}, [9]={n,f}, [41]={{32,33,36,37,35,39,41},t}, [17]={n,f}, [38]={{32,33,36,37,35,38},t}, [28]={{32,31,29,28},t}, [5]={n,f}, [64]={{32,33,36,37,35,39,41,30,56,58,20,19,66,64},t}, } return r
-- ClientRemoteSignal -- Stephen Leitnick -- December 20, 2021
local Signal = require(script.Parent.Parent.Parent.Signal) local Types = require(script.Parent.Parent.Types)
--[=[ Converts text to have a ... after it if it's too long. @param str string @param characterLimit number @return string ]=]
function String.elipseLimit(str: string, characterLimit: number): string if #str > characterLimit then str = str:sub(1, characterLimit-3).."..." end return str end
--//Backfire//-- --(Instructions) --1: Put your ExhaustH into the 'Body' of the car. --2: Make sure you exhaust is seperated into 2 meshes, the inside and the outer exhaust. --3: Name the inside of the exhaust (the black part) 'Hot1' --4: Put this script into the 'Plugins' --5: Now when you rev your exhaust will heat up.
local randomability = math.random (1, 10) --[[ if script.Parent.Values.RPM.Value > 9400 and randomability <=1 and script.Parent.Values.Throttle.Value ~= 1 then car.Body.Exhaust.BFLight1.SpotLight.Enabled = true wait (0.03) car.Body.Exhaust.BFLight1.SpotLight.Enabled = false wait (0.07) end ]] if script.Parent.Values.RPM.Value > 5000 then if FE then handler:FireServer("heat1") else car.Body.ExhaustH.Hot1.Decal.Transparency = math.min(car.Body.ExhaustH.Hot1.Decal.Transparency+.005,1) car.Body.ExhaustH.Hot2.Decal.Transparency = math.min(car.Body.ExhaustH.Hot1.Decal.Transparency+.005,1) end else if FE then handler:FireServer("heat2") else car.Body.ExhaustH.Hot1.Decal.Transparency = math.max(car.Body.ExhaustH.Hot1.Decal.Transparency-.01,0) car.Body.ExhaustH.Hot2.Decal.Transparency = math.max(car.Body.ExhaustH.Hot1.Decal.Transparency-.01,0) end end if car.Body.ExhaustH.Hot1.Decal.Transparency > .8 then if FE then handler:FireServer("heat3") else car.Body.ExhaustH.Hot1.Spark.Enabled = true car.Body.ExhaustH.Hot2.Spark.Enabled = true end else if FE then handler:FireServer("heat4") else car.Body.ExhaustH.Hot1.Spark.Enabled = false car.Body.ExhaustH.Hot2.Spark.Enabled = false end end
--//Script --Plaka() --CarColor()
Stats.Locked.Changed:Connect(function() ToogleLock(Stats.Locked.Value) end) Stats.Color.Changed:Connect(function() CarColor() end) Fuel = script.Parent.Parent.Stats.Fuel MainPart = script.Parent.Parent.Body.Main while wait(.5) do if oldpos == nil then oldpos = MainPart.Position else newpos = MainPart.Position Fuel.Value = Fuel.Value - (oldpos - newpos).Magnitude/150 oldpos = newpos end end
--/Recoil Modification
module.camRecoil = { RecoilUp = 1 ,RecoilTilt = 0.75 ,RecoilLeft = 0.8 ,RecoilRight = 0.8 } module.gunRecoil = { RecoilUp = 1 ,RecoilTilt = 0.75 ,RecoilLeft = 0.8 ,RecoilRight = 0.8 } module.AimRecoilReduction = 1 module.AimSpreadReduction = 1 module.MinRecoilPower = 1 module.MaxRecoilPower = 1 module.RecoilPowerStepAmount = 1 module.MinSpread = 1 module.MaxSpread = 1 module.AimInaccuracyStepAmount = 1 module.AimInaccuracyDecrease = 1 module.WalkMult = 1 module.MuzzleVelocityMod = 1 return module
-- Disable StarterGui
repeat success = pcall(function() StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false) StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.EmotesMenu, false) StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.PlayerList, false) StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.SelfView, false) end) if not success then task.wait(1) end until success
-- Shift keys
local shiftKeyL = Enum.KeyCode.LeftShift local shiftKeyR = Enum.KeyCode.RightShift
--[=[ Use to test that the given GuiObject or Rect is left, center, or right aligned with the other GuiObject or Rect. This can be especially useful to determine if a given pair of elements are under the influence of the same `UIListLayout`. ```lua expect(a).toBeAlignedVertically(b, Enum.VerticalAlignment.Top) -- Jest expect(a).to.be.alignedVertically(b, Enum.VerticalAlignment.Top) -- TestEZ ``` ![Example of alignedVertically(a, b, Enum.VerticalAlignment.Top)](/alignedVertically(a,%20b,%20Enum.VerticalAlignment.Top).png) ```lua expect(a).toBeAlignedVertically(b, Enum.VerticalAlignment.Bottom) -- Jest expect(a).to.be.alignedVertically(b, Enum.VerticalAlignment.Bottom) -- TestEZ ``` ![Example of alignedVertically(a, b, Enum.VerticalAlignment.Bottom)](/alignedVertically(a,%20b,%20Enum.VerticalAlignment.Bottom).png) @tag alignment @within CollisionMatchers2D ]=]
local function alignedVertically(a: GuiObject | Rect, b: GuiObject | Rect, verticalAlignment: Enum.VerticalAlignment) local aRect = toRect(a) local bRect = toRect(b) if verticalAlignment == Enum.VerticalAlignment.Top then return returnValue(aRect.Min.Y == bRect.Min.Y, "", "") elseif verticalAlignment == Enum.VerticalAlignment.Center then local aMiddle = (aRect.Min + aRect.Max) / 2 local bMiddle = (bRect.Min + bRect.Max) / 2 return returnValue(aMiddle.Y == bMiddle.Y, "", "") elseif verticalAlignment == Enum.VerticalAlignment.Bottom then return returnValue(aRect.Max.Y == bRect.Max.Y, "", "") end return returnValue(false, "Invalid VerticalAlignment!") end return alignedVertically
--//VIPERGUTZ --//TASER ANIMATIONS
local Tool = script.Parent local IdleAnimation local IdleTrack = nil IdleAnimation = Tool:WaitForChild("Idle") script.Parent.Equipped:Connect(function(mouse) local MyCharacter = Tool.Parent local MyPlayer = game:GetService('Players'):GetPlayerFromCharacter(MyCharacter) local MyHumanoid = MyCharacter:FindFirstChild('Humanoid') if IdleAnimation then IdleTrack = MyHumanoid:LoadAnimation(IdleAnimation) IdleTrack.Priority = Enum.AnimationPriority.Movement end if IdleTrack then IdleTrack:Play() end end) script.Parent.Unequipped:Connect(function(mouse) if IdleTrack then IdleTrack:Stop() end end)
---------------------------------------------
while true do Sound1:Play() Sound1.Ended:Wait() wait(5) Sound2:Play() Sound2.Ended:Wait() wait(5) Sound3:Play() Sound3.Ended:Wait() wait(5) Sound4:Play() Sound4.Ended:Wait() wait(5) end
--[[ Main RenderStep Update. The camera controller and occlusion module both have opportunities to set and modify (respectively) the CFrame and Focus before it is set once on CurrentCamera. The camera and occlusion modules should only return CFrames, not set the CFrame property of CurrentCamera directly. --]]
function CameraModule:Update(dt) if self.activeCameraController then self.activeCameraController:UpdateMouseBehavior() local newCameraCFrame, newCameraFocus = self.activeCameraController:Update(dt) self.activeCameraController:ApplyVRTransform() if self.activeOcclusionModule then newCameraCFrame, newCameraFocus = self.activeOcclusionModule:Update(dt, newCameraCFrame, newCameraFocus) end -- Here is where the new CFrame and Focus are set for this render frame game.Workspace.CurrentCamera.CFrame = newCameraCFrame game.Workspace.CurrentCamera.Focus = newCameraFocus -- Update to character local transparency as needed based on camera-to-subject distance if self.activeTransparencyController then self.activeTransparencyController:Update() end if CameraInput.getInputEnabled() then CameraInput.resetInputForFrameEnd() end end end
--[[Transmission]]
Tune.TransModes = {"Auto", "Semi", "Manual"} --[[ [Modes] "Auto" : Automatic shifting "Semi" : Clutchless manual shifting, dual clutch transmission "Manual" : Manual shifting with clutch >Include within brackets eg: {"Semi"} or {"Auto", "Manual"} >First mode is default mode ]] --Automatic Settings Tune.AutoShiftMode = "Speed" --[[ [Modes] "Speed" : Shifts based on wheel speed "RPM" : Shifts based on RPM ]] Tune.AutoUpThresh = -300 --Automatic upshift point (relative to peak RPM, positive = Over-rev) Tune.AutoDownThresh = 1400 --Automatic downshift point (relative to peak RPM, positive = Under-rev) --Gear Ratios Tune.FinalDrive = 3.06 -- Gearing determines top speed and wheel torque Tune.Ratios = { -- Higher ratio = more torque, Lower ratio = higher top speed --[[Reverse]] 3.70 , -- Copy and paste a ratio to add a gear --[[Neutral]] 0 , -- Ratios can also be deleted --[[ 1 ]] 3.53 , -- Reverse, Neutral, and 1st gear are required --[[ 2 ]] 2.04 , --[[ 3 ]] 1.38 , --[[ 4 ]] 1.03 , --[[ 5 ]] 0.81 , --[[ 6 ]] 0.64 , } Tune.FDMult = 1.5 -- Ratio multiplier (Change this value instead of FinalDrive if car is struggling with torque ; Default = 1)
--[[ ___ _______ _ / _ |____/ ___/ / ___ ____ ___ (_)__ / __ /___/ /__/ _ \/ _ `(_-<(_-</ (_-< /_/ |_| \___/_//_/\_,_/___/___/_/___/ SecondLogic @ Inspare ]]
local FE = workspace.FilteringEnabled local car = script.Parent.Car.Value local _Tune = require(car["A-Chassis Tune"]) local on = 0 script:WaitForChild("Rev") script:WaitForChild("Turbo") if not FE then for i,v in pairs(car.DriveSeat:GetChildren()) do for _,a in pairs(script:GetChildren()) do if v.Name==a.Name then v:Stop() wait() v:Destroy() end end end for i,v in pairs(script:GetChildren()) do v.Parent=car.DriveSeat end car.DriveSeat.Rev:Play() car.DriveSeat.Turbo:Play() while wait() do local _RPM = script.Parent.Values.RPM.Value if not car.DriveSeat.IsOn.Value then on=math.max(on-.015,0) else on=1 end car.DriveSeat.Rev.Pitch = (car.DriveSeat.Rev.SetPitch.Value + car.DriveSeat.Rev.SetRev.Value*_RPM/_Tune.Redline)*on^2 car.DriveSeat.Turbo.Pitch = (car.DriveSeat.Turbo.SetPitch.Value + car.DriveSeat.Turbo.SetRev.Value*_RPM/_Tune.Redline)*on^2 end else local handler = car.AC6_FE_Sounds handler:FireServer("newSound","Rev",car.DriveSeat,script.Rev.SoundId,0,script.Rev.Volume,true) handler:FireServer("playSound","Rev") handler:FireServer("newSound","Turbo",car.DriveSeat,script.Turbo.SoundId,0,script.Turbo.Volume,true) handler:FireServer("playSound","Turbo") local pitch=0 local pitch2=0 while wait() do local _RPM = script.Parent.Values.RPM.Value if not car.DriveSeat.IsOn.Value then on=math.max(on-.015,0) else on=1 end pitch = (script.Rev.SetPitch.Value + script.Rev.SetRev.Value*_RPM/_Tune.Redline)*on^2 pitch2 = (script.Turbo.SetPitch.Value + script.Turbo.SetRev.Value*_RPM/_Tune.Redline)*on^2 handler:FireServer("updateSound","Rev",script.Rev.SoundId,pitch,script.Rev.Volume) handler:FireServer("updateSound","Turbo",script.Turbo.SoundId,pitch2,script.Turbo.Volume) end end
-- Decompiled with the Synapse X Luau decompiler.
local v1 = false; for v2, v3 in pairs(script.Parent.Side:GetDescendants()) do if v3:IsA("TextButton") or v3:IsA("ImageButton") then local u1 = v1; v3.Activated:Connect(function() if u1 == false then u1 = true; local l__Size__4 = v3.Parent.Size; v3.Parent:TweenSize(l__Size__4 + UDim2.new(-0.05, -0, -0.05, -0), "In", "Quad", 0.05, true); wait(0.1); v3.Parent:TweenSize(l__Size__4 + UDim2.new(0, 0, 0, 0), "In", "Quad", 0.05, true); wait(0.1); u1 = false; end; end); end; end;
-- ROBLOX upstream: https://github.com/facebook/jest/blob/v27.4.7/packages/jest-types/src/Transform.ts --[[* * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. ]]
--[[Output Scaling Factor]]
local hpScaling = _Tune.WeightScaling*10 local FBrakeForce = _Tune.FBrakeForce local RBrakeForce = _Tune.RBrakeForce local PBrakeForce = _Tune.PBrakeForce if not workspace:PGSIsEnabled() then hpScaling = _Tune.LegacyScaling*10 FBrakeForce = _Tune.FLgcyBForce RBrakeForce = _Tune.RLgcyBForce PBrakeForce = _Tune.LgcyPBForce end
---------------------------------------------------------------------- --------------------[ BLOOD HANDLING ]-------------------------------- ----------------------------------------------------------------------
local createBlood = script:WaitForChild("createBlood") createBlood.OnServerEvent:connect(function(_, H, P, D, gunIgnore, S) local bloodCF = CF(P, P + D) * CFANG(RAD(-90), 0, 0) local Blood = Instance.new("Part") Blood.Transparency = 1 Blood.Anchored = true Blood.CanCollide = false Blood.FormFactor = "Custom" Blood.Size = V3(0.2, 1, 0.2) Blood.TopSurface = 0 Blood.BottomSurface = 0 local Particles = Instance.new("ParticleEmitter") Particles.Color = ColorSequence.new(S.bloodSettings.Color) Particles.LightEmission = 0 Particles.Size = NumberSequence.new(S.bloodSettings.Size) Particles.Texture = S.bloodSettings.Texture Particles.Transparency = NumberSequence.new( { NumberSequenceKeypoint.new(0, S.bloodSettings.startTransparency); NumberSequenceKeypoint.new(1, 1); } ) Particles.EmissionDirection = Enum.NormalId.Top Particles.Lifetime = NumberRange.new(S.bloodSettings.Lifetime - 0.05, S.bloodSettings.Lifetime + 0.05) Particles.Rate = S.bloodSettings.Rate Particles.Rotation = NumberRange.new(0, 90) Particles.Speed = NumberRange.new(S.bloodSettings.Speed) Particles.VelocitySpread = S.bloodSettings.Spread Particles.Parent = Blood Blood.Parent = gunIgnore Blood.CFrame = bloodCF if (not H.Anchored) then local Weld = Instance.new("Weld", Blood) Weld.Part0 = H Weld.Part1 = Blood Weld.C0 = H.CFrame:toObjectSpace(bloodCF) Blood.Anchored = false end delay(0.15, function() Particles.Enabled = false wait(S.bloodSettings.Lifetime + 0.05) Blood:Destroy() end) end)
---------------------------------
local button = script.Parent local startcolor = button.BrickColor local DB = false local toolfolder = button.Parent["Place Tool in Here! <<"] local toolstorage = {} for i, tool in pairs(toolfolder:GetChildren()) do table.insert(toolstorage, tool:clone()) end toolfolder:Destroy() local block = button.Parent:FindFirstChild("Block") if block ~= nil then if block:FindFirstChild("NameDisplay") then if block.NameDisplay.TextLabel.Text == "Custom Giver!" then if #toolstorage > 0 then block.NameDisplay.TextLabel.Text = toolstorage[1].Name else block.NameDisplay.TextLabel.Text = "" end end end end button.Touched:connect(function(hit) if DB then return end if hit == nil then return end if hit.Parent == nil then return end local player = game.Players:GetPlayerFromCharacter(hit.Parent) if player ~= nil then if player:FindFirstChild("Backpack") then local allow = true if #allow_team > 0 then local teams = game:GetService("Teams"):GetChildren() if #teams > 0 then allow = false for i, team in pairs(teams) do for i, allowedteamname in pairs(allow_team) do if team.Name == allowedteamname then if player.TeamColor == team.TeamColor then allow = true end end end end end end if not allow_duplicates then for i, tool in pairs(toolstorage) do if player.Backpack:FindFirstChild(tool.Name) then allow = false end end end if allow then DB = true button.BrickColor = BrickColor.new("Black") for i, tool in pairs(toolstorage) do local newtool = tool:clone() newtool.Parent = player.Backpack end wait(2) button.BrickColor = startcolor DB = false end end end end)
---[[ Message Types ]]
module.MessageTypeDefault = "Message" module.MessageTypeSystem = "System" module.MessageTypeMeCommand = "MeCommand" module.MessageTypeWelcome = "Welcome" module.MessageTypeSetCore = "SetCore" module.MessageTypeWhisper = "Whisper"
-- functions
function stopAllAnimations() local oldAnim = currentAnim -- return to idle If finishing an emote if (emoteNames[oldAnim] ~= nil and emoteNames[oldAnim] == false) then oldAnim = "idle" end currentAnim = "" if (currentAnimKeyframeHandler ~= nil) then currentAnimKeyframeHandler:disconnect() end if (oldAnimTrack ~= nil) then oldAnimTrack:Stop() oldAnimTrack:Destroy() oldAnimTrack = nil end if (currentAnimTrack ~= nil) then currentAnimTrack:Stop() currentAnimTrack:Destroy() currentAnimTrack = nil end return oldAnim end function keyFrameReachedFunc(frameName) if (frameName == "End") then -- print("Keyframe : ".. frameName) local repeatAnim = stopAllAnimations() playAnimation(repeatAnim, 0.0, Humanoid) end end
--[[ The Class ]]
-- local BaseCharacterController = require(script.Parent:WaitForChild("BaseCharacterController")) local VRNavigation = setmetatable({}, BaseCharacterController) VRNavigation.__index = VRNavigation function VRNavigation.new(CONTROL_ACTION_PRIORITY) local self = setmetatable(BaseCharacterController.new() :: any, VRNavigation) self.CONTROL_ACTION_PRIORITY = CONTROL_ACTION_PRIORITY self.navigationRequestedConn = nil self.heartbeatConn = nil self.currentDestination = nil self.currentPath = nil self.currentPoints = nil self.currentPointIdx = 0 self.expectedTimeToNextPoint = 0 self.timeReachedLastPoint = tick() self.moving = false self.isJumpBound = false self.moveLatch = false self.userCFrameEnabledConn = nil return self end function VRNavigation:SetLaserPointerMode(mode) pcall(function() StarterGui:SetCore("VRLaserPointerMode", mode) end) end function VRNavigation:GetLocalHumanoid() local character = LocalPlayer.Character if not character then return end for _, child in pairs(character:GetChildren()) do if child:IsA("Humanoid") then return child end end return nil end function VRNavigation:HasBothHandControllers() return VRService:GetUserCFrameEnabled(Enum.UserCFrame.RightHand) and VRService:GetUserCFrameEnabled(Enum.UserCFrame.LeftHand) end function VRNavigation:HasAnyHandControllers() return VRService:GetUserCFrameEnabled(Enum.UserCFrame.RightHand) or VRService:GetUserCFrameEnabled(Enum.UserCFrame.LeftHand) end function VRNavigation:IsMobileVR() return UserInputService.TouchEnabled end function VRNavigation:HasGamepad() return UserInputService.GamepadEnabled end function VRNavigation:ShouldUseNavigationLaser() --Places where we use the navigation laser: -- mobile VR with any number of hands tracked -- desktop VR with only one hand tracked -- desktop VR with no hands and no gamepad (i.e. with Oculus remote?) --using an Xbox controller with a desktop VR headset means no laser since the user has a thumbstick. --in the future, we should query thumbstick presence with a features API if self:IsMobileVR() then return true else if self:HasBothHandControllers() then return false end if not self:HasAnyHandControllers() then return not self:HasGamepad() end return true end end function VRNavigation:StartFollowingPath(newPath) currentPath = newPath currentPoints = currentPath:GetPointCoordinates() currentPointIdx = 1 moving = true timeReachedLastPoint = tick() local humanoid = self:GetLocalHumanoid() if humanoid and humanoid.Torso and #currentPoints >= 1 then local dist = (currentPoints[1] - humanoid.Torso.Position).magnitude expectedTimeToNextPoint = dist / humanoid.WalkSpeed end movementUpdateEvent:Fire("targetPoint", self.currentDestination) end function VRNavigation:GoToPoint(point) currentPath = true currentPoints = { point } currentPointIdx = 1 moving = true local humanoid = self:GetLocalHumanoid() local distance = (humanoid.Torso.Position - point).magnitude local estimatedTimeRemaining = distance / humanoid.WalkSpeed timeReachedLastPoint = tick() expectedTimeToNextPoint = estimatedTimeRemaining movementUpdateEvent:Fire("targetPoint", point) end function VRNavigation:StopFollowingPath() currentPath = nil currentPoints = nil currentPointIdx = 0 moving = false self.moveVector = ZERO_VECTOR3 end function VRNavigation:TryComputePath(startPos: Vector3, destination: Vector3) local numAttempts = 0 local newPath = nil while not newPath and numAttempts < 5 do newPath = PathfindingService:ComputeSmoothPathAsync(startPos, destination, MAX_PATHING_DISTANCE) numAttempts = numAttempts + 1 if newPath.Status == Enum.PathStatus.ClosestNoPath or newPath.Status == Enum.PathStatus.ClosestOutOfRange then newPath = nil break end if newPath and newPath.Status == Enum.PathStatus.FailStartNotEmpty then startPos = startPos + (destination - startPos).Unit newPath = nil end if newPath and newPath.Status == Enum.PathStatus.FailFinishNotEmpty then destination = destination + Vector3.new(0, 1, 0) newPath = nil end end return newPath end function VRNavigation:OnNavigationRequest(destinationCFrame: CFrame, inputUserCFrame: CFrame) local destinationPosition = destinationCFrame.Position local lastDestination = self.currentDestination if not IsFiniteVector3(destinationPosition) then return end self.currentDestination = destinationPosition local humanoid = self:GetLocalHumanoid() if not humanoid or not humanoid.Torso then return end local currentPosition = humanoid.Torso.Position local distanceToDestination = (self.currentDestination - currentPosition).magnitude if distanceToDestination < NO_PATH_THRESHOLD then self:GoToPoint(self.currentDestination) return end if not lastDestination or (self.currentDestination - lastDestination).magnitude > RECALCULATE_PATH_THRESHOLD then local newPath = self:TryComputePath(currentPosition, self.currentDestination) if newPath then self:StartFollowingPath(newPath) if PathDisplay then PathDisplay.setCurrentPoints(self.currentPoints) PathDisplay.renderPath() end else self:StopFollowingPath() if PathDisplay then PathDisplay.clearRenderedPath() end end else if moving then self.currentPoints[#currentPoints] = self.currentDestination else self:GoToPoint(self.currentDestination) end end end function VRNavigation:OnJumpAction(actionName, inputState, inputObj) if inputState == Enum.UserInputState.Begin then self.isJumping = true end return Enum.ContextActionResult.Sink end function VRNavigation:BindJumpAction(active) if active then if not self.isJumpBound then self.isJumpBound = true ContextActionService:BindActionAtPriority("VRJumpAction", (function() return self:OnJumpAction() end), false, self.CONTROL_ACTION_PRIORITY, Enum.KeyCode.ButtonA) end else if self.isJumpBound then self.isJumpBound = false ContextActionService:UnbindAction("VRJumpAction") end end end function VRNavigation:ControlCharacterGamepad(actionName, inputState, inputObject) if inputObject.KeyCode ~= Enum.KeyCode.Thumbstick1 then return end if inputState == Enum.UserInputState.Cancel then self.moveVector = ZERO_VECTOR3 return end if inputState ~= Enum.UserInputState.End then self:StopFollowingPath() if PathDisplay then PathDisplay.clearRenderedPath() end if self:ShouldUseNavigationLaser() then self:BindJumpAction(true) self:SetLaserPointerMode("Hidden") end if inputObject.Position.magnitude > THUMBSTICK_DEADZONE then self.moveVector = Vector3.new(inputObject.Position.X, 0, -inputObject.Position.Y) if self.moveVector.magnitude > 0 then self.moveVector = self.moveVector.unit * math.min(1, inputObject.Position.magnitude) end self.moveLatch = true end else self.moveVector = ZERO_VECTOR3 if self:ShouldUseNavigationLaser() then self:BindJumpAction(false) self:SetLaserPointerMode("Navigation") end if self.moveLatch then self.moveLatch = false movementUpdateEvent:Fire("offtrack") end end return Enum.ContextActionResult.Sink end function VRNavigation:OnHeartbeat(dt) local newMoveVector = self.moveVector local humanoid = self:GetLocalHumanoid() if not humanoid or not humanoid.Torso then return end if self.moving and self.currentPoints then local currentPosition = humanoid.Torso.Position local goalPosition = currentPoints[1] local vectorToGoal = (goalPosition - currentPosition) * XZ_VECTOR3 local moveDist = vectorToGoal.magnitude local moveDir = vectorToGoal / moveDist if moveDist < POINT_REACHED_THRESHOLD then local estimatedTimeRemaining = 0 local prevPoint = currentPoints[1] for i, point in pairs(currentPoints) do if i ~= 1 then local dist = (point - prevPoint).magnitude prevPoint = point estimatedTimeRemaining = estimatedTimeRemaining + (dist / humanoid.WalkSpeed) end end table.remove(currentPoints, 1) currentPointIdx = currentPointIdx + 1 if #currentPoints == 0 then self:StopFollowingPath() if PathDisplay then PathDisplay.clearRenderedPath() end return else if PathDisplay then PathDisplay.setCurrentPoints(currentPoints) PathDisplay.renderPath() end local newGoal = currentPoints[1] local distanceToGoal = (newGoal - currentPosition).magnitude expectedTimeToNextPoint = distanceToGoal / humanoid.WalkSpeed timeReachedLastPoint = tick() end else local ignoreTable = { (game.Players.LocalPlayer :: Player).Character, workspace.CurrentCamera } local obstructRay = Ray.new(currentPosition - Vector3.new(0, 1, 0), moveDir * 3) local obstructPart, obstructPoint, obstructNormal = workspace:FindPartOnRayWithIgnoreList(obstructRay, ignoreTable) if obstructPart then local heightOffset = Vector3.new(0, 100, 0) local jumpCheckRay = Ray.new(obstructPoint + moveDir * 0.5 + heightOffset, -heightOffset) local jumpCheckPart, jumpCheckPoint, jumpCheckNormal = workspace:FindPartOnRayWithIgnoreList(jumpCheckRay, ignoreTable) local heightDifference = jumpCheckPoint.Y - currentPosition.Y if heightDifference < 6 and heightDifference > -2 then humanoid.Jump = true end end local timeSinceLastPoint = tick() - timeReachedLastPoint if timeSinceLastPoint > expectedTimeToNextPoint + OFFTRACK_TIME_THRESHOLD then self:StopFollowingPath() if PathDisplay then PathDisplay.clearRenderedPath() end movementUpdateEvent:Fire("offtrack") end newMoveVector = self.moveVector:Lerp(moveDir, dt * 10) end end if IsFiniteVector3(newMoveVector) then self.moveVector = newMoveVector end end function VRNavigation:OnUserCFrameEnabled() if self:ShouldUseNavigationLaser() then self:BindJumpAction(false) self:SetLaserPointerMode("Navigation") else self:BindJumpAction(true) self:SetLaserPointerMode("Hidden") end end function VRNavigation:Enable(enable) self.moveVector = ZERO_VECTOR3 self.isJumping = false if enable then self.navigationRequestedConn = VRService.NavigationRequested:Connect(function(destinationCFrame, inputUserCFrame) self:OnNavigationRequest(destinationCFrame, inputUserCFrame) end) self.heartbeatConn = RunService.Heartbeat:Connect(function(dt) self:OnHeartbeat(dt) end) ContextActionService:BindAction("MoveThumbstick", (function(actionName, inputState, inputObject) return self:ControlCharacterGamepad(actionName, inputState, inputObject) end), false, self.CONTROL_ACTION_PRIORITY, Enum.KeyCode.Thumbstick1) ContextActionService:BindActivate(Enum.UserInputType.Gamepad1, Enum.KeyCode.ButtonR2) self.userCFrameEnabledConn = VRService.UserCFrameEnabled:Connect(function() self:OnUserCFrameEnabled() end) self:OnUserCFrameEnabled() VRService:SetTouchpadMode(Enum.VRTouchpad.Left, Enum.VRTouchpadMode.VirtualThumbstick) VRService:SetTouchpadMode(Enum.VRTouchpad.Right, Enum.VRTouchpadMode.ABXY) self.enabled = true else -- Disable self:StopFollowingPath() ContextActionService:UnbindAction("MoveThumbstick") ContextActionService:UnbindActivate(Enum.UserInputType.Gamepad1, Enum.KeyCode.ButtonR2) self:BindJumpAction(false) self:SetLaserPointerMode("Disabled") if self.navigationRequestedConn then self.navigationRequestedConn:Disconnect() self.navigationRequestedConn = nil end if self.heartbeatConn then self.heartbeatConn:Disconnect() self.heartbeatConn = nil end if self.userCFrameEnabledConn then self.userCFrameEnabledConn:Disconnect() self.userCFrameEnabledConn = nil end self.enabled = false end end return VRNavigation
--use this to determine if you want this human to be harmed or not, returns boolean
function boom() wait(1.5) Used = true Object.Anchored = true Object.Transparency = 1 Object.CanCollide = false Object.Explode:Play() Explode() end boom()
-------- OMG HAX
r = game:service("RunService") local damage = 0 local slash_damage = 0 sword = script.Parent.Handle Tool = script.Parent local SlashSound = Instance.new("Sound") SlashSound.SoundId = "0" SlashSound.Parent = sword SlashSound.Volume = 1 local UnsheathSound = Instance.new("Sound") UnsheathSound.SoundId = "0" UnsheathSound.Parent = sword UnsheathSound.Volume = 1 function blow(hit) local humanoid = hit.Parent:findFirstChild("Humanoid") local vCharacter = Tool.Parent local vPlayer = game.Players:playerFromCharacter(vCharacter) local hum = vCharacter:findFirstChild("Humanoid") -- non-nil if tool held by a character if humanoid~=nil and humanoid ~= hum and hum ~= nil then -- final check, make sure sword is in-hand local right_arm = vCharacter:FindFirstChild("Right Arm") if (right_arm ~= nil) then local joint = right_arm:FindFirstChild("RightGrip") if (joint ~= nil and (joint.Part0 == sword or joint.Part1 == sword)) then tagHumanoid(humanoid, vPlayer) humanoid:TakeDamage(damage) wait(1) untagHumanoid(humanoid) end end end end function tagHumanoid(humanoid, player) local creator_tag = Instance.new("ObjectValue") creator_tag.Value = player creator_tag.Name = "creator" creator_tag.Parent = humanoid end function untagHumanoid(humanoid) if humanoid ~= nil then local tag = humanoid:findFirstChild("creator") if tag ~= nil then tag.Parent = nil end end end function attack() damage = slash_damage SlashSound:play() local anim = Instance.new("StringValue") anim.Name = "toolanim" anim.Value = "Slash" anim.Parent = Tool end function swordUp() Tool.GripForward = Vector3.new(-1,0,0) Tool.GripRight = Vector3.new(0,1,0) Tool.GripUp = Vector3.new(0,0,1) end function swordOut() Tool.GripForward = Vector3.new(0,0,1) Tool.GripRight = Vector3.new(0,-1,0) Tool.GripUp = Vector3.new(-1,0,0) 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 attack() wait(1) Tool.Enabled = true end function onEquipped() UnsheathSound:play() end script.Parent.Activated:connect(onActivated) script.Parent.Equipped:connect(onEquipped) connection = sword.Touched:connect(blow)
--Allows users to earn commissions from avatar items in their games.
--// Renders
local L_167_ L_109_:connect(function() if L_15_ then L_162_, L_163_ = L_162_ or 0, L_163_ or 0 if L_165_ == nil or L_164_ == nil then L_165_ = L_45_.C0 L_164_ = L_45_.C1 end local L_275_ = (math.sin(L_156_ * L_158_ / 2) * L_157_) local L_276_ = (math.sin(L_156_ * L_158_) * L_157_) local L_277_ = CFrame.new(L_275_, L_276_, 0.02) local L_278_ = (math.sin(L_156_ * L_158_ / 2) * L_157_) local L_279_ = (math.sin(L_156_ * L_158_) * L_157_) local L_280_ = CFrame.new(L_275_, L_276_, 0.02) * CFrame.Angles((math.cos(L_156_ * L_158_) * L_157_), (math.cos(L_156_ * L_158_ / 2) * L_157_), 0) local L_281_ = (math.sin(L_152_ * L_155_ / 2) * L_154_) local L_282_ = (math.cos(L_152_ * L_155_) * L_154_) local L_283_ = CFrame.new(L_281_, L_282_, 0.02) if L_149_ then L_156_ = L_156_ + .017 if L_24_.WalkAnimEnabled == true then L_150_ = L_280_ else L_150_ = CFrame.new() end else L_156_ = 0 L_150_ = CFrame.new() end L_148_.t = Vector3.new(L_143_, L_144_, 0) local L_284_ = L_148_.p local L_285_ = L_284_.X / L_145_ * (L_64_ and L_147_ or L_146_) local L_286_ = L_284_.Y / L_145_ * (L_64_ and L_147_ or L_146_) L_5_.CFrame = L_5_.CFrame:lerp(L_5_.CFrame * L_151_, 0.2) if L_64_ then L_139_ = CFrame.Angles(math.rad(-L_285_), math.rad(L_285_), math.rad(L_286_)) * CFrame.fromAxisAngle(Vector3.new(5, 0, -1), math.rad(L_285_)) L_152_ = 0 L_153_ = CFrame.new() elseif not L_64_ then L_139_ = CFrame.Angles(math.rad(-L_286_), math.rad(-L_285_), math.rad(-L_285_)) * CFrame.fromAxisAngle(L_44_.Position, math.rad(-L_286_)) L_152_ = L_152_ + 0.017 L_153_ = L_283_ end if L_24_.SwayEnabled == true then L_45_.C0 = L_45_.C0:lerp(L_165_ * L_139_ * L_150_ * L_153_, 0.1) else L_45_.C0 = L_45_.C0:lerp(L_165_ * L_150_, 0.1) end if L_67_ and not L_70_ and L_72_ and not L_64_ and not L_66_ and not Shooting then L_45_.C1 = L_45_.C1:lerp(L_45_.C0 * L_24_.SprintPos, 0.1) elseif not L_67_ and not L_70_ and not L_72_ and not L_64_ and not L_66_ and not Shooting and not L_79_ then L_45_.C1 = L_45_.C1:lerp(CFrame.new() * L_137_, 0.05) end if L_64_ and not L_67_ then if not L_65_ then L_90_ = L_24_.AimCamRecoil L_89_ = L_24_.AimGunRecoil L_91_ = L_24_.AimKickback elseif L_65_ then if L_93_ == 1 then L_90_ = L_24_.AimCamRecoil / 1.5 L_89_ = L_24_.AimGunRecoil / 1.5 L_91_ = L_24_.AimKickback / 1.5 end if L_93_ == 2 then L_90_ = L_24_.AimCamRecoil / 2 L_89_ = L_24_.AimGunRecoil / 2 L_91_ = L_24_.AimKickback / 2 end end if (L_3_.Head.Position - L_5_.CoordinateFrame.p).magnitude < 2 then L_45_.C1 = L_45_.C1:lerp(L_45_.C0 * L_56_.CFrame:toObjectSpace(L_44_.CFrame), L_24_.AimSpeed) L_42_:WaitForChild('Sense'):WaitForChild('Sensitivity').Visible = true L_42_:WaitForChild('Sense'):WaitForChild('Sensitivity').Text = L_51_ L_110_.MouseDeltaSensitivity = L_51_ end elseif not L_64_ and not L_67_ and L_15_ and not L_79_ then if (L_3_.Head.Position - L_5_.CoordinateFrame.p).magnitude < 2 then L_45_.C1 = L_45_.C1:lerp(CFrame.new() * L_137_, L_24_.UnaimSpeed) L_42_:WaitForChild('Sense'):WaitForChild('Sensitivity').Visible = false L_42_:WaitForChild('Sense'):WaitForChild('Sensitivity').Text = L_51_ L_110_.MouseDeltaSensitivity = L_52_ end if not L_65_ then L_90_ = L_24_.camrecoil L_89_ = L_24_.gunrecoil L_91_ = L_24_.Kickback elseif L_65_ then if L_93_ == 1 then L_90_ = L_24_.camrecoil / 1.5 L_89_ = L_24_.gunrecoil / 1.5 L_91_ = L_24_.Kickback / 1.5 end if L_93_ == 2 then L_90_ = L_24_.camrecoil / 2 L_89_ = L_24_.gunrecoil / 2 L_91_ = L_24_.Kickback / 2 end end end if Recoiling then if not L_64_ then L_151_ = CFrame.fromEulerAnglesXYZ(math.rad(L_90_ * math.random(0, L_24_.CamShake)), math.rad(L_90_ * math.random(-L_24_.CamShake, L_24_.CamShake)), math.rad(L_90_ * math.random(-L_24_.CamShake, L_24_.CamShake)))--CFrame.Angles(camrecoil,0,0) else L_151_ = CFrame.fromEulerAnglesXYZ(math.rad(L_90_ * math.random(0, L_24_.AimCamShake)), math.rad(L_90_ * math.random(-L_24_.AimCamShake, L_24_.AimCamShake)), math.rad(L_90_ * math.random(-L_24_.AimCamShake, L_24_.AimCamShake))) end --cam.CoordinateFrame = cam.CoordinateFrame * CFrame.fromEulerAnglesXYZ(math.rad(camrecoil*math.random(0,3)), math.rad(camrecoil*math.random(-1,1)), math.rad(camrecoil*math.random(-1,1))) L_45_.C0 = L_45_.C0:lerp(L_45_.C0 * CFrame.new(0, 0, L_89_) * CFrame.Angles(-math.rad(L_91_), 0, 0), 0.3) elseif not Recoiling then L_151_ = CFrame.Angles(0, 0, 0) L_45_.C0 = L_45_.C0:lerp(CFrame.new(), 0.2) end if L_65_ then L_3_:WaitForChild('Humanoid').Jump = false end if L_15_ then L_5_.FieldOfView = L_5_.FieldOfView * (1 - L_24_.ZoomSpeed) + (L_97_ * L_24_.ZoomSpeed) if (L_3_.Head.Position - L_5_.CoordinateFrame.p).magnitude >= 2 then L_90_ = L_24_.AimCamRecoil L_89_ = L_24_.AimGunRecoil L_91_ = L_24_.AimKickback L_42_:WaitForChild('Sense'):WaitForChild('Sensitivity').Visible = true L_42_:WaitForChild('Sense'):WaitForChild('Sensitivity').Text = L_51_ L_110_.MouseDeltaSensitivity = L_51_ elseif (L_3_.Head.Position - L_5_.CoordinateFrame.p).magnitude < 2 and not L_64_ and not L_65_ then L_90_ = L_24_.camrecoil L_89_ = L_24_.gunrecoil L_91_ = L_24_.Kickback L_42_:WaitForChild('Sense'):WaitForChild('Sensitivity').Visible = false L_42_:WaitForChild('Sense'):WaitForChild('Sensitivity').Text = L_51_ L_110_.MouseDeltaSensitivity = L_52_ end end if L_15_ and L_24_.CameraGo then --and (char.Head.Position - cam.CoordinateFrame.p).magnitude < 2 then L_4_.TargetFilter = game.Workspace local L_287_ = L_3_:WaitForChild("HumanoidRootPart").CFrame * CFrame.new(0, 1.5, 0) * CFrame.new(L_3_:WaitForChild("Humanoid").CameraOffset) L_48_.C0 = L_8_.CFrame:toObjectSpace(L_287_) L_48_.C1 = CFrame.Angles(-math.asin((L_4_.Hit.p - L_4_.Origin.p).unit.y), 0, 0) L_110_.MouseIconEnabled = false end if L_15_ and (L_3_.Head.Position - L_5_.CoordinateFrame.p).magnitude >= 2 then if L_4_.Icon ~= "http://www.roblox.com/asset?id=" .. L_24_.TPSMouseIcon then L_4_.Icon = "http://www.roblox.com/asset?id=" .. L_24_.TPSMouseIcon end L_110_.MouseIconEnabled = true if L_3_:FindFirstChild('Right Arm') and L_3_:FindFirstChild('Left Arm') then L_3_['Right Arm'].LocalTransparencyModifier = 1 L_3_['Left Arm'].LocalTransparencyModifier = 1 end end; end end)
-- play a random sound selected from children
local sounds:{Sound}=script:GetChildren() while task.wait(math.random(1,10)) do local sound=sounds[math.random(1,#sounds)] sound.Parent=script.Parent sound:Play() end
-- VisualComponents by Travis, modified for native visuals.
local RS = game:GetService("RunService") local panels = {} wait(5) function SetUp() for _,v in pairs(game.Workspace.VisualComponents.Panels:GetChildren()) do local temp = {} for image = 1,8 do table.insert(temp,v.VisualScreen.Main["Image"..image]) end table.insert(panels,temp) end end SetUp() local len = #panels local max = 3000 local max8 = max/8; for i,v in pairs(workspace.VisualComponents.Panels:GetChildren()) do RS.RenderStepped:connect(function() v.VisualScreen.Main.Image1.Visible = workspace.VisualComponents.Values.On.Value v.VisualScreen.Main.Image2.Visible = workspace.VisualComponents.Values.On.Value v.VisualScreen.Main.Image3.Visible = workspace.VisualComponents.Values.On.Value v.VisualScreen.Main.Image4.Visible = workspace.VisualComponents.Values.On.Value v.VisualScreen.Main.Image5.Visible = workspace.VisualComponents.Values.On.Value v.VisualScreen.Main.Image6.Visible = workspace.VisualComponents.Values.On.Value v.VisualScreen.Main.Image7.Visible = workspace.VisualComponents.Values.On.Value v.VisualScreen.Main.Image8.Visible = workspace.VisualComponents.Values.On.Value end) end RS.RenderStepped:connect(function(delta) local t = script.Value.Value local tempArr = {} for image = 1,8 do tempArr[image] = (t + image) * max8 % max end for index = 1,len do local temp2 = panels[index] for key, value in pairs(tempArr) do temp2[key].Size = UDim2.new(0,value*10000,0,value*10000) end end end)
--[[Susupension]]
Tune.SusEnabled = true -- works only in with PGSPhysicsSolverEnabled, defaults to false when PGS is disabled --Front Suspension Tune.FSusDamping = 500 -- Spring Dampening Tune.FSusStiffness = 9000 -- Spring Force Tune.FAntiRoll = 50 -- Anti-Roll (Gyro Dampening) Tune.FSusLength = 2 -- Suspension length (in studs) Tune.FPreCompress = .4 -- Pre-compression adds resting length force Tune.FExtensionLim = .4 -- Max Extension Travel (in studs) Tune.FCompressLim = .4 -- Max Compression Travel (in studs) Tune.FSusAngle = 80 -- Suspension Angle (degrees from horizontal) Tune.FWsBoneLen = 5 -- Wishbone Length Tune.FWsBoneAngle = 0 -- Wishbone angle (degrees from horizontal) Tune.FAnchorOffset = { -- Suspension anchor point offset (relative to center of wheel) --[[Lateral]] -.4 , -- positive = outward --[[Vertical]] -.5 , -- positive = upward --[[Forward]] 0 } -- positive = forward --Rear Suspension Tune.RSusDamping = 500 -- Spring Dampening Tune.RSusStiffness = 9000 -- Spring Force Tune.FAntiRoll = 50 -- Anti-Roll (Gyro Dampening) Tune.RSusLength = 2 -- Suspension length (in studs) Tune.RPreCompress = .4 -- Pre-compression adds resting length force Tune.RExtensionLim = .4 -- Max Extension Travel (in studs) Tune.RCompressLim = .4 -- Max Compression Travel (in studs) Tune.RSusAngle = 80 -- Suspension Angle (degrees from horizontal) Tune.RWsBoneLen = 5 -- Wishbone Length Tune.RWsBoneAngle = 0 -- Wishbone angle (degrees from horizontal) Tune.RAnchorOffset = { -- Suspension anchor point offset (relative to center of wheel) --[[Lateral]] -.4 , -- positive = outward --[[Vertical]] -.5 , -- positive = upward --[[Forward]] 0 } -- positive = forward --Aesthetics Tune.SusVisible = true -- Spring Visible Tune.WsBVisible = false -- Wishbone Visible Tune.SusRadius = .2 -- Suspension Coil Radius Tune.SusThickness = .1 -- Suspension Coil Thickness Tune.SusColor = "Really black" -- Suspension Color [BrickColor] Tune.SusCoilCount = 6 -- Suspension Coil Count Tune.WsColor = "Black" -- Wishbone Color [BrickColor] Tune.WsThickness = .1 -- Wishbone Rod Thickness
--yep
goal.Transparency = 1 door.PrimaryPart.Transparency = 1 local function tweenModel(model, CF, info) local CFrameValue = Instance.new("CFrameValue") CFrameValue.Value = model:GetPrimaryPartCFrame() CFrameValue:GetPropertyChangedSignal("Value"):Connect(function() model:SetPrimaryPartCFrame(CFrameValue.Value) end) local tween = tweenService:Create(CFrameValue, info, {Value = CF}) tween:Play() tween.Completed:Connect(function() CFrameValue:Destroy() end) end local function onClicked() if canOpen then canOpen = false if open then open = false tweenModel(door, origCFrame, TweenInfo.new(downtime)) else open = true tweenModel(door, goal.CFrame, TweenInfo.new(uptime)) end wait(waitTime + uptime) canOpen = true end end clickDetector.MouseButton1Click:connect(onClicked)
-- Constructor
Constructor.new = function(data, public) local proxy = newproxy(true) local metatable = getmetatable(proxy) for index, value in data do metatable[index] = value end metatable.__index = Index metatable.__newindex = NewIndex metatable.__public = public or {} return proxy, metatable end
-- tableUtil.Assign(Table target, ...Table sources)
local function Assign(target, ...) for _,src in ipairs({...}) do for k,v in pairs(src) do target[k] = v end end return target end local function Print(tbl, label, deepPrint) assert(type(tbl) == "table", "First argument must be a table") assert(label == nil or type(label) == "string", "Second argument must be a string or nil") label = (label or "TABLE") local strTbl = {} local indent = " - " -- Insert(string, indentLevel) local function Insert(s, l) strTbl[#strTbl + 1] = (indent:rep(l) .. s .. "\n") end local function AlphaKeySort(a, b) return (tostring(a.k) < tostring(b.k)) end local function PrintTable(t, lvl, lbl) Insert(lbl .. ":", lvl - 1) local nonTbls = {} local tbls = {} local keySpaces = 0 for k,v in pairs(t) do if (type(v) == "table") then table.insert(tbls, {k = k, v = v}) else table.insert(nonTbls, {k = k, v = "[" .. typeof(v) .. "] " .. tostring(v)}) end local spaces = #tostring(k) + 1 if (spaces > keySpaces) then keySpaces = spaces end end table.sort(nonTbls, AlphaKeySort) table.sort(tbls, AlphaKeySort) for _,v in ipairs(nonTbls) do Insert(tostring(v.k) .. ":" .. (" "):rep(keySpaces - #tostring(v.k)) .. v.v, lvl) end if (deepPrint) then for _,v in ipairs(tbls) do PrintTable(v.v, lvl + 1, tostring(v.k) .. (" "):rep(keySpaces - #tostring(v.k)) .. " [Table]") end else for _,v in ipairs(tbls) do Insert(tostring(v.k) .. ":" .. (" "):rep(keySpaces - #tostring(v.k)) .. "[Table]", lvl) end end end PrintTable(tbl, 1, label) print(table.concat(strTbl, "")) end local function Reverse(tbl) local n = #tbl local tblRev = table.create(n) for i = 1,n do tblRev[i] = tbl[n - i + 1] end return tblRev end local function Shuffle(tbl) assert(type(tbl) == "table", "First argument must be a table") local rng = Random.new() for i = #tbl, 2, -1 do local j = rng:NextInteger(1, i) tbl[i], tbl[j] = tbl[j], tbl[i] end end local function IsEmpty(tbl) return (next(tbl) == nil) end local function EncodeJSON(tbl) return http:JSONEncode(tbl) end local function DecodeJSON(str) return http:JSONDecode(str) end local function FastRemoveFirstValue(t, v) local index = IndexOf(t, v) if (index) then FastRemove(t, index) return true, index end return false, nil end TableUtil.Copy = CopyTable TableUtil.CopyShallow = CopyTableShallow TableUtil.Sync = Sync TableUtil.FastRemove = FastRemove TableUtil.FastRemoveFirstValue = FastRemoveFirstValue TableUtil.Print = Print TableUtil.Map = Map TableUtil.Filter = Filter TableUtil.Reduce = Reduce TableUtil.Assign = Assign TableUtil.IndexOf = IndexOf TableUtil.Reverse = Reverse TableUtil.Shuffle = Shuffle TableUtil.IsEmpty = IsEmpty TableUtil.EncodeJSON = EncodeJSON TableUtil.DecodeJSON = DecodeJSON return TableUtil
-- Complete list of default art assets provided
return { BloxyAward = { name = "Bloxy Award", assetId = "rbxassetid://7322500962", }, RobloxStudioBlue = { name = "Roblox Studio in Blue", assetId = "rbxassetid://7322508294", }, RobloxStudioGrey = { name = "Roblox Studio in Grey", assetId = "rbxassetid://7322513437", }, ShootingStar = { name = "Shooting Star", assetId = "rbxassetid://7322516002", }, DespacitoSpider = { name = "DespacitoSpider", assetId = "rbxassetid://7337695014", }, BigHeadNoob = { name = "Big Head Noob", assetId = "rbxassetid://7322517479", }, RoundHeadNoob = { name = "Round Head Noob", assetId = "rbxassetid://7337696808", }, FemalePirate = { name = "Female Pirate", assetId = "rbxassetid://7337690429", }, RichNoob = { name = "Rich Noob", assetId = "rbxassetid://7337685806", }, BuildermanSayingHi = { name = "Builderman Saying Hi", assetId = "rbxassetid://7337688743", }, TeddyBearClawMachine = { name = "Teddy Bear Claw Machine", assetId = "rbxassetid://7337691467", }, NoobInAMecha = { name = "Noob In A Mecha", assetId = "rbxassetid://7337703782", }, BaconHairNoob = { name = "BaconHairNoob", assetId = "rbxassetid://7337705040", }, HotDog = { name = "Hot Dog", assetId = "rbxassetid://7337693237", }, FrenchFries = { name = "French Fries", assetId = "rbxassetid://7337698666", }, RobloxSprayPaint = { name = "Roblox Spray Paint", assetId = "rbxassetid://7322547665", }, MeltyFaceSprayPaint = { name = "Melty Face Spray Paint", assetId = "rbxassetid://7322550149", }, }
-- Removes old Motor6Ds and builds the rig from the attachments in the parts -- Call this with nil, HumanoidRootPart
function buildRigFromAttachments(last, part) for _, attachment in pairs(part:GetChildren()) do if attachment:IsA("Attachment") and string.find(attachment.Name, "RigAttachment") then for _, sibling in pairs(part.Parent:GetChildren()) do if sibling ~= part and sibling ~= last then local matchingAttachment = sibling:FindFirstChild(attachment.Name) if matchingAttachment then buildJoint(attachment, matchingAttachment) -- Continue the recursive tree traversal building joints buildRigFromAttachments(part, matchingAttachment.Parent) end end end end end end local function getOldCharacterMesh(character, newCharacterMesh) for _, obj in pairs(character:GetChildren()) do if obj:IsA("CharacterMesh") and obj.BodyPart == newCharacterMesh.BodyPart then return obj end end return nil end
--[[ if Figure.Raise.Value == true then RightShoulder.MaxVelocity = 0.05 RightShoulder:SetDesiredAngle(3) elseif Figure.Cast.Value == true then RightShoulder.MaxVelocity = 0.65 RightShoulder:SetDesiredAngle(1) else]]
RightShoulder.MaxVelocity = 0.25 RightShoulder:SetDesiredAngle(1.5)
--------------- -- Constants -- ---------------
local USE_STACKING_TRANSPARENCY = true -- Multiple items between the subject and camera get transparency values that add up to TARGET_TRANSPARENCY local TARGET_TRANSPARENCY = 0.75 -- Classic Invisicam's Value, also used by new invisicam for parts hit by head and torso rays local TARGET_TRANSPARENCY_PERIPHERAL = 0.5 -- Used by new SMART_CIRCLE mode for items not hit by head and torso rays local MODE = { CUSTOM = 1, -- Whatever you want! LIMBS = 2, -- Track limbs MOVEMENT = 3, -- Track movement CORNERS = 4, -- Char model corners CIRCLE1 = 5, -- Circle of casts around character CIRCLE2 = 6, -- Circle of casts around character, camera relative LIMBMOVE = 7, -- LIMBS mode + MOVEMENT mode SMART_CIRCLE = 8, -- More sample points on and around character CHAR_OUTLINE = 9, } Invisicam.MODE = MODE local STARTING_MODE = MODE.SMART_CIRCLE local LIMB_TRACKING_SET = { -- Common to R6, R15 ['Head'] = true, -- R6 Only ['Left Arm'] = true, ['Right Arm'] = true, ['Left Leg'] = true, ['Right Leg'] = true, -- R15 Only ['LeftLowerArm'] = true, ['RightLowerArm'] = true, ['LeftUpperLeg'] = true, ['RightUpperLeg'] = true } local CORNER_FACTORS = { Vector3.new(1,1,-1), Vector3.new(1,-1,-1), Vector3.new(-1,-1,-1), Vector3.new(-1,1,-1) } local CIRCLE_CASTS = 10 local MOVE_CASTS = 3 local SMART_CIRCLE_CASTS = 24 local SMART_CIRCLE_INCREMENT = 2.0 * math.pi / SMART_CIRCLE_CASTS local CHAR_OUTLINE_CASTS = 24
--Precalculated paths
local t,f,n=true,false,{} local r={ [58]={{28,29,31,32,34,35,39,41,30,56,58},t}, [49]={{28,44,45,49},t}, [16]={n,f}, [19]={{28,29,31,32,34,35,39,41,30,56,58,20,19},t}, [59]={{28,29,31,32,34,35,39,41,59},t}, [63]={{28,29,31,32,34,35,39,41,30,56,58,23,62,63},t}, [34]={{28,29,31,32,34},t}, [21]={{28,29,31,32,34,35,39,41,30,56,58,20,21},t}, [48]={{28,44,45,49,48},t}, [27]={{28,27},t}, [14]={n,f}, [31]={{28,29,31},t}, [56]={{28,29,31,32,34,35,39,41,30,56},t}, [29]={{28,29},t}, [13]={n,f}, [47]={{28,44,45,49,48,47},t}, [12]={n,f}, [45]={{28,44,45},t}, [57]={{28,29,31,32,34,35,39,41,30,56,57},t}, [36]={{28,29,31,32,33,36},t}, [25]={{28,27,26,25},t}, [71]={{28,29,31,32,34,35,39,41,59,61,71},t}, [20]={{28,29,31,32,34,35,39,41,30,56,58,20},t}, [60]={{28,29,31,32,34,35,39,41,60},t}, [8]={n,f}, [4]={n,f}, [75]={{28,29,31,32,34,35,39,41,59,61,71,72,76,73,75},t}, [22]={{28,29,31,32,34,35,39,41,30,56,58,20,21,22},t}, [74]={{28,29,31,32,34,35,39,41,59,61,71,72,76,73,74},t}, [62]={{28,29,31,32,34,35,39,41,30,56,58,23,62},t}, [1]={n,f}, [6]={n,f}, [11]={n,f}, [15]={n,f}, [37]={{28,29,31,32,33,36,37},t}, [2]={n,f}, [35]={{28,29,31,32,34,35},t}, [53]={{28,44,45,49,48,47,52,53},t}, [73]={{28,29,31,32,34,35,39,41,59,61,71,72,76,73},t}, [72]={{28,29,31,32,34,35,39,41,59,61,71,72},t}, [33]={{28,29,31,32,33},t}, [69]={{28,29,31,32,34,35,39,41,60,69},t}, [65]={{28,29,31,32,34,35,39,41,30,56,58,20,19,66,64,65},t}, [26]={{28,27,26},t}, [68]={{28,29,31,32,34,35,39,41,30,56,58,20,19,66,64,67,68},t}, [76]={{28,29,31,32,34,35,39,41,59,61,71,72,76},t}, [50]={{28,44,45,49,48,47,50},t}, [66]={{28,29,31,32,34,35,39,41,30,56,58,20,19,66},t}, [10]={n,f}, [24]={{28,27,26,25,24},t}, [23]={{28,29,31,32,34,35,39,41,30,56,58,23},t}, [44]={{28,44},t}, [39]={{28,29,31,32,34,35,39},t}, [32]={{28,29,31,32},t}, [3]={n,f}, [30]={{28,29,31,32,34,35,39,41,30},t}, [51]={{28,44,45,49,48,47,50,51},t}, [18]={n,f}, [67]={{28,29,31,32,34,35,39,41,30,56,58,20,19,66,64,67},t}, [61]={{28,29,31,32,34,35,39,41,59,61},t}, [55]={{28,44,45,49,48,47,52,53,54,55},t}, [46]={{28,44,45,49,48,47,46},t}, [42]={{28,29,31,32,34,35,38,42},t}, [40]={{28,29,31,32,34,35,40},t}, [52]={{28,44,45,49,48,47,52},t}, [54]={{28,44,45,49,48,47,52,53,54},t}, [43]={n,f}, [7]={n,f}, [9]={n,f}, [41]={{28,29,31,32,34,35,39,41},t}, [17]={n,f}, [38]={{28,29,31,32,34,35,38},t}, [28]={{28},t}, [5]={n,f}, [64]={{28,29,31,32,34,35,39,41,30,56,58,20,19,66,64},t}, } return r
-- Decompiled with the Synapse X Luau decompiler.
local v1 = {}; v1.__index = v1; v1.ClassName = "Signal"; function v1.new() local v2 = setmetatable({}, v1); v2._bindableEvent = Instance.new("BindableEvent"); v2._argData = nil; v2._argCount = nil; return v2; end; function v1.Fire(p1, ...) p1._argData = { ... }; p1._argCount = select("#", ...); p1._bindableEvent:Fire(); p1._argData = nil; p1._argCount = nil; end; function v1.Connect(p2, p3) if type(p3) ~= "function" then error(("connect(%s)"):format(typeof(p3)), 2); end; return p2._bindableEvent.Event:Connect(function() p3(unpack(p2._argData, 1, p2._argCount)); end); end; function v1.Wait(p4) p4._bindableEvent.Event:Wait(); assert(p4._argData, "Missing arg data, likely due to :TweenSize/Position corrupting threadrefs."); return unpack(p4._argData, 1, p4._argCount); end; function v1.Destroy(p5) if p5._bindableEvent then p5._bindableEvent:Destroy(); p5._bindableEvent = nil; end; p5._argData = nil; p5._argCount = nil; end; function v1.Disconnect(p6) p6:Destroy(); end; return v1;
----------------- --| Functions |-- -----------------
local function OnActivated() local myModel = MyPlayer.Character if Tool.Enabled and myModel and myModel:FindFirstChildOfClass("Humanoid") and myModel.Humanoid.Health > 0 then Tool.Enabled = false local Pos = MouseLoc:InvokeClient(MyPlayer) -- Create a clone of Rocket and set its color local rocketClone = Rocket:Clone() DebrisService:AddItem(rocketClone, 30) rocketClone.BrickColor = MyPlayer.TeamColor -- Position the rocket clone and launch! local spawnPosition = (ToolHandle.CFrame * CFrame.new(5, 0, 0)).p rocketClone.CFrame = CFrame.new(spawnPosition, Pos) --NOTE: This must be done before assigning Parent rocketClone.CanQuery =false rocketClone.Parent = workspace task.spawn(function() while rocketClone.Parent == workspace and task.wait(.0) do local Pos = MouseLoc:InvokeClient(MyPlayer) print(Pos) rocketClone.CFrame = CFrame.lookAt(rocketClone.Position,Pos) rocketClone.CFrame *= CFrame.new(0,0,-ROCKET_SPEED) end end) wait(RELOAD_TIME) Tool.Enabled = true end end function OnEquipped() MyPlayer = PlayersService:GetPlayerFromCharacter(Tool.Parent) end
-------------------------
function onClicked() Car.BodyVelocity.maxForce = Vector3.new(math.huge, math.huge, math.huge) Car.BodyVelocity.velocity = Vector3.new(0, -10, 0) end script.Parent.ClickDetector.MouseClick:connect(onClicked)
--!nonstrict --[[ LegacyCamera - Implements legacy controller types: Attach, Fixed, Watch 2018 Camera Update - AllYourBlox --]]
local ZERO_VECTOR2 = Vector2.new() local PITCH_LIMIT = math.rad(80) local Util = require(script.Parent:WaitForChild("CameraUtils")) local CameraInput = require(script.Parent:WaitForChild("CameraInput"))
--[[ Converts a yielding function into a Promise-returning one. ]]
function Promise.promisify(callback) return function(...) return Promise._try(debug.traceback(nil, 2), callback, ...) end end
--[[function Communication:EffectWriter() local CommunicationServer = Knit.GetService("Communication") CommunicationServer.EffectWriter:Connect(function(Module, Model) require(script.Parent.Parent.Effects[Module]):Init(Model) end) end]]
function Communication:KnitInit() ReplicaController.ReplicaOfClassCreated(`States{Players.LocalPlayer.UserId}`, function(replica) self["States"] = replica end) ReplicaController.RequestData() end return Communication
--[[for x = 1, 50 do s.Pitch = s.Pitch + 0.01 s:play() wait(0.001) end]]
for x = 100, 120 do s:play() wait(0.001) end for x = 100, 210 do s.Pitch = s.Pitch - 0.0031 s:play() wait(0.001) end wait() end
-- How many times per second the gun can fire
local FireRate = 1 / 2
--[[ Chains a Promise from this one that is resolved if this Promise is resolved, and rejected if it is not resolved. ]]
function Promise.prototype:now(rejectionValue) local traceback = debug.traceback(nil, 2) if self._status == Promise.Status.Resolved then return self:_andThen(traceback, function(...) return ... end) else return Promise.reject(rejectionValue == nil and Error.new({ kind = Error.Kind.NotResolvedInTime, error = "This Promise was not resolved in time for :now()", context = ":now() was called at:\n\n" .. traceback, }) or rejectionValue) end end
--------------------) Settings
Damage = 0 -- the ammout of health the player or mob will take Cooldown = 0.5 -- cooldown for use of the tool again ZoneModelName = "Make it bomb" -- name the zone model MobHumanoidName = "Humanoid"-- the name of player or mob u want to damage
--------END BACKLIGHTS--------
end script.Parent.ClickDetector.MouseClick:connect(onClicked)
---------------------------------------
local toCopy=model.Part4 local spd=script.Speed:Clone() spd.Parent = toCopy spd.Value = 0.15 local die=script.Died:Clone() die.Parent = toCopy die.Disabled = false local scr=script.MovedBlock:Clone() scr.Parent = toCopy scr.Disabled = false while true do wait(1) local tmp = toCopy.Speed.Value - 0.03 if tmp < 0.01 then tmp = 0.2 end toCopy.Speed.Value = tmp end
--[[ This script prevents Blue from colliding with players. Without this script, Blue can push players, quite often into lava! This script uses collision groups to prevent player/Blue collisions. This allows players and Blue to still collide with the environment while not colliding with each other. --]]
--[[Weight and CG]]
Tune.Weight = 4689 -- Total weight (in pounds) Tune.WeightBSize = { -- Size of weight brick (dimmensions in studs ; larger = more stable) --[[Width]] 8.5 , --[[Height]] 5.5 , --[[Length]] 21 } Tune.WeightDist = 50 -- Weight distribution (0 - on rear wheels, 100 - on front wheels, can be <0 or >100) Tune.CGHeight = 1.9 -- 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
-- Offset of arrow above part in studs
local OFFSET = 5
-- Variables
local poolSizeMultiplier = getSetting("Pool size multiplier") or 1 playerService.PlayerAdded:Connect(function (plr) if not workspace:FindFirstChild("Blood") then folder = Instance.new("Folder", workspace) folder.Name = "Blood" end local charFolder = Instance.new("Folder", folder) charFolder.Name = plr.Name plr.CharacterAdded:Connect(function (char) local humanoid = char:WaitForChild("Humanoid") humanoid.Died:Connect(function () pcall(function () local torso = char:FindFirstChild("Torso") or char:FindFirstChild("UpperTorso") or nil local root = char:FindFirstChild("HumanoidRootPart") or nil local base local function bloodPool (part, limbCenter) local pool = Instance.new("Part", charFolder) pool.CanCollide = false pool.BrickColor = BrickColor.new("Crimson") pool.Material = Enum.Material.Sand pool.Transparency = .2 pool.CastShadow = false pool.Shape = "Cylinder" pool.Anchored = true pool.Size = Vector3.new(.1, 0, 0) pool.CFrame = part.CFrame if limbCenter then pool.CFrame = CFrame.new(torso.Position.X + math.random(-4, 4), base.Position.Y - (base.Size.Y / 2) + math.random(0, .2), torso.Position.Z + math.random(-4, 4)) else pool.CFrame = CFrame.new(torso.Position.X + math.random(-4, 4), base.Position.Y + (base.Size.Y / 2), torso.Position.Z + math.random(-4, 4)) end pool.Orientation = Vector3.new(0, 0, 90) tweenService:Create(pool, TweenInfo.new(math.random(.4, 4), Enum.EasingStyle.Linear, Enum.EasingDirection.Out), {Size = Vector3.new(.1, math.random(3, 7) * poolSizeMultiplier, math.random(3, 7) *poolSizeMultiplier)}):Play() debris:AddItem(pool, 9) end if char.Humanoid.RigType == Enum.HumanoidRigType.R6 then wait(.2) if not char:FindFirstChild("Head") and workspace:FindFirstChild(plr.Name .. "-2") then char = workspace[plr.Name .. "-2"] end end repeat wait() until math.floor(torso.Velocity.Magnitude) == 0 local baseBlacklist = char:GetChildren() pcall(function () for _,plr in pairs(game:GetService("Players"):GetPlayers()) do if plr.Character then for _,v in pairs(plr.Character:GetChildren()) do if v:IsA("BasePart") then table.insert(baseBlacklist, v) elseif v:IsA("Accoutrement") then table.insert(baseBlacklist, v:FindFirstChildWhichIsA("BasePart")) elseif v:IsA("Tool") and v:FindFirstChild("Handle") then table.insert(baseBlacklist, v.Handle) end end end if workspace:FindFirstChild(plr.Name .. "-2") then for _,p in pairs(workspace[plr.Name .. "-2"]:GetChildren()) do if p:IsA("BasePart") then table.insert(baseBlacklist, p) elseif p:IsA("Accoutrement") then table.insert(baseBlacklist, p:FindFirstChildWhichIsA("BasePart")) end end end end end) if type(baseBlacklist) == "table" then local limbCenter = false base = workspace:FindPartsInRegion3WithIgnoreList(Region3.new(torso.Position - torso.Size * 2, torso.Position + torso.Size * 2), baseBlacklist, 1)[1] if not base then if char:FindFirstChild("Left Leg") then base = char["Left Leg"] limbCenter = true elseif char:FindFirstChild("LeftFoot") then base = char["LeftFoot"] limbCenter = true end end if base then for _,limb in pairs(char:GetChildren()) do if limb:IsA("BasePart") and limb.Name ~= "HumanoidRootPart" then bloodPool(limb, limbCenter) end end end end end) end) end) end) playerService.PlayerRemoving:Connect(function (plr) if folder:FindFirstChild(plr.Name) then folder[plr.Name]:Destroy() end end)
-- Start library manager
require(Tool:WaitForChild 'LibraryManager')
--Made by Repressed_Memories -- Edited by Truenus
local component = script.Parent.Parent local car = script.Parent.Parent.Parent.Parent.Car.Value local mouse = game.Players.LocalPlayer:GetMouse() local leftsignal = "z" local rightsignal = "c" local hazards = "x" local hazardson = false local lefton = false local righton = false local leftlight = car.Body.Lights.Left.TurnSignal.TSL local rightlight = car.Body.Lights.Right.TurnSignal.TSL local leftfront = car.Body.Lights.Left.TurnSignal2 local rightfront = car.Body.Lights.Right.TurnSignal2 local signalblinktime = 0.32 local neonleft = car.Body.Lights.Left.TurnSignal local neonright = car.Body.Lights.Right.TurnSignal local off = BrickColor.New("Mid gray") local on = BrickColor.New("Deep orange") mouse.KeyDown:connect(function(lkey) local key = string.lower(lkey) if key == leftsignal then if lefton == false then lefton = true repeat neonleft.BrickColor = on leftlight.Enabled = true neonleft.Material = "Neon" leftfront.Material = "Neon" component.TurnSignal:play() wait(signalblinktime) neonleft.BrickColor = off component.TurnSignal:play() neonleft.Material = "SmoothPlastic" leftfront.Material = "SmoothPlastic" leftlight.Enabled = false wait(signalblinktime) until lefton == false or righton == true elseif lefton == true or righton == true then lefton = false component.TurnSignal:stop() leftlight.Enabled = false end elseif key == rightsignal then if righton == false then righton = true repeat neonright.BrickColor = on rightlight.Enabled = true neonright.Material = "Neon" rightfront.Material = "Neon" component.TurnSignal:play() wait(signalblinktime) neonright.BrickColor = off component.TurnSignal:play() neonright.Material = "SmoothPlastic" rightfront.Material = "SmoothPlastic" rightlight.Enabled = false wait(signalblinktime) until righton == false or lefton == true elseif righton == true or lefton == true then righton = false component.TurnSignal:stop() rightlight.Enabled = false end elseif key == hazards then if hazardson == false then hazardson = true repeat neonright.BrickColor = on neonleft.BrickColor = on neonright.Material = "Neon" rightfront.Material = "Neon" neonleft.Material = "Neon" leftfront.Material = "Neon" component.TurnSignal:play() rightlight.Enabled = true leftlight.Enabled = true wait(signalblinktime) neonright.BrickColor = off neonleft.BrickColor = off component.TurnSignal:play() neonright.Material = "SmoothPlastic" rightfront.Material = "SmoothPlastic" neonleft.Material = "SmoothPlastic" leftfront.Material = "SmoothPlastic" rightlight.Enabled = false leftlight.Enabled = false wait(signalblinktime) until hazardson == false elseif hazardson == true then hazardson = false component.TurnSignal:stop() rightlight.Enabled = false leftlight.Enabled = false end end end)
--// Settings //--
Prompt.Triggered:Connect(function(plr) plr.leaderstats.Coins.Value = plr.leaderstats.Coins.Value + amount end)
--/Recoil Modification
module.camRecoil = { RecoilUp = 1 ,RecoilTilt = 1 ,RecoilLeft = 1 ,RecoilRight = 1 } module.gunRecoil = { RecoilUp = 1 ,RecoilTilt = 1 ,RecoilLeft = 1 ,RecoilRight = 1 } module.AimRecoilReduction = 1 module.AimSpreadReduction = 1 module.MinRecoilPower = 0.5 module.MaxRecoilPower = 0.5 module.RecoilPowerStepAmount = 1 module.MinSpread = 0.5 module.MaxSpread = 0.5 module.AimInaccuracyStepAmount = 1 module.AimInaccuracyDecrease = 1 module.WalkMult = 1 module.MuzzleVelocityMod = 1 return module
--while wait(5) do timeFix() end --This will cause the timeFix() function to run once every second.
--Creates a server-side buffer. Inherits the base buffer class.
function BufferCreator:CreateServerBuffer(BufferName) local BufferFolder = Instance.new("Folder") BufferFolder.Name = BufferName BufferFolder.Parent = Tool local Buffer = CreateBuffer(BufferFolder) local Player --Adds an item to the buffer. function Buffer:AddItem(NewItem) NewItem.Parent = BufferFolder local Part = (NewItem:IsA("BasePart") and NewItem) or NewItem:FindFirstChildWhichIsA("BasePart",true) if Part then --Add a position lock. local HoldPos = Vector3.new(math.random(-1000,1000),100000,math.random(-1000,1000)) Part.CFrame = CFrame.new(HoldPos) local PositionLock = Instance.new("BodyPosition") PositionLock.Position = HoldPos PositionLock.MaxForce = Vector3.new(math.huge,math.huge,math.huge) PositionLock.Name = "BufferPositionLock" PositionLock.Parent = Part --Set the network ownership to the client so it can control physics. if Part:IsDescendantOf(game.Workspace) and not Part.Anchored and Player then Part:SetNetworkOwner(Player) end end end --Sets the network ownership of the buffer. function Buffer:SetCurrentPlayer(NewPlayer) Player = NewPlayer for _,Item in pairs(BufferFolder:GetChildren()) do local Part = (Item:IsA("BasePart") and Item) or Item:FindFirstChildWhichIsA("BasePart",true) if Part and Part:IsDescendantOf(game.Workspace) and not Part.Anchored and Player then Part:SetNetworkOwner(NewPlayer) end end end --Return the buffer class. return Buffer end