prompt
stringlengths
2
14.7k
completion
stringlengths
1
99.7k
--Rescripted by Luckymaxer
Tool = script.Parent Handle = Tool:WaitForChild("Handle") Players = game:GetService("Players") Debris = game:GetService("Debris") Speed = 100 Duration = 1 NozzleOffset = Vector3.new(0, 0.4, -1.1) Sounds = { Fire = Handle:WaitForChild("Fire"), Reload = Handle:WaitForChild("Reload"), HitFade = Handle:WaitForChild("HitFade") } PointLight = Handle:WaitForChild("PointLight") ServerControl = (Tool:FindFirstChild("ServerControl") or Instance.new("RemoteFunction")) ServerControl.Name = "ServerControl" ServerControl.Parent = Tool ClientControl = (Tool:FindFirstChild("ClientControl") or Instance.new("RemoteFunction")) ClientControl.Name = "ClientControl" ClientControl.Parent = Tool ServerControl.OnServerInvoke = (function(player, Mode, Value, arg) if player ~= Player or Humanoid.Health == 0 or not Tool.Enabled then return end if Mode == "Click" and Value then Activated(arg) end end) function InvokeClient(Mode, Value) pcall(function() ClientControl:InvokeClient(Player, Mode, Value) end) end function TagHumanoid(humanoid, player) local Creator_Tag = Instance.new("ObjectValue") Creator_Tag.Name = "creator" Creator_Tag.Value = player Debris:AddItem(Creator_Tag, 2) Creator_Tag.Parent = humanoid end 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 FindCharacterAncestor(Parent) if Parent and Parent ~= game:GetService("Workspace") then local humanoid = Parent:FindFirstChild("Humanoid") if humanoid then return Parent, humanoid else return FindCharacterAncestor(Parent.Parent) end end return nil end function GetTransparentsRecursive(Parent, PartsTable) local PartsTable = (PartsTable or {}) for i, v in pairs(Parent:GetChildren()) do local TransparencyExists = false pcall(function() local Transparency = v["Transparency"] if Transparency then TransparencyExists = true end end) if TransparencyExists then table.insert(PartsTable, v) end GetTransparentsRecursive(v, PartsTable) end return PartsTable end function SelectionBoxify(Object) local SelectionBox = Instance.new("SelectionBox") SelectionBox.Adornee = Object SelectionBox.Color = BrickColor.new("Toothpaste") SelectionBox.Parent = Object return SelectionBox end local function Light(Object) local Light = PointLight:Clone() Light.Range = (Light.Range + 2) Light.Parent = Object end function FadeOutObjects(Objects, FadeIncrement) repeat local LastObject = nil for i, v in pairs(Objects) do v.Transparency = (v.Transparency + FadeIncrement) LastObject = v end wait() until LastObject.Transparency >= 1 or not LastObject end function Dematerialize(character, humanoid, FirstPart) if not character or not humanoid then return end humanoid.WalkSpeed = 0 local Parts = {} for i, v in pairs(character:GetChildren()) do if v:IsA("BasePart") then v.Anchored = true table.insert(Parts, v) elseif v:IsA("LocalScript") or v:IsA("Script") then v:Destroy() end end local SelectionBoxes = {} local FirstSelectionBox = SelectionBoxify(FirstPart) Light(FirstPart) wait(0.05) for i, v in pairs(Parts) do if v ~= FirstPart then table.insert(SelectionBoxes, SelectionBoxify(v)) Light(v) end end local ObjectsWithTransparency = GetTransparentsRecursive(character) FadeOutObjects(ObjectsWithTransparency, 0.1) wait(0.5) character:BreakJoints() humanoid.Health = 0 Debris:AddItem(character, 2) local FadeIncrement = 0.05 delay(0.2, function() FadeOutObjects({FirstSelectionBox}, FadeIncrement) if character and character.Parent then character:Destroy() end end) FadeOutObjects(SelectionBoxes, FadeIncrement) end function Touched(Projectile, Hit) if not Hit or not Hit.Parent then return end local character, humanoid = FindCharacterAncestor(Hit) if character and humanoid and character ~= Character then local ForceFieldExists = false for i, v in pairs(character:GetChildren()) do if v:IsA("ForceField") then ForceFieldExists = true end end if not ForceFieldExists then if Projectile then local HitFadeSound = Projectile:FindFirstChild(Sounds.HitFade.Name) local torso = humanoid.Torso if HitFadeSound and torso then HitFadeSound.Parent = torso HitFadeSound:Play() end end Dematerialize(character, humanoid, Hit) end if Projectile and Projectile.Parent then Projectile:Destroy() end end end function Equipped() Character = Tool.Parent Player = Players:GetPlayerFromCharacter(Character) Humanoid = Character:FindFirstChild("Humanoid") if not Player or not Humanoid or Humanoid.Health == 0 then return end end function Activated(target) if Tool.Enabled and Humanoid.Health > 0 then Tool.Enabled = false InvokeClient("PlaySound", Sounds.Fire) local HandleCFrame = Handle.CFrame local FiringPoint = HandleCFrame.p + HandleCFrame:vectorToWorldSpace(NozzleOffset) local ShotCFrame = CFrame.new(FiringPoint, target) local LaserShotClone = BaseShot:Clone() LaserShotClone.CFrame = ShotCFrame + (ShotCFrame.lookVector * (BaseShot.Size.Z / 2)) local BodyVelocity = Instance.new("BodyVelocity") BodyVelocity.velocity = ShotCFrame.lookVector * Speed BodyVelocity.Parent = LaserShotClone LaserShotClone.Touched:connect(function(Hit) if not Hit or not Hit.Parent then return end Touched(LaserShotClone, Hit) end) Debris:AddItem(LaserShotClone, Duration) LaserShotClone.Parent = game:GetService("Workspace") wait(0.6) -- FireSound length InvokeClient("PlaySound", Sounds.Reload) wait(0.75) -- ReloadSound length Tool.Enabled = true end end function Unequipped() end BaseShot = Instance.new("Part") BaseShot.Name = "Effect" BaseShot.BrickColor = BrickColor.new("Toothpaste") BaseShot.Material = Enum.Material.Plastic BaseShot.Shape = Enum.PartType.Block BaseShot.TopSurface = Enum.SurfaceType.Smooth BaseShot.BottomSurface = Enum.SurfaceType.Smooth BaseShot.FormFactor = Enum.FormFactor.Custom BaseShot.Size = Vector3.new(0.2, 0.2, 3) BaseShot.CanCollide = false BaseShot.Locked = true SelectionBoxify(BaseShot) Light(BaseShot) BaseShotSound = Sounds.HitFade:Clone() BaseShotSound.Parent = BaseShot Tool.Equipped:connect(Equipped) Tool.Unequipped:connect(Unequipped) --[[ ]]
-- GAMEPASSES
Gamepasses = { [0] = "Admin"; [0] = "VIP"; };
-------------------------------------Gun info
ToolName="UZI" ClipSize=30 ReloadTime=2 Firerate=.12 MinSpread=.1 MaxSpread=.1 SpreadRate=9 BaseDamage=30 automatic=true burst=false shot=false --Semi Automatic BarrlePos=Vector3.new(0.5,0.4,-3) Cursors={"http://www.roblox.com/asset/?id=52812029"} ReloadCursor="http://www.roblox.com/asset/?id=52812038"
--[=[ An object that can be cleaned up @type MaidTask function | Destructable | RBXScriptConnection @within MaidTaskUtils ]=]
local MaidTaskUtils = {}
-- Listen for changes to the selection and keep the focus updated
Selection.Changed:connect(FocusOnLastSelectedPart); function GetCore() -- Returns the core API return require(script.Parent.Core); end; function CreateSelectionBoxes(Items) -- Creates a SelectionBox for each given item -- Get the core API local Core = GetCore(); -- Only create selection boxes if in tool mode if Core.Mode ~= 'Tool' then return; end; -- Track new selection boxes local SelectionBoxes = {}; -- Create an outline for each part for _, Item in pairs(Items) do -- Avoid duplicate selection boxes if not Selection.Outlines[Item] then -- Create the selection box local SelectionBox = Instance.new 'SelectionBox'; SelectionBox.Name = 'BTSelectionBox'; SelectionBox.Color = Selection.Color; SelectionBox.Adornee = Item; SelectionBox.LineThickness = 0.025; SelectionBox.Transparency = 0.5; -- Register the outline Selection.Outlines[Item] = SelectionBox; table.insert(SelectionBoxes, SelectionBox); end; end; -- Parent the selection boxes for _, SelectionBox in pairs(SelectionBoxes) do SelectionBox.Parent = Core.UIContainer; end; end; function RemoveSelectionBoxes(Items) -- Removes the given item's selection box -- Only proceed if in tool mode if GetCore().Mode ~= 'Tool' then return; end; -- Remove each item's outline for _, Item in pairs(Items) do -- Get the item's selection box local SelectionBox = Selection.Outlines[Item]; -- Remove the selection box if found if SelectionBox then SelectionBox:Destroy(); end; -- Deregister the selection box Selection.Outlines[Item] = nil; end; end; function Selection.RecolorOutlines(Color) -- Updates selection outline colors -- Set `Color` as the new color Selection.Color = Color; -- Recolor existing outlines for _, Outline in pairs(Selection.Outlines) do Outline.Color = Selection.Color; end; end; function Selection.FlashOutlines() -- Flashes selection outlines for emphasis -- Fade in from complete to normal transparency for Transparency = 1, 0.5, -0.1 do -- Update each outline for _, Outline in pairs(Selection.Outlines) do Outline.Transparency = Transparency; end; -- Fade over time wait(0.1); end; end; function Selection.EnableOutlines() -- Shows selection outlines local UIContainer = GetCore().UIContainer; -- Show each outline for _, Outline in pairs(Selection.Outlines) do Outline.Parent = UIContainer; end; -- Hide outlines when tool is disabled GetCore().Connections.HideOutlinesOnDisable = GetCore().Disabling:connect(Selection.HideOutlines); end; function Selection.EnableMultiselectionHotkeys() -- Enables hotkeys for multiselecting -- Determine multiselection hotkeys local Hotkeys = Support.FlipTable { 'LeftShift', 'RightShift', 'LeftControl', 'RightControl' }; -- Get core API local Core = GetCore(); -- Listen for matching key presses Core.Connections.MultiselectionHotkeys = Support.AddUserInputListener('Began', 'Keyboard', false, function (Input) if Hotkeys[Input.KeyCode.Name] then Selection.Multiselecting = true; end; end); -- Listen for matching key releases Core.Connections.MultiselectingReleaseHotkeys = Support.AddUserInputListener('Ended', 'Keyboard', true, function (Input) -- Get currently pressed keys local PressedKeys = Support.GetListMembers(Support.GetListMembers(Game:GetService('UserInputService'):GetKeysPressed(), 'KeyCode'), 'Name'); -- Continue multiselection if a hotkey is still pressed for _, PressedKey in pairs(PressedKeys) do if Hotkeys[PressedKey] then return; end; end; -- Disable multiselection if matching key not found Selection.Multiselecting = false; end); end; function Selection.HideOutlines() -- Hides selection outlines -- Hide each outline for _, Outline in pairs(Selection.Outlines) do Outline.Parent = nil; end; end; function TrackSelectionChange(OldSelection) -- Registers a history record for a change in the selection -- Avoid overwriting history for selection actions if History.Index ~= #History.Stack then return; end; -- Add the history record History.Add({ Before = OldSelection; After = Selection.Items; Unapply = function (HistoryRecord) -- Reverts this change -- Restore the old selection Selection.Replace(HistoryRecord.Before); end; Apply = function (HistoryRecord) -- Reapplies this change -- Restore the new selection Selection.Replace(HistoryRecord.After); end; }); end; return Selection;
-------------------------
function onClicked() --sensor.Disabled = true script.Parent.ClickDetector.MaxActivationDistance = "0" Car.Alarma.Playing = true Car.Alarma.TimePosition = "0" wait(10) Car.Sound.Playing = true Car.Sound.TimePosition = "0" Car.BodyVelocity.velocity = Vector3.new(0, 20, 0)--hacia Arriba 4 wait(0.1) Car.BodyVelocity.velocity = Vector3.new(0, 35, 0) wait(3.4) Car.BodyVelocity.velocity = Vector3.new(0, 20, 0) wait(0.1) Car.BodyVelocity.velocity = Vector3.new(0, 0, 0) wait(0.1) Car.BodyVelocity.velocity = Vector3.new(0, -80, 0) --Hacia Abajo 4 wait(0.5)
-- Signal class
local Signal = {} Signal.__index = Signal function Signal.new(janitor) local self = setmetatable({ _handlerListHead = false, _proxyHandler = nil, }, Signal) if janitor then janitor:Add(self) end return self end function Signal.Wrap(rbxScriptSignal, janitor) assert(typeof(rbxScriptSignal) == "RBXScriptSignal", "Argument #1 to Signal.Wrap must be a RBXScriptSignal; got " .. typeof(rbxScriptSignal)) local signal = Signal.new(janitor) signal._proxyHandler = rbxScriptSignal:Connect(function(...) signal:Fire(...) end) return signal end function Signal.Is(obj) return type(obj) == "table" and getmetatable(obj) == Signal end function Signal:Connect(fn) local connection = Connection.new(self, fn) if self._handlerListHead then connection._next = self._handlerListHead self._handlerListHead = connection else self._handlerListHead = connection end return connection end function Signal:GetConnections() local items = {} local item = self._handlerListHead while item do table.insert(items, item) item = item._next end return items end
-- не забыть бы убрать!!! --local Debris = game:GetService("Debris") -- это сервисная команда --local TimeForDestroy = 10*60 -- минимальное время жизни (10 минут = 10*60)
local turret = require(game.ServerScriptService.GAVturret) local V1 = 10 -- скорострельность local SPEED = 400 -- скорость снарядов local MAX_DIST = 70 -- дистанция срабатывания local DAMAGE = 10 -- наносимые повреждения local TYPE = "SINGLE" -- AOE, SINGLE wait() me=script.Parent pos = me.PrimaryPart while true do local target = turret.findNearestHead(pos,MAX_DIST) --findNearestHead() if target ~= nil then if target ~= nil and target.Parent ~= nil and target.Parent.Humanoid.Health>0 then alt=turret.lookAt(target.Position,pos.Position) -- пушка только по горизотали! me:SetPrimaryPartCFrame(alt) -- направляем туда пушку -- вычисляем направление выстрела alt=turret.lookAtY(target.Position,me.Rocket.Position)-- ракета (пусковой механизм) полностью ориентируется me.Rocket.CFrame= alt -- в снаряд суём чья турель if me.Rocket:FindFirstChild("Owner") == nil then tmp=me.Owner:Clone() tmp.Parent = me.Rocket end turret.Fire(me.Rocket,DAMAGE,SPEED, TYPE) -- стреляем (место снаряда, повреждение) -- добавить создателя пушки wait() end end wait(V1/10) end
--[[ Returns true if table is array and false for dictionary Functions.IsArray( table, <-- |REQ| Table ) --]]
return function(array) --- Loop through "array" for i, v in pairs(array) do if type(i) ~= "number" or array[i] == nil then return false elseif i >= 10 then break end end --- Checks out! It's an array. return true end
--WeldRec(P.Parent.Lights)
for _,v in pairs(weldedParts) do if v:IsA("BasePart") then v.Anchored = false end end script:Destroy()
-- [[ Services ]]
local RunService = game:GetService("RunService") local CollectionService = game:GetService("CollectionService") local ReplicatedStorage = game:GetService("ReplicatedStorage") local Modules = ReplicatedStorage:WaitForChild("SharedModules") local Thread = require(Modules.Thread)
--[[ Higher order component that lets the wrapped component consume the InputContext. ]]
local function withInputContext(component) return function(props) if props.inputContext then warn("Child component has a prop named `inputContext` and will be overriden by InputContext.") end return Roact.createElement(Context.Consumer, { render = function(inputContext) local mergedProps = Cryo.Dictionary.join({ inputContext = inputContext }, props) return Roact.createElement(component, mergedProps) end, }) end end local InputContext = { Consumer = Context.Consumer, Provider = withConfiguration(InputContextProvider), withInputContext = withInputContext, } return InputContext
-- Variables (best not to touch these!)
local button = script.Parent local car = script.Parent.Parent.Car.Value local sound = script.Parent.StartD local startsound = script.Parent.StartChime sound.Parent = car.DriveSeat -- What brick the start sound is playing from. button.MouseButton1Click:connect(function() -- Event when the button is clicked if script.Parent.Text == "Engine: OFF" then -- If the text says it's off then.. startsound:play() wait(1) sound:Play() wait(2.7) script.Parent.Parent.IsOn.Value = true -- The car is is on, or in other words, start up the car. button.Text = "Engine: On" script.Parent.Parent.AC6C_Stock_Gauges:TweenPosition(UDim2.new(0, 0,-0.3, 0), "Out", "Quad", 1) wait(3) script.Parent.Parent.FollowNotification:TweenPosition(UDim2.new(1, -200,1, -100), "Out", "Quad", 1) script.Parent.Notif:play() sound:stop() startsound:Stop() wait(3) script.Parent.Parent.FollowNotification:TweenPosition(UDim2.new(1, 0,1, -100), "Out", "Quad", 1) else -- If it's on then when you click the button, script.Parent.Parent.IsOn.Value = false -- The car is turned off. button.Text = "Engine: OFF" script.Parent.EngineOff:play() end -- Don't touch this. end) -- And don't touch this either.
--[[Wheel Alignment]]
--[Don't physically apply alignment to wheels] --[Values are in degrees] Tune.FCamber = -8 Tune.RCamber = -8 Tune.FToe = 0 Tune.RToe = 0
-- Set the part's initial velocity to 10 units per second in the z direction
part.Velocity = Vector3.new(0, 0, 20) part.Touched:Connect(function(hit) if hit.Parent:FindFirstChild("Humanoid") then local explosion = Instance.new("Explosion") explosion.Position = part.Position explosion.Parent = workspace hit.Parent.Humanoid:TakeDamage(10) end end)
-- Mouth Animtion
local SizeState1 = Vector3.new(0.794, 0.69, 0.949) local SizeState2 = Vector3.new(0.794, 0.69, 0.849) local SizeState3 = Vector3.new(0.794, 0.69, 0.749) local SizeState4 = Vector3.new(0.794, 0.69, 0.649) local SizeState5 = Vector3.new(0.794, 0.69, 0.549) while true do if not AnimDebounce then AnimDebounce = true for i = 1,math.random(1,5) do Mouth.Size = SizeState1 Mouth1_2.Size = SizeState1 wait(0.05) Mouth.Size = SizeState2 Mouth1_2.Size = SizeState2 wait(0.05) Mouth.Size = SizeState3 Mouth1_2.Size = SizeState3 wait(0.05) Mouth.Size = SizeState4 Mouth1_2.Size = SizeState4 wait(0.05) Mouth.Size = SizeState5 Mouth1_2.Size = SizeState5 wait(0.5) Mouth.Size = SizeState5 Mouth1_2.Size = SizeState5 wait(0.05) Mouth.Size = SizeState4 Mouth1_2.Size = SizeState4 wait(0.05) Mouth.Size = SizeState3 Mouth1_2.Size = SizeState3 wait(0.05) Mouth.Size = SizeState2 Mouth1_2.Size = SizeState2 wait(0.05) Mouth.Size = SizeState1 Mouth1_2.Size = SizeState1 wait(math.random(0.05,1)) end wait(math.random(8,16)) AnimDebounce = false end end
--//Opens Door (checks ownership)
prompt.Triggered:Connect(function(player) if prompt.ActionText == "Close" and player.Name == owner.Value then door.Transparency = 0 door.knob1.Transparency = 0 door.knob2.Transparency = 0 door.CanCollide = true door2.Transparency = 1 door2.knob1.Transparency = 1 door2.knob2.Transparency = 1 prompt.ActionText = "Open" wait(1) elseif prompt.ActionText == "Open" and player.Name == owner.Value then door.Transparency = 1 door.knob1.Transparency = 1 door.knob2.Transparency = 1 door2.Transparency = 0 door2.knob1.Transparency = 0 door2.knob2.Transparency = 0 door.CanCollide = false prompt.ActionText = "Close" wait(1) end end)
-- / Gun / --
local Gun = script.Parent.Parent local BodyAttach = Gun.BodyAttach
--[=[ @within Gamepad @type GamepadState {[Enum.KeyCode]: InputObject} ]=]
--[[ Performs a right-fold of the list with the given initial value and callback. ]]
local function foldRight(list, callback, initialValue) local accum = initialValue for i = #list, 1, -1 do accum = callback(accum, list[i], i) end return accum end return foldRight
--[[** ensures value is a table and all keys pass keyCheck and all values pass valueCheck @param keyCheck The function to use to check the keys @param valueCheck The function to use to check the values @returns A function that will return true iff the condition is passed **--]]
function t.map(keyCheck, valueCheck) assert(t.callback(keyCheck), t.callback(valueCheck)) local keyChecker = t.keys(keyCheck) local valueChecker = t.values(valueCheck) return function(value) local keySuccess, keyErr = keyChecker(value) if not keySuccess then return false, keyErr or "" end local valueSuccess, valueErr = valueChecker(value) if not valueSuccess then return false, valueErr or "" end return true end end do local arrayKeysCheck = t.keys(t.integer) --[[** ensures value is an array and all values of the array match check @param check The check to compare all values with @returns A function that will return true iff the condition is passed **--]] function t.array(check) assert(t.callback(check)) local valuesCheck = t.values(check) return function(value) local keySuccess, keyErrMsg = arrayKeysCheck(value) if keySuccess == false then return false, string.format("[array] %s", keyErrMsg or "") end -- all keys are sequential local arraySize = #value for key in pairs(value) do if key < 1 or key > arraySize then return false, string.format("[array] key %s must be sequential", tostring(key)) end end local valueSuccess, valueErrMsg = valuesCheck(value) if not valueSuccess then return false, string.format("[array] %s", valueErrMsg or "") end return true end end end do local callbackArray = t.array(t.callback) --[[** creates a union type @param ... The checks to union @returns A function that will return true iff the condition is passed **--]] function t.union(...) local checks = {...} assert(callbackArray(checks)) return function(value) for _, check in pairs(checks) do if check(value) then return true end end return false, "bad type for union" end end --[[** creates an intersection type @param ... The checks to intersect @returns A function that will return true iff the condition is passed **--]] function t.intersection(...) local checks = {...} assert(callbackArray(checks)) return function(value) for _, check in pairs(checks) do local success, errMsg = check(value) if not success then return false, errMsg or "" end end return true end end end do local checkInterface = t.map(t.any, t.callback) --[[** ensures value matches given interface definition @param checkTable The interface definition @returns A function that will return true iff the condition is passed **--]] function t.interface(checkTable) assert(checkInterface(checkTable)) return function(value) local tableSuccess, tableErrMsg = t.table(value) if tableSuccess == false then return false, tableErrMsg or "" end for key, check in pairs(checkTable) do local success, errMsg = check(value[key]) if success == false then return false, string.format("[interface] bad value for %s:\n\t%s", tostring(key), errMsg or "") end end return true end end --[[** ensures value matches given interface definition strictly @param checkTable The interface definition @returns A function that will return true iff the condition is passed **--]] function t.strictInterface(checkTable) assert(checkInterface(checkTable)) return function(value) local tableSuccess, tableErrMsg = t.table(value) if tableSuccess == false then return false, tableErrMsg or "" end for key, check in pairs(checkTable) do local success, errMsg = check(value[key]) if success == false then return false, string.format("[interface] bad value for %s:\n\t%s", tostring(key), errMsg or "") end end for key in pairs(value) do if not checkTable[key] then return false, string.format("[interface] unexpected field '%s'", tostring(key)) end end return true end end end
-- place this script into StarterPlayerScripts -- it will not work otherwise
local sm = Color3.fromRGB(0, 255, 255)--color of the message local sm1 = Color3.fromRGB(255, 0, 0)--color of the message game:GetService('Players').PlayerAdded:Connect(function(plr) local message = ("[Server]: Player ".."'"..plr.Name.."'".." Just Joined The Game!") game.StarterGui:SetCore("ChatMakeSystemMessage", { Text = message; Font = Enum.Font.SourceSansBold; Color = sm; FontSize = Enum.FontSize.Size18; }) end) game:GetSerivce('Players').PlayerRemoving:Connect(function(plr) local message = ("[Server]: Player ".."'"..plr.Name.."'".." Just Leave The Game!") game.StarterGui:SetCore("ChatMakeSystemMessage", { Text = message; Font = Enum.Font.SourceSansBold; Color = sm1; FontSize = Enum.FontSize.Size18; }) end)
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
local path local waypoint local chaseName = nil function GetTorso(part) local chars = game.Workspace:GetDescendants() local chaseRoot = nil local chaseTorso = nil local chasePlr = nil local chaseHuman = nil local mag = SearchDistance for i = 1, #chars do chasePlr = chars[i] if chasePlr:IsA'Model' and not chasePlr:FindFirstChild("Enemy") and not chasePlr:FindFirstChild("Helper") then chaseHuman = getHumanoid(chasePlr) chaseRoot = chasePlr:FindFirstChild'HumanoidRootPart' if chaseRoot ~= nil and chaseHuman ~= nil and chaseHuman.Health > 0 and not chaseHuman:FindFirstChild("Enemy") and not chasePlr:FindFirstChild("Helper") then if (chaseRoot.Position - part).magnitude < mag then chaseName = chasePlr.Name chaseTorso = chaseRoot mag = (chaseRoot.Position - part).magnitude end end end end return chaseTorso end function GetPlayersBodyParts(t) local torso = t if torso then local figure = torso.Parent for _, v in pairs(figure:GetChildren())do if v:IsA'Part' then return v.Name end end else return "HumanoidRootPart" end end
-- Setting up variables
module.Diving = false module.DiveSlideCanceling = false module.WallJumping = false module.DiveSliding = false module.Crouching = false module.LongJumping = false module.diveCount = 0 module.totalDives = 0 module.cananimate = true module.GroundPounding = false module.backflipping = false module.canGroundPound = true module.hitfloor = false module.DiveSpeed = 0 module.Trail = nil return module
---------------------
script.Parent.Parent.ll1.Transparency = 1 script.Parent.Parent.l1.Transparency = 1 script.Parent.Parent.rr1.Transparency = 1 script.Parent.Parent.h1.Transparency = 1
--credit to matt for fixing
task.wait(0.1) local Players = game:GetService("Players") local Check = {"Player1"} local TeamColor = BrickColor.new("Medium stone grey") local Blacklist = {} local seat = script.Parent local gui = script.Car local owner = nil local deletetime = 30 local currTime = 30 local timerdebounce = false local function StartTimer() script.Parent.Parent.Sound.Timeout.Enabled = true repeat script.Parent.Parent.Sound.Timeout.TextLabel.Text = tostring(currTime) .. "" script.Parent.Parent.Sound.Timeout.TextLabel.TextScaled = false currTime -= 1 if currTime == 0 then seat.Parent:Destroy() end task.wait(1) until currTime == 0 or owner ~= nil currTime = deletetime script.Parent.Parent.Sound.Timeout.Enabled = false end local function GiveGUI(plr) local guiClone = gui:Clone() guiClone.Parent = plr.PlayerGui guiClone.Frame.Seat.Value = script.Parent guiClone.Frame.LocalScript.Disabled = false end script.Parent.ChildAdded:connect(function(it) if it:IsA("Weld") and it.Name == "SeatWeld" then print(it.Name) local tempCharacter = it.Part1.Parent local tempPlayer = Players:GetPlayerFromCharacter(tempCharacter) if owner == nil and tempPlayer.TeamColor == TeamColor then owner = tempPlayer GiveGUI(tempPlayer) seat:SetNetworkOwnershipAuto() elseif owner ~= nil and tempPlayer.Name == owner.Name then print("welcome back") seat:SetNetworkOwnershipAuto() else seat.Disabled = true print("Booted Player.") task.wait(1.5) seat.Disabled = false end elseif it:IsA("IntValue") then owner = nil script.Parent.Parent.Parent = game.Workspace.VehiclesFolder.UnclaimedVehicles seat:SetNetworkOwnershipAuto() StartTimer() end end)
-- Thanks for Meanwhile & XaXa for this script. -- Remember this was designed for Meanwhile weapons so any other weapons might not work. -- You have no permission to repubish this in you model even if it edited. -- If your found then you will be ban from my place. -- original Manofthelol Script
Tool = script.Parent local Mouse = true local Spin = script.Parent.Spin.Value local Heat = script.Parent.Heat.Value local chamber = true local Player = Tool.Parent local Dist = 0.20 local firing = false local enabled = true local reloading = false rotvalueB1 = 90 rotvalueB2 = 30 rotvalueB3 = 330 rotvalueB4 = 270 rotvalueB5 = 210 rotvalueB6 = 150 local arms = nil local torso = nil local weld33 = nil -- right arm local weld55 = nil -- left arm local welds = {} function ReloadSequence() Tool.S1.Transparency = 1 wait() Tool.S2.Transparency = 1 wait() Tool.S3.Transparency = 1 wait(.03) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(310), 0.2, math.rad(-90)) Tool.S4.Transparency = 1 wait(.03) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(310), 0.1, math.rad(-90)) Tool.S5.Transparency = 1 wait(.03) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(310), 0, math.rad(-90)) Tool.S6.Transparency = 1 wait(.03) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(310), -0.1, math.rad(-90)) Tool.S7.Transparency = 1 wait(.03) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(310), -0.2, math.rad(-90)) Tool.S8.Transparency = 1 wait(.03) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(310), -0.3, math.rad(-90)) Tool.S9.Transparency = 1 wait(.03) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(310), -0.4, math.rad(-90)) Tool.S10.Transparency = 1 wait(.03) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(310), -0.5, math.rad(-90)) Tool.S11.Transparency = 1 wait(.03) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(310), -0.6, math.rad(-90)) Tool.S12.Transparency = 1 wait(.03) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(310), -0.7, math.rad(-90)) local mag = Tool.Mag:clone() mag.CFrame = Tool.Mag.CFrame mag.CanCollide = false mag.Parent = game.Workspace Tool.Mag.Transparency = 1 local mag = Tool.Mag2:clone() mag.CFrame = Tool.Mag.CFrame mag.CanCollide = false mag.Parent = game.Workspace Tool.Mag2.Transparency = 1 local mag = Tool.Mag3:clone() mag.CFrame = Tool.Mag.CFrame mag.CanCollide = false mag.Parent = game.Workspace Tool.Mag3.Transparency = 1 Tool.Handle.M1:play() wait(1) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(310), -0.8, math.rad(-90)) wait(.03) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(310), -0.9, math.rad(-90)) wait(.2) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(310), -1, math.rad(-90)) Tool.Mag.Transparency = 0 Tool.Mag2.Transparency = 0 Tool.Mag3.Transparency = 0 Tool.Mag.Mesh.Offset = Vector3.new(0, 0, 0.4) Tool.Mag2.Mesh.Offset = Vector3.new(0, 0, 0.4) Tool.Mag3.Mesh.Offset = Vector3.new(0, 0, 0.4) wait(.03) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(310), -0.9, math.rad(-90)) Tool.Mag.Mesh.Offset = Vector3.new(0, 0, 0.3) Tool.Mag2.Mesh.Offset = Vector3.new(0, 0, 0.3) Tool.Mag3.Mesh.Offset = Vector3.new(0, 0, 0.3) wait(.03) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(310), -0.8, math.rad(-90)) Tool.Mag.Mesh.Offset = Vector3.new(0, 0, 0.2) Tool.Mag2.Mesh.Offset = Vector3.new(0, 0, 0.2) Tool.Mag3.Mesh.Offset = Vector3.new(0, 0, 0.2) wait(.03) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(310), -0.7, math.rad(-90)) Tool.Mag.Mesh.Offset = Vector3.new(0, 0, 0.1) Tool.Mag2.Mesh.Offset = Vector3.new(0, 0, 0.1) Tool.Mag3.Mesh.Offset = Vector3.new(0, 0, 0.1) wait(.03) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(310), -0.6, math.rad(-90)) Tool.Mag.Mesh.Offset = Vector3.new(0, 0, 0) Tool.Mag2.Mesh.Offset = Vector3.new(0, 0, 0) Tool.Mag3.Mesh.Offset = Vector3.new(0, 0, 0) Tool.Handle.M2:play() wait(.03) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(309), -0.61, math.rad(-90)) wait(.03) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(308), -0.62, math.rad(-90)) wait(.03) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(307), -0.63, math.rad(-90)) wait(.03) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(306), -0.64, math.rad(-90)) wait(.03) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(305), -0.65, math.rad(-90)) wait(.03) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(304), -0.66, math.rad(-90)) wait(.03) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(303), -0.67, math.rad(-90)) wait(.03) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(302), -0.68, math.rad(-90)) wait(.03) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(301), -0.69, math.rad(-90)) Tool.S12.Transparency = 0 wait(.03) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(300), -0.7, math.rad(-90)) Tool.S11.Transparency = 0 wait(.03) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(301), -0.69, math.rad(-90)) Tool.S10.Transparency = 0 wait(.03) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(302), -0.68, math.rad(-90)) Tool.S9.Transparency = 0 wait(.03) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(303), -0.67, math.rad(-90)) Tool.S8.Transparency = 0 wait(.03) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(304), -0.66, math.rad(-90)) Tool.S7.Transparency = 0 wait(.03) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(305), -0.65, math.rad(-90)) Tool.S6.Transparency = 0 wait(.03) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(306), -0.64, math.rad(-90)) Tool.S5.Transparency = 0 wait(.03) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(307), -0.63, math.rad(-90)) Tool.S4.Transparency = 0 wait(.03) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(308), -0.62, math.rad(-90)) Tool.S3.Transparency = 0 wait(.03) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(309), -0.61, math.rad(-90)) Tool.S2.Transparency = 0 wait(.03) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(310), -0.6, math.rad(-90)) Tool.S1.Transparency = 0 weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(310), -0.5, math.rad(-90)) wait(.03) Tool.Mag.Mesh.Offset = Vector3.new(0, 0, 0) Tool.Handle.M2:play() weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(310), -0.4, math.rad(-90)) wait(.03) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(310), -0.3, math.rad(-90)) wait(.03) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(310), -0.2, math.rad(-90)) wait(.03) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(310), -0.1, math.rad(-90)) wait(.03) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(310), 0, math.rad(-90)) wait(.5) weld33.C1 = CFrame.new(-0.75, -1.2, 0.35) * CFrame.fromEulerAnglesXYZ(math.rad(-70), math.rad(-35), 0) weld55.C1 = CFrame.new(-0.35, 2, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(295), 0, math.rad(-90)) end function ReloadSequence2() Tool.S1.Transparency = 1 wait() Tool.S2.Transparency = 1 wait() Tool.S3.Transparency = 1 wait(.03) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(310), 0.2, math.rad(-90)) Tool.S4.Transparency = 1 wait(.03) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(310), 0.1, math.rad(-90)) Tool.S5.Transparency = 1 wait(.03) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(310), 0, math.rad(-90)) Tool.S6.Transparency = 1 wait(.03) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(310), -0.1, math.rad(-90)) Tool.S7.Transparency = 1 wait(.03) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(310), -0.2, math.rad(-90)) Tool.S8.Transparency = 1 wait(.03) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(310), -0.3, math.rad(-90)) Tool.S9.Transparency = 1 wait(.03) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(310), -0.4, math.rad(-90)) Tool.S10.Transparency = 1 wait(.03) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(310), -0.5, math.rad(-90)) Tool.S11.Transparency = 1 wait(.03) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(310), -0.6, math.rad(-90)) Tool.S12.Transparency = 1 wait(.03) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(310), -0.7, math.rad(-90)) local mag = Tool.Mag:clone() mag.CFrame = Tool.Mag.CFrame mag.CanCollide = false mag.Parent = game.Workspace Tool.Mag.Transparency = 1 local mag = Tool.Mag2:clone() mag.CFrame = Tool.Mag.CFrame mag.CanCollide = false mag.Parent = game.Workspace Tool.Mag2.Transparency = 1 local mag = Tool.Mag3:clone() mag.CFrame = Tool.Mag.CFrame mag.CanCollide = false mag.Parent = game.Workspace Tool.Mag3.Transparency = 1 Tool.Handle.M1:play() wait(1) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(310), -0.8, math.rad(-90)) wait(.03) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(310), -0.9, math.rad(-90)) wait(.2) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(310), -1, math.rad(-90)) Tool.Mag.Transparency = 0 Tool.Mag2.Transparency = 0 Tool.Mag3.Transparency = 0 Tool.Mag.Mesh.Offset = Vector3.new(0, 0, 0.4) Tool.Mag2.Mesh.Offset = Vector3.new(0, 0, 0.4) Tool.Mag3.Mesh.Offset = Vector3.new(0, 0, 0.4) wait(.03) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(310), -0.9, math.rad(-90)) Tool.Mag.Mesh.Offset = Vector3.new(0, 0, 0.3) Tool.Mag2.Mesh.Offset = Vector3.new(0, 0, 0.3) Tool.Mag3.Mesh.Offset = Vector3.new(0, 0, 0.3) wait(.03) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(310), -0.8, math.rad(-90)) Tool.Mag.Mesh.Offset = Vector3.new(0, 0, 0.2) Tool.Mag2.Mesh.Offset = Vector3.new(0, 0, 0.2) Tool.Mag3.Mesh.Offset = Vector3.new(0, 0, 0.2) wait(.03) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(310), -0.7, math.rad(-90)) Tool.Mag.Mesh.Offset = Vector3.new(0, 0, 0.1) Tool.Mag2.Mesh.Offset = Vector3.new(0, 0, 0.1) Tool.Mag3.Mesh.Offset = Vector3.new(0, 0, 0.1) wait(.03) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(310), -0.6, math.rad(-90)) Tool.Mag.Mesh.Offset = Vector3.new(0, 0, 0) Tool.Mag2.Mesh.Offset = Vector3.new(0, 0, 0) Tool.Mag3.Mesh.Offset = Vector3.new(0, 0, 0) Tool.Handle.M2:play() wait(.03) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(309), -0.61, math.rad(-90)) wait(.03) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(308), -0.62, math.rad(-90)) wait(.03) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(307), -0.63, math.rad(-90)) wait(.03) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(306), -0.64, math.rad(-90)) wait(.03) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(305), -0.65, math.rad(-90)) wait(.03) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(304), -0.66, math.rad(-90)) wait(.03) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(303), -0.67, math.rad(-90)) wait(.03) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(302), -0.68, math.rad(-90)) wait(.03) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(301), -0.69, math.rad(-90)) Tool.S12.Transparency = 0 wait(.03) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(300), -0.7, math.rad(-90)) Tool.S11.Transparency = 0 wait(.03) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(301), -0.69, math.rad(-90)) Tool.S10.Transparency = 0 wait(.03) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(302), -0.68, math.rad(-90)) Tool.S9.Transparency = 0 wait(.03) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(303), -0.67, math.rad(-90)) Tool.S8.Transparency = 0 wait(.03) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(304), -0.66, math.rad(-90)) Tool.S7.Transparency = 0 wait(.03) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(305), -0.65, math.rad(-90)) Tool.S6.Transparency = 0 wait(.03) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(306), -0.64, math.rad(-90)) Tool.S5.Transparency = 0 wait(.03) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(307), -0.63, math.rad(-90)) Tool.S4.Transparency = 0 wait(.03) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(308), -0.62, math.rad(-90)) Tool.S3.Transparency = 0 wait(.03) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(309), -0.61, math.rad(-90)) Tool.S2.Transparency = 0 wait(.03) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(310), -0.6, math.rad(-90)) Tool.S1.Transparency = 0 weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(310), -0.5, math.rad(-90)) wait(.03) Tool.Mag.Mesh.Offset = Vector3.new(0, 0, 0) Tool.Handle.M2:play() weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(310), -0.3, math.rad(-90)) wait(.5) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(310), -0.4, math.rad(-90)) wait(.03) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(310), -0.5, math.rad(-90)) wait(.03) weld55.C1 = CFrame.new(-0.35, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(310), -0.6, math.rad(-90)) Tool.Handle.Close:play() Tool.Handle.Engine:play() wait(.03) weld55.C1 = CFrame.new(-0.35, 1.1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(308), -0.5, math.rad(-90)) wait(.03) weld55.C1 = CFrame.new(-0.35, 1.2, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(306), -0.4, math.rad(-90)) wait(.03) weld55.C1 = CFrame.new(-0.35, 1.3, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(304), -0.3, math.rad(-90)) wait(.03) weld55.C1 = CFrame.new(-0.35, 1.4, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(302), -0.2, math.rad(-90)) wait(.03) weld55.C1 = CFrame.new(-0.35, 1.5, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(300), 0.1, math.rad(-90)) wait(.03) weld55.C1 = CFrame.new(-0.35, 1.6, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(298), 0, math.rad(-90)) wait(.03) weld55.C1 = CFrame.new(-0.35, 1.7, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(296), 0, math.rad(-90)) wait(.03) weld55.C1 = CFrame.new(-0.35, 1.8, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(295), 0, math.rad(-90)) wait(.03) weld55.C1 = CFrame.new(-0.35, 1.9, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(295), 0, math.rad(-90)) wait(.03) weld33.C1 = CFrame.new(-0.75, -1.2, 0.35) * CFrame.fromEulerAnglesXYZ(math.rad(-70), math.rad(-35), 0) weld55.C1 = CFrame.new(-0.35, 2, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(295), 0, math.rad(-90)) end function Reload() Tool.Left.Value = Tool.Ammo.Value if script.Parent.Ammo.Value < script.Parent.MaxAmmo.Value and reloading == false and script.Parent.StoredAmmo.Value >= 1 then reloading = true script.Parent.Ammo.Value = 0 ReloadChoose() script.Parent.StoredAmmo.Value = script.Parent.StoredAmmo.Value + script.Parent.Left.Value if script.Parent.StoredAmmo.Value >= script.Parent.MaxAmmo.Value then script.Parent.StoredAmmo.Value = script.Parent.StoredAmmo.Value - script.Parent.MaxAmmo.Value script.Parent.Ammo.Value = script.Parent.MaxAmmo.Value script.Parent.Recoil.Value = 5 elseif script.Parent.StoredAmmo.Value < script.Parent.MaxAmmo.Value and script.Parent.StoredAmmo.Value >= 1 then script.Parent.Ammo.Value = script.Parent.StoredAmmo.Value script.Parent.StoredAmmo.Value = 0 script.Parent.Recoil.Value = 5 end reloading = false end end function ReloadChoose() if script.Parent.Left.Value == 0 then ReloadSequence2() elseif script.Parent.Left.Value >= 1 then ReloadSequence() end end function Equip(mouse) wait(.1) print("Equipped") if game.Players.LocalPlayer ~= nil then Gui = Tool.OverheatBar:clone() Gui.Parent = game.Players.LocalPlayer.PlayerGui end wait(0.01) arms = {Tool.Parent:FindFirstChild("Left Arm"), Tool.Parent:FindFirstChild("Right Arm")} torso = Tool.Parent:FindFirstChild("Torso") if arms ~= nil and torso ~= nil then local sh = {torso:FindFirstChild("Left Shoulder"), torso:FindFirstChild("Right Shoulder")} if sh ~= nil then local yes = true if yes then yes = false sh[1].Part1 = nil sh[2].Part1 = nil falsearm1 = arms[1]:clone() local mesh1 = Tool.Larm:clone() mesh1.Parent = falsearm1 local armweld1 = Instance.new("Weld") falsearm1.BrickColor = BrickColor.new("Light orange") -- this is the arm colour incase u want to change it falsearm1.Parent = Tool armweld1.Parent = falsearm1 armweld1.Part0 = falsearm1 armweld1.Part1 = arms[1] falsearm2 = arms[2]:clone() local mesh2 = Tool.Rarm:clone() mesh2.Parent = falsearm2 local armweld2 = Instance.new("Weld") falsearm2.BrickColor = BrickColor.new("Light orange") -- this is the 2nd arm colour incase u want to change it falsearm2.Parent = Tool armweld2.Parent = falsearm2 armweld2.Part0 = falsearm2 armweld2.Part1 = arms[2] local weld1 = Instance.new("Weld") -- left arm weld55 = weld1 weld1.Part0 = torso weld1.Parent = torso weld1.Part1 = arms[1] weld1.C1 = CFrame.new(-0.35, 2, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(295), 0, math.rad(-90)) welds[1] = weld1 local weld2 = Instance.new("Weld") -- right arm weld33 = weld2 weld2.Part0 = torso weld2.Parent = torso weld2.Part1 = arms[2] weld2.C1 = CFrame.new(-0.75, -1.2, 0.35) * CFrame.fromEulerAnglesXYZ(math.rad(-70), math.rad(-35), 0) welds[2] = weld2 end else print("sh") end else print("arms") end end function Unequip(mouse) Gui:Remove() if arms ~= nil and torso ~= nil then local sh = {torso:FindFirstChild("Left Shoulder"), torso:FindFirstChild("Right Shoulder")} if sh ~= nil then local yes = true if yes then yes = false sh[1].Part1 = arms[1] sh[2].Part1 = arms[2] welds[1].Parent = nil welds[2].Parent = nil falsearm1:remove() falsearm2:remove() end else print("sh") end else print("arms") end end colors = {199} local pellet = Instance.new("Part") pellet.Name = "Bullet" pellet.Shape = 1 pellet.formFactor = 3 pellet.BrickColor = BrickColor.new(24) pellet.Size = Vector3.new(.2,.2,.2) pellet.Locked = true Tool.Equipped:connect(function(mouse) function Shelling() local ammo = script.Parent.Ammo if ammo.Value == 12 then Tool.S12.Transparency = 1 end if ammo.Value == 11 then Tool.S11.Transparency = 1 Tool.S12.Transparency = 1 end if ammo.Value == 10 then Tool.S10.Transparency = 1 Tool.S11.Transparency = 1 Tool.S12.Transparency = 1 end if ammo.Value == 9 then Tool.S9.Transparency = 1 Tool.S10.Transparency = 1 Tool.S11.Transparency = 1 Tool.S12.Transparency = 1 end if ammo.Value == 8 then Tool.S8.Transparency = 1 Tool.S9.Transparency = 1 Tool.S10.Transparency = 1 Tool.S11.Transparency = 1 Tool.S12.Transparency = 1 end if ammo.Value == 7 then Tool.S7.Transparency = 1 Tool.S8.Transparency = 1 Tool.S9.Transparency = 1 Tool.S10.Transparency = 1 Tool.S11.Transparency = 1 Tool.S12.Transparency = 1 end if ammo.Value == 6 then Tool.S6.Transparency = 1 Tool.S7.Transparency = 1 Tool.S8.Transparency = 1 Tool.S9.Transparency = 1 Tool.S10.Transparency = 1 Tool.S11.Transparency = 1 Tool.S12.Transparency = 1 end if ammo.Value == 5 then Tool.S5.Transparency = 1 Tool.S6.Transparency = 1 Tool.S7.Transparency = 1 Tool.S8.Transparency = 1 Tool.S9.Transparency = 1 Tool.S10.Transparency = 1 Tool.S11.Transparency = 1 Tool.S12.Transparency = 1 end if ammo.Value == 4 then Tool.S4.Transparency = 1 Tool.S5.Transparency = 1 Tool.S6.Transparency = 1 Tool.S7.Transparency = 1 Tool.S8.Transparency = 1 Tool.S9.Transparency = 1 Tool.S10.Transparency = 1 Tool.S11.Transparency = 1 Tool.S12.Transparency = 1 end if ammo.Value == 3 then Tool.S3.Transparency = 1 Tool.S4.Transparency = 1 Tool.S5.Transparency = 1 Tool.S6.Transparency = 1 Tool.S7.Transparency = 1 Tool.S8.Transparency = 1 Tool.S9.Transparency = 1 Tool.S10.Transparency = 1 Tool.S11.Transparency = 1 Tool.S12.Transparency = 1 end if ammo.Value == 2 then Tool.S2.Transparency = 1 Tool.S3.Transparency = 1 Tool.S4.Transparency = 1 Tool.S5.Transparency = 1 Tool.S6.Transparency = 1 Tool.S7.Transparency = 1 Tool.S8.Transparency = 1 Tool.S9.Transparency = 1 Tool.S10.Transparency = 1 Tool.S11.Transparency = 1 Tool.S12.Transparency = 1 end if ammo.Value == 1 then Tool.S1.Transparency = 1 Tool.S2.Transparency = 1 Tool.S3.Transparency = 1 Tool.S4.Transparency = 1 Tool.S5.Transparency = 1 Tool.S6.Transparency = 1 Tool.S7.Transparency = 1 Tool.S8.Transparency = 1 Tool.S9.Transparency = 1 Tool.S10.Transparency = 1 Tool.S11.Transparency = 1 Tool.S12.Transparency = 1 end end function fire(v) if enabled == true then Spin = Spin + 1 if Spin < 40 then Heat = Heat + 0.2 return else end if Spin >= 45 then Spin = 45 end Heat = Heat + 2 firing = true local ammo = script.Parent.Ammo if ammo.Value >= 1 then ammo.Value = ammo.Value - 1 script.Fire:Play() local vCharacter = Tool.Parent local vPlayer = game.Players:playerFromCharacter(vCharacter) local missile = Instance.new("Part") local spawnPos = vCharacter.PrimaryPart.Position spawnPos = spawnPos + (v * 8) missile.Position = spawnPos missile.Size = Vector3.new(1,1,1) missile.Velocity = v * 500 missile.BrickColor = BrickColor.new(24) missile.Shape = 0 missile.BottomSurface = 0 missile.TopSurface = 0 missile.Name = "Bullet" missile.Elasticity = 0 missile.Reflectance = .3 missile.Friction = .9 missile.CanCollide = false local force = Instance.new("BodyForce") force.force = Vector3.new(math.random(-5, 5),math.random(95, 105),math.random(-5, 5)) force.Parent = missile local mesh = Instance.new("SpecialMesh") mesh.Scale = Vector3.new(.1,.1,.1) mesh.MeshType = "Sphere" mesh.Parent = missile local new_script = script.Parent.Bullet:clone() new_script.Disabled = false new_script.Parent = missile local creator_tag = Instance.new("ObjectValue") creator_tag.Value = vPlayer creator_tag.Name = "creator" creator_tag.Parent = missile missile.Parent = game.Workspace cam = game.Workspace.CurrentCamera local cam_rot = cam.CoordinateFrame - cam.CoordinateFrame.p local cam_scroll = (cam.CoordinateFrame.p - cam.Focus.p).magnitude local ncf = CFrame.new(cam.Focus.p)*cam_rot*CFrame.fromEulerAnglesXYZ(0.01, 0, 0) cam.CoordinateFrame = ncf*CFrame.new(0, 0, cam_scroll) Tool.Flash.Transparency = .5 Tool.Flash.Smoke.Enabled = true wait() Tool.Flash.Transparency = 1 Tool.Flash.Smoke.Enabled = false Shelling() elseif ammo.Value == 0 then Reload() end elseif enabled == false then end end end) function KeyDownFunctions(key) if key == "r" then Reload() end end function computeDirection(pos) local invrtDir = 1 / math.sqrt((pos.magnitude * pos.magnitude)) local dir = Vector3.new(pos.x * invrtDir, pos.y * invrtDir, pos.z * invrtDir) return dir end function check(en) if not Tool.Enabled then return false end if Tool.Enabled then return true end if not enabled then return false end if enabled then return true end end function onActivated() if (not Tool.Enabled) or (not enabled) then return end --Tool.Enabled = false local character = Tool.Parent; local humanoid = character.Humanoid if humanoid == nil or humanoid.Health <= 0 then Tool:Remove() return end local targetPos = humanoid.TargetPoint local lookAt = (targetPos - character.Head.Position).unit if (check()) then end fire(lookAt) wait() onActivated() return --Tool.Enabled = true end function onButton1Up(mouse) firing = false enabled = false Tool.Enabled = false wait(.2) firing = false enabled = true Tool.Enabled = true end function onEquippedLocal(mouse) if mouse == nil then print("Mouse not found") return end mouse.Button1Down:connect(function() onButton1Down(mouse) end) mouse.Button1Up:connect(function() onButton1Up(mouse)end) mouse.KeyDown:connect(KeyDownFunctions) end function onEquippedLocal2(mouse) wait(.2) while Mouse == true do Spin = Spin - .5 if not firing then Heat = Heat - .75 end mouse.Icon = "http://www.roblox.com/asset/?id=45003129"
-- Denotes children instances in an instance or component's property table.
export type ChildrenKey = Symbol & { -- name: "Children" (add this when Luau supports singleton types) }
--function onSelected(mouse)
print("1") mouse.Icon = "rbxasset://textures\\GunCursor.png" print("1") mouse.KeyDown:connect(onKeyDown) print("1") end print("1") function onKeyDown(key) if (key~=nil) then key = key:lower() local blade = script.Parent.Handle2 if (key=="z") then blade.Transparency = 0.5 blade.Sound:Play() end if (key=="x") then blade.Transparency = 1 blade.Sound:Play() end end end Tool.Equipped:connect(onEquippedLocal)
-- Denotes event handlers in an instance's property table.
export type OnEventKey = Symbol & { -- name: "OnEvent" (add this when Luau supports singleton types) key: string }
--------END AUDIENCE BACK RIGHT--------
game.Workspace.rightpalette.l15.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.rightpalette.l25.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.rightpalette.l16.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.rightpalette.l26.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorleft.l11.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorleft.l23.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorleft.l32.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorleft.l41.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorleft.l53.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorleft.l62.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorleft.l71.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorleft.l12.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorleft.l21.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorleft.l33.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorleft.l42.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorleft.l51.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorleft.l63.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorleft.l72.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorleft.l13.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorleft.l22.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorleft.l31.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorleft.l43.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorleft.l52.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorleft.l61.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorleft.l73.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorright.l11.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorright.l23.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorright.l32.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorright.l41.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorright.l53.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorright.l62.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorright.l71.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorright.l12.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorright.l21.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorright.l33.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorright.l42.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorright.l51.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorright.l63.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorright.l72.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorright.l13.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorright.l22.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorright.l31.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorright.l43.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorright.l52.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorright.l61.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorright.l73.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorleft.pillar.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorright.pillar.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.audiencebackleft1.Part1.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.audiencebackleft1.Part2.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.audiencebackleft1.Part3.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.audiencebackleft1.Part4.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.audiencebackleft1.Part5.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.audiencebackleft1.Part6.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.audiencebackleft1.Part7.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.audiencebackleft1.Part8.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.audiencebackleft1.Part9.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.audiencebackright1.Part1.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.audiencebackright1.Part2.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.audiencebackright1.Part3.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.audiencebackright1.Part4.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.audiencebackright1.Part5.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.audiencebackright1.Part6.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.audiencebackright1.Part7.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.audiencebackright1.Part8.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.audiencebackright1.Part9.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.Lighting.flashcurrent.Value = "0" game.Workspace.sidesquares.l11.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.sidesquares.l12.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.sidesquares.l13.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.sidesquares.l14.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.sidesquares.l15.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.sidesquares.l21.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.sidesquares.l23.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.sidesquares.l24.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.sidesquares.l25.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.sidesquares.l31.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.sidesquares.l33.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.sidesquares.l34.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.sidesquares.l35.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.rightpalette.l11.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.rightpalette.l12.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.rightpalette.l21.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.rightpalette.l22.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.rightpalette.l13.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.rightpalette.l23.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.rightpalette.l14.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.rightpalette.l24.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.rightpalette.l15.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.rightpalette.l25.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.rightpalette.l16.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.rightpalette.l26.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) end end script.Parent.ClickDetector.MouseClick:connect(onClicked)
--If necessary change the last word to:
--Signal1 --Signal1a --Signal2 --Signal2a --TurnSignal1 --TurnSignal1a --TurnSignal2 --TurnSignal2a
--[[ Gets the Context object for the current node. ]]
function TestSession:getContext() assert(#self.contextStack > 0, "Tried to get context from an empty stack!") return self.contextStack[#self.contextStack] end function TestSession:getExpectationContext() assert(#self.expectationContextStack > 0, "Tried to get expectationContext from an empty stack!") return self.expectationContextStack[#self.expectationContextStack] end
--------END SIDE SQUARES--------
game.Workspace.audiencebackleft1.Part1.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.audiencebackleft1.Part2.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.audiencebackleft1.Part3.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.audiencebackleft1.Part4.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.audiencebackleft1.Part5.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.audiencebackleft1.Part6.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.audiencebackleft1.Part7.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.audiencebackleft1.Part8.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.audiencebackleft1.Part9.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.audiencebackright1.Part1.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.audiencebackright1.Part2.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.audiencebackright1.Part3.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.audiencebackright1.Part4.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.audiencebackright1.Part5.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.audiencebackright1.Part6.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.audiencebackright1.Part7.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.audiencebackright1.Part8.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.audiencebackright1.Part9.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.post1.Light.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.post2.Light.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) if game.Workspace.DoorFlashing.Value == false then game.Workspace.DoorColored.Value = false
--What happens with DepositBox1--
depositpr1.Triggered:Connect(function(plr) if plr.Character:FindFirstChild("Drill",yeeld) then driLL1.Transparency = 0 drilling1.Playing = true drillingeffect1.Enabled = true driLL1.CanCollide = true wait(timetodrill) driLL1.CanCollide = false drilling1.Playing = false drillingeffect1.Enabled = false driLL1.Transparency = 1 explosionvault1.Enabled = true explosionvaultsfx1.Playing = true wait(1) explosionvault1.Enabled = false depositpr1.Parent.Parent.Transparency = 1 depositpr1.Parent.Parent.CanCollide = false depositpr1.Enabled = false wait(resetcooldown) depositpr1.Parent.Parent.Transparency = 0 depositpr1.Parent.Parent.CanCollide = true depositpr1.Enabled = true end end)
-- Preload animations
function playAnimation(animName, transitionTime, humanoid) local idleFromEmote = (animName == "idle" and emoteNames[currentAnim] ~= nil) if (animName ~= currentAnim and not idleFromEmote) then if (currentAnimTrack ~= nil) then currentAnimTrack:Stop(transitionTime) currentAnimTrack:Destroy() end currentAnimSpeed = 1.0 local roll = math.random(1, animTable[animName].totalWeight) local origRoll = roll local idx = 1 while (roll > animTable[animName][idx].weight) do roll = roll - animTable[animName][idx].weight idx = idx + 1 end
--[[** Gets an array of the given player's groups. @param [Instance<Player>] Player The player you are checking for. Can also be their UserID. @returns [Array] All of the groups the player is in. **--]]
function GroupService:GetGroupsAsync(Player) local UserId = (typeof(Player) == "Instance" and Player:IsA("Player")) and Player.UserId or type(Player) == "number" and Player local Success, Groups = pcall(RbxGroupService.GetGroupsAsync, RbxGroupService, UserId) return Success and Groups or {} end
------------Horn
model = script.Parent wait(0.5) currentP = "Off" script.Parent.Events.Horn.OnServerEvent:Connect( function(player, pattern) if script.Parent.Values.Horn.Value == true then script.Parent.Values.Horn.Value = false else script.Parent.Values.Horn.Value = true end end)
-- ROBLOX deviation: this is a built-in flow type, and very complex. we fudge this with `any` -- type ElementRef< -- C extends keyof JSX.IntrinsicElements -- | React.ForwardRefExoticComponent<any> -- | (new (props: any) -> React.Component<any, {}, any>) -- | ((props: any, context?: any) -> ReactElement | null) -- > = "ref" extends keyof ComponentPropsWithRef<C> -- ? NonNullable<ComponentPropsWithRef<C>["ref"]> extends Ref<infer Instance> -- ? Instance -- : never -- : never
--------------------) Settings
Damage = 0 -- the ammout of health the player or mob will take Cooldown = 1 -- cooldown for use of the tool again ZoneModelName = "Nightmare spin tentacle" -- name the zone model MobHumanoidName = "Humanoid"-- the name of player or mob u want to damage
--------------------[ FIRING FUNCTIONS ]----------------------------------------------
function Fire_Gun() local FireSound = Main:FindFirstChild("FireSound") local FlashGui = Main:FindFirstChild("ParticleFX") local FlashFX = Main:FindFirstChild("FlashFX") if FireSound then FireSound:Play() end local MockSpread = ( ((not Aimed) and CurrentSpread <= S.Spread.Max and Idleing) and CurrentSpread * S.Spread.Multiplier or CurrentSpread ) CurrentSpread = (MockSpread >= S.Spread.Max and S.Spread.Max or MockSpread) ---------------------------------------------------------------------------------- for _ = 1, (S.GunType.Shot and S.ShotAmount or 1) do local BSpread = CFANG( RAD(RAND(-CurrentSpread, CurrentSpread) / 20), RAD(RAND(-CurrentSpread, CurrentSpread) / 20), RAD(RAND(-CurrentSpread, CurrentSpread) / 20) ) local OriginCF = (Aimed and (S.GuiScope and Head.CFrame or Handle.CFrame) or Head.CFrame) local OriginPos = Main.CFrame.p local Direction = (CF(OriginCF.p, OriginCF.p + OriginCF.lookVector) * BSpread).lookVector if S.InstantHit then local HitObj, HitPos = AdvRayCast(Main.CFrame.p, Direction, S.BulletRange) local HitHumanoid = nil if HitObj then if S.GunType.Explosive then if S.ExplosionSound ~= "" then local SoundPart = Instance.new("Part") SoundPart.Transparency = 1 SoundPart.Anchored = true SoundPart.CanCollide = false SoundPart.CFrame = CFrame.new(HitPos) SoundPart.Parent = game.Workspace local Sound = Instance.new("Sound") Sound.Pitch = S.ExplosionSoundPitch Sound.SoundId = S.ExplosionSound Sound.Volume = S.ExplosionSoundVolume Sound.Parent = SoundPart Sound:Play() delay(1 / 20, function() SoundPart:Destroy() end) end CreateBulletHole(HitPos, HitObj) CreateShockwave(HitPos, S.ExplosionRadius) local E = Instance.new("Explosion") E.BlastPressure = S.ExplosionPressure E.BlastRadius = S.ExplosionRadius E.DestroyJointRadiusPercent = (S.RangeBasedDamage and 0 or 1) E.ExplosionType = S.ExplosionType E.Position = HitPos E.Hit:connect(function(HObj, HDist) if HObj.Name == "Torso" and (not HObj:IsDescendantOf(Character)) then if S.RangeBasedDamage then local Dir = (HObj.Position - HitPos).unit local H, P = AdvRayCast(HitPos - Dir, Dir, 999) local RayHitHuman = H:IsDescendantOf(HObj.Parent) if (S.RayCastExplosions and RayHitHuman) or (not S.RayCastExplosions) then local HitHumanoid = FindFirstClass(HObj.Parent, "Humanoid") if HitHumanoid and HitHumanoid.Health > 0 and IsEnemy(HitHumanoid) then local DistFactor = HDist / S.ExplosionRadius local DistInvert = math.max(1 - DistFactor,0) local NewDamage = DistInvert * S.Damage local CreatorTag = Instance.new("ObjectValue") CreatorTag.Value = Player CreatorTag.Name = "creator" CreatorTag.Parent = HitHumanoid HitHumanoid:TakeDamage(NewDamage) MarkHit() end end else local HitHumanoid = FindFirstClass(HObj.Parent, "Humanoid") if HitHumanoid and HitHumanoid.Health > 0 and IsEnemy(HitHumanoid) then local CreatorTag = Instance.new("ObjectValue") CreatorTag.Value = Player CreatorTag.Name = "creator" CreatorTag.Parent = HitHumanoid MarkHit() end end end end) E.Parent = game.Workspace else HitHumanoid = Damage(HitObj, HitPos) end end local FinalHitPos = HitPos if S.Penetration > 0 and (not S.GunType.Explosive) then FinalHitPos = PenetrateWall(HitPos, Direction, HitHumanoid, OriginPos) end if S.BulletTrail and S.TrailTransparency ~= 1 then local Trail = Instance.new("Part") Trail.BrickColor = S.TrailColor Trail.Transparency = S.TrailTransparency Trail.Anchored = true Trail.CanCollide = false Trail.Size = VEC3(1, 1, 1) local Mesh = Instance.new("BlockMesh") Mesh.Offset = VEC3(0, 0, -(FinalHitPos - OriginPos).magnitude / 2) Mesh.Scale = VEC3(S.TrailThickness, S.TrailThickness, (FinalHitPos - OriginPos).magnitude) Mesh.Parent = Trail Trail.Parent = Gun_Ignore Trail.CFrame = CF(OriginPos, FinalHitPos) delay(S.TrailVisibleTime, function() if S.TrailDisappearTime > 0 then local X = 0 while true do if X == 90 then break end if (not Selected) then break end local NewX = X + (1.5 / S.TrailDisappearTime) X = (NewX > 90 and 90 or NewX) local Alpha = X / 90 Trail.Transparency = NumLerp(S.TrailTransparency, 1, Alpha) RS:wait() end Trail:Destroy() else Trail:Destroy() end end) end else local Bullet = CreateBullet(Direction) local LastPos = Main.CFrame.p local TotalDistTraveled = 0 local HitHumanoid = nil spawn(function() while true do RS:wait() if TotalDistTraveled >= S.BulletRange then Bullet:Destroy() break end local DistTraveled = (Bullet.Position - LastPos).magnitude local HitObj, HitPos = AdvRayCast(LastPos, (Bullet.Position - LastPos).unit, DistTraveled) if HitObj then if S.GunType.Explosive then if S.ExplosionSound ~= "" then local Sound = Instance.new("Sound") Sound.Pitch = S.ExplosionSoundPitch Sound.SoundId = S.ExplosionSound Sound.Volume = S.ExplosionSoundVolume Sound.Parent = Bullet Sound:Play() end CreateBulletHole(HitPos, HitObj) CreateShockwave(HitPos, S.ExplosionRadius) local E = Instance.new("Explosion") E.BlastPressure = S.ExplosionPressure E.BlastRadius = S.ExplosionRadius E.DestroyJointRadiusPercent = (S.RangeBasedDamage and 0 or 1) E.ExplosionType = S.ExplosionType E.Position = HitPos E.Hit:connect(function(HObj, HDist) if HObj.Name == "Torso" and (not HObj:IsDescendantOf(Character)) then if S.RangeBasedDamage then local Dir = (HObj.Position - HitPos).unit local H, P = AdvRayCast(HitPos - Dir, Dir, 999) local RayHitHuman = H:IsDescendantOf(HObj.Parent) if (S.RayCastExplosions and RayHitHuman) or (not S.RayCastExplosions) then local HitHumanoid = FindFirstClass(HObj.Parent, "Humanoid") if HitHumanoid and HitHumanoid.Health > 0 and IsEnemy(HitHumanoid) then local DistFactor = HDist / S.ExplosionRadius local DistInvert = math.max(1 - DistFactor,0) local NewDamage = DistInvert * S.Damage local CreatorTag = Instance.new("ObjectValue") CreatorTag.Value = Player CreatorTag.Name = "creator" CreatorTag.Parent = HitHumanoid HitHumanoid:TakeDamage(NewDamage) MarkHit() end end else local HitHumanoid = FindFirstClass(HObj.Parent, "Humanoid") if HitHumanoid and HitHumanoid.Health > 0 and IsEnemy(HitHumanoid) then local CreatorTag = Instance.new("ObjectValue") CreatorTag.Value = Player CreatorTag.Name = "creator" CreatorTag.Parent = HitHumanoid MarkHit() end end end end) E.Parent = game.Workspace else HitHumanoid = Damage(HitObj, HitPos) end if S.Penetration > 0 and (not S.GunType.Explosive) then PenetrateWall(HitPos, (Bullet.Position - LastPos).unit, HitHumanoid, OriginPos, Bullet) else Bullet:Destroy() end break else LastPos = Bullet.Position TotalDistTraveled = TotalDistTraveled + DistTraveled end end end) if S.BulletTrail and S.TrailTransparency ~= 1 then spawn(function() local LastPos2 = nil while true do if LastPos2 then if (not Bullet:IsDescendantOf(game)) then break end Bullet.CFrame = CFrame.new(Bullet.CFrame.p, Bullet.CFrame.p + Bullet.Velocity) local Trail = Instance.new("Part") Trail.BrickColor = S.TrailColor Trail.Transparency = S.TrailTransparency Trail.Anchored = true Trail.CanCollide = false Trail.Size = VEC3(1, 1, 1) local Mesh = Instance.new("BlockMesh") Mesh.Offset = VEC3(0, 0, -(Bullet.Position - LastPos2).magnitude / 2) Mesh.Scale = VEC3(S.TrailThickness, S.TrailThickness, (Bullet.Position - LastPos2).magnitude) Mesh.Parent = Trail Trail.Parent = Gun_Ignore Trail.CFrame = CF(LastPos2, Bullet.Position) delay(S.TrailVisibleTime, function() if S.TrailDisappearTime > 0 then local X = 0 while true do if X == 90 then break end if (not Selected) then break end local NewX = X + (1.5 / S.TrailDisappearTime) X = (NewX > 90 and 90 or NewX) local Alpha = X / 90 Trail.Transparency = NumLerp(S.TrailTransparency, 1, Alpha) RS:wait() end Trail:Destroy() else Trail:Destroy() end end) LastPos2 = Bullet.Position else LastPos2 = Main.CFrame.p end RS:wait() end end) end end end ---------------------------------------------------------------------------------- local RecoilX = RAD(CurrentRecoil * RAND(1, 1.5, 0.1)) * StanceSway local RecoilY = RAD(CurrentRecoil * RAND(-2, 2, 0.1)) * StanceSway RotCamera(RecoilX, RecoilY, true, 0.06) delay(0.05, function() RotCamera(-RecoilX / 5, -RecoilY / 5, true, 0.1) end) if Idleing and (not Walking) and (not Aimed) then local SpreadScale = (CurrentSpread / S.Spread.Max) * 50 Gui_Clone.CrossHair.Box:TweenSizeAndPosition( UDim2.new(0, 70 + 2 * SpreadScale, 0, 70 + 2 * SpreadScale), UDim2.new(0, -35 - SpreadScale, 0, -35 - SpreadScale), "Out", "Linear", 0.1, true ) end local KickSide = ( ( { CurrentRecoil * (RAND(1, 5, 1) / 150); CurrentRecoil * (RAND(1, 5, 1) / -150) } )[math.random(1, 2)] ) * StanceSway local KickBack = CurrentRecoil * StanceSway * 0.3 local KickUp = RAD(90 + (CurrentRecoil * RAND(1.3, 1.4, 0.01) * StanceSway)) TweenJoint(AnimWeld, CF(KickSide, 1, -KickBack), CFANG(KickUp - RAD(90), 0, 0), Linear, 1 / 12) if FlashFX then FlashFX.Enabled = true Gun.A1.Mesh.Offset = Vector3.new(0, -.4, 0) Gun.A2.Mesh.Offset = Vector3.new(0, 0, -.4) Gun.Bolt.Transparency = 1 Gun.BoltBack.Transparency = 0 Gun.Main.FX.Enabled = true end if FlashGui then FlashGui.Enabled = true FlashGui.Label.Rotation = RAND(0, 360) end delay(1 / 30, function() if Idleing and (not Walking) and (not Aimed) then Gui_Clone.CrossHair.Box:TweenSizeAndPosition( UDim2.new(0, 70, 0, 70), UDim2.new(0, -35, 0, -35), "Out", "Linear", S.AimSpeed, (not Aimed) ) end if (not Aiming) and (not RunTween) then TweenJoint(AnimWeld, CF(0, 1, 0), CF(), Linear, 0.15) end if FlashFX then FlashFX.Enabled = false end if FlashGui then FlashGui.Enabled = false end Gun.A1.Mesh.Offset = Vector3.new(0, 0, 0) Gun.A2.Mesh.Offset = Vector3.new(0, 0, 0) Gun.Bolt.Transparency = 0 Gun.BoltBack.Transparency = 1 Gun.Main.FX.Enabled = false local shell = Instance.new("Part") shell.CFrame = Gun.Chamber.CFrame * CFrame.fromEulerAnglesXYZ(-1.5,0,0) shell.Size = Vector3.new(1,1,1) shell.BrickColor = BrickColor.new(24) shell.Reflectance = .5 shell.CanCollide = false shell.BottomSurface = 0 shell.TopSurface = 0 shell.Name = "Shell" shell.Velocity = Gun.Chamber.CFrame.lookVector * 30 + Vector3.new(math.random(-10,10),20,math.random(-10,10)) shell.RotVelocity = Vector3.new(0,200,0) local shellmesh = Instance.new("CylinderMesh") shellmesh.Scale = Vector3.new(0.1, 0.8, 0.1) shellmesh.Parent = shell shell.Parent = game.Workspace game:GetService("Debris"):addItem(shell,2) local shellmesh = Instance.new("SpecialMesh") shellmesh.Scale = Vector3.new(0.9,0.9,3) shellmesh.MeshId = "http://www.roblox.com/asset/?id=95387759" shellmesh.TextureId = "http://www.roblox.com/asset/?id=95387789" shellmesh.MeshType = "FileMesh" shellmesh.Parent = shell end) end function MarkHit() spawn(function() if Gui_Clone:IsDescendantOf(game) then Gui_Clone.HitMarker.Visible = true local StartMark = tick() LastMark = StartMark wait(0.5) if LastMark <= StartMark then Gui_Clone.HitMarker.Visible = false end end end) end
-- Fonction pour déplacer MovingPart vers Projection
local function moveTowardsProjection() local startPosition = movingPart.Position local endPosition = nil if isAtEnd == false then local endPosition = projection.Position else local endPosition = projection2.Position end local distance = (endPosition - startPosition).Magnitude isAtEnd = not isAtEnd -- Créer une interpolation Tween pour déplacer MovingPart vers Projection local tweenInfo = TweenInfo.new(distance / moveSpeed, Enum.EasingStyle.Linear) local tween = TweenService:Create(movingPart, tweenInfo, {Position = endPosition}) -- Démarrer l'animation tween:Play() end
--[[ local warn = function(...) warn(...) end ]]
local cPcall = function(func, ...) local ran, err = pcall(coroutine.resume, coroutine.create(func), ...) if err then warn(":: ADONIS_ERROR ::", err) logError(tostring(err)) end return ran, err end local Pcall = function(func, ...) local ran, err = pcall(func, ...) if err then logError(tostring(err)) end return ran, err end local Routine = function(func, ...) return coroutine.resume(coroutine.create(func), ...) end local Immutable = function(...) local mut = coroutine.wrap(function(...) while true do coroutine.yield(...) end end) mut(...) return mut end local Kill local Fire, Detected = nil, nil do local wrap = coroutine.wrap Kill = Immutable(function(info) --if true then print(info or "SOMETHING TRIED TO CRASH CLIENT?") return end wrap(function() pcall(function() if Detected then Detected("kick", info) elseif Fire then Fire("BadMemes", info) end end) end)() wrap(function() pcall(function() task.wait(1) service.Player:Kick(info) end) end)() wrap(function() pcall(function() task.wait(5) while true do pcall(task.spawn, function() task.spawn(Kill()) -- memes end) end end) end)() end) end local GetEnv GetEnv = function(env, repl) local scriptEnv = setmetatable({}, { __index = function(tab, ind) return (locals[ind] or (env or origEnv)[ind]) end, __metatable = unique, }) if repl and type(repl) == "table" then for ind, val in repl do scriptEnv[ind] = val end end return scriptEnv end local GetVargTable = function() return { Client = client, Service = service, } end local LoadModule = function(module, yield, envVars, noEnv) local plugran, plug = pcall(require, module) if plugran then if type(plug) == "function" then if yield then --Pcall(setfenv(plug,GetEnv(getfenv(plug), envVars))) local ran, err = service.TrackTask( "Plugin: " .. tostring(module), (noEnv and plug) or setfenv(plug, GetEnv(getfenv(plug), envVars)), GetVargTable(), GetEnv ) if not ran then warn("Module encountered an error while loading: " .. tostring(module)) warn(tostring(err)) end else --service.Threads.RunTask("PLUGIN: "..tostring(module),setfenv(plug,GetEnv(getfenv(plug), envVars))) local ran, err = service.TrackTask( "Thread: Plugin: " .. tostring(module), (noEnv and plug) or setfenv(plug, GetEnv(getfenv(plug), envVars)), GetVargTable(), GetEnv ) if not ran then warn("Module encountered an error while loading: " .. tostring(module)) warn(tostring(err)) end end else client[module.Name] = plug end else warn("Error while loading client module", module, plug) end end log("Client setmetatable") client = setmetatable({ Handlers = {}, Modules = {}, Service = service, Module = script, Print = print, Warn = warn, Deps = {}, Pcall = Pcall, cPcall = cPcall, Routine = Routine, OldPrint = oldPrint, LogError = logError, TestEvent = Instance.new("RemoteEvent"), Disconnect = function(info) service.Player:Kick(info or "Disconnected from server") --wait(30) --client.Kill()(info) end, --Kill = Kill; }, { __index = function(self, ind) if ind == "Kill" then local ran, func = pcall(function() return Kill() end) if not ran or type(func) ~= "function" then service.Players.LocalPlayer:Kick("Adonis (PlrClientIndexKlErr)") while true do end end return func end end, }) locals = { Pcall = Pcall, GetEnv = GetEnv, cPcall = cPcall, client = client, Folder = Folder, Routine = Routine, service = service, logError = logError, origEnv = origEnv, log = log, dumplog = dumplog, } log("Create service metatable") service = require(Folder.Shared.Service)(function(eType, msg, desc, ...) --warn(eType, msg, desc, ...) local extra = { ... } if eType == "MethodError" then --Kill()("Shananigans denied") --player:Kick("Method error") --service.Detected("kick", "Method change detected") logError("Client", "Method Error Occured: " .. tostring(msg)) elseif eType == "ServerError" then logError("Client", tostring(msg)) elseif eType == "ReadError" then --message("===== READ ERROR:::::::") --message(tostring(msg)) --message(tostring(desc)) --message(" ") Kill()(tostring(msg)) --if Detected then -- Detected("log", tostring(msg)) --end end end, function(c, parent, tab) if not isModule(c) and c ~= script and c ~= Folder and parent == nil then tab.UnHook() end end, ServiceSpecific, GetEnv(nil, { client = client }))
-- Get the data store with key "Leaderboard"
wait(10) while true do -- загрузка данных по игрокам for i,plr in pairs(game.Players:GetChildren()) do--Loop through players if plr.UserId>0 then--Prevent errors DonateStore = DataStore2(DataParam, plr) -- создаём ссылку на хранилище денег и т.д. и т.п. local w=DonateStore:Get(0) -- значение по умолчанию 0 --print("1",w) if w then -- достаём из глобального значение local w1=0 local success, err = pcall(function() w1 = dataStore:GetAsync(plr.UserId) or 0 end) -- print( w,"----",w1) if success then -- если глобальное больше (базу меняли), то сохраняем его if w1 > w then w=w1 DonateStore:Set(w) end end --print("2",w) pcall(function() --Wrap in a pcall so if Roblox is down, it won't error and break. dataStore:UpdateAsync(plr.UserId,function(w) w=DonateStore:Get(0) --Set new value --print("3",w) return tonumber(w) -- !!!!!!!!! возвращаемое значение!!! end) end) end end end -- получение данных local smallestFirst = false--false = 2 before 1, true = 1 before 2 local numberToShow = 100--Any number between 1-100, how many will be shown local minValue = 1 --Any numbers lower than this will be excluded local maxValue = 10e30--(10^30), any numbers higher than this will be excluded local pages = dataStore:GetSortedAsync(smallestFirst, numberToShow, minValue, maxValue) --Get data local top = pages:GetCurrentPage()--Get the first page -- получение изображений игроков local data = {}--Store new data for a,b in ipairs(top) do--Loop through data local userid = b.key--User id local points = b.value--Points local username = "[Failed To Load]"--If it fails, we let them know local s,e = pcall(function() username = game.Players:GetNameFromUserIdAsync(userid)--Get username end) if not s then--Something went wrong warn("Error getting name for "..userid..". Error: "..e) end local image = game.Players:GetUserThumbnailAsync(userid, Enum.ThumbnailType.HeadShot, Enum.ThumbnailSize.Size150x150) --Make a image of them table.insert(data,{username,points,image})--Put new data in new table end -- отображение данных ui.Parent = script sf:ClearAllChildren()--Remove old frames ui.Parent = sf for number,d in pairs(data) do--Loop through our new data local name = d[1] local val = d[2] local image = d[3] local color = Color3.new(1,1,1)--Default color if number == 1 then color = Color3.new(1,1,0)--1st place color elseif number == 2 then color = Color3.new(0.9,0.9,0.9)--2nd place color elseif number == 3 then color = Color3.fromRGB(166, 112, 0)--3rd place color end local new = sample:Clone()--Make a clone of the sample frame new.Name = name--Set name for better recognition and debugging new.LayoutOrder = number--UIListLayout uses this to sort in the correct order new.Image.Image = image--Set the image new.Image.Place.Text = number--Set the place new.Image.Place.TextColor3 = color--Set the place color (Gold = 1st) new.PName.Text = name--Set the username new.Value.Text = val--Set the amount of points new.Value.TextColor3 = color--Set the place color (Gold = 1st) new.PName.TextColor3 = color--Set the place color (Gold = 1st) new.Parent = sf--Parent to scrolling frame end wait() sf.CanvasSize = UDim2.new(0,0,0,ui.AbsoluteContentSize.Y) --Give enough room for the frames to sit in wait(100) -- 120 - раз в 2 минуты end
-- Gets a timer from RoundManager and then displays it's value for players
function DisplayManager.trackTimer(myTimer) local thread = coroutine.create(function() while myTimer:isRunning() do -- Reminder: Adding +1 makes sure the timer display ends at 1 instead of 0. timeLeft.Value = (math.floor(myTimer:getTimeLeft() + 1)) wait(1) end end) coroutine.resume(thread) end return DisplayManager
--[[ ___ _______ _ / _ |____/ ___/ / ___ ____ ___ (_)__ / __ /___/ /__/ _ \/ _ `(_-<(_-</ (_-< /_/ |_| \___/_//_/\_,_/___/___/_/___/ SecondLogic @ Inspare ]]
local autoscaling = false --Estimates top speed local UNITS = { --Click on speed to change units --First unit is default { units = "MPH" , scaling = (10/12) * (60/88) , -- 1 stud : 10 inches | ft/s to MPH maxSpeed = 200 , spInc = 20 , -- Increment between labelled notches }, { units = "KM/H" , scaling = (10/12) * 1.09728 , -- 1 stud : 10 inches | ft/s to KP/H maxSpeed = 260 , spInc = 20 , -- Increment between labelled notches }, { units = "SPS" , scaling = 1 , -- Roblox standard maxSpeed = 300 , spInc = 30 , -- Increment between labelled notches } }
--[[ --]]
script.Settings.Parent = game:GetService("ServerScriptService") if script.Parent.Name == "HD Admin Commands" then script.Parent:remove() else script:remove() end require(855371127)--[[ Hi there :) _ _ _____ _ _ _____ _ | | | | __ \ /\ | | (_) / ____| | | | |__| | | | | / \ __| |_ __ ___ _ _ __ | | ___ _ __ ___ _ __ ___ __ _ _ __ __| |___ | __ | | | | / /\ \ / _` | '_ ` _ \| | '_ \ | | / _ \| '_ ` _ \| '_ ` _ \ / _` | '_ \ / _` / __| | | | | |__| | / ____ | (_| | | | | | | | | | | | |___| (_) | | | | | | | | | | | (_| | | | | (_| \__ \ |_| |_|_____/ /_/ \_\__,_|_| |_| |_|_|_| |_| \_____\___/|_| |_| |_|_| |_| |_|\__,_|_| |_|\__,_|___/ Version 1.0 Notes: - Make sure not to change the name or parent of the Settings script - Make sure the model is in either Workspace, ServerStorage or ServerScriptService - Feel free to delete 'ThumbnailCamera' - I use this for the model's image - For any queries, suggestions or if you encounter any problems, please contact ForeverHD - Thanks for using, enjoy! ~ForeverHD --]]
--thank to Sinahi for making the beautiful flag! --https://www.roblox.com/Wavin-Flag-item?id=440874100
local rbx='rbxassetid://' local flagids={ 440821546,440821646,440821766,440822311, 440823132,440823493,440823602,440823734, 440823940,440824067,440824314,440824941, 440825077,440825340,440825848,440826132} --this is all the mesh ids in one table, in order local texture=227819766 --asset id here local flagmesh=script.Parent.Flag.Mesh flagmesh.TextureId=rbx..texture local n=1 repeat for i,v in next,flagids do wait() flagmesh.MeshId=rbx..v end n=n+1 if n>=#flagids then n=1 else end until nil
-- settings:
local STAT_NAME = "Stage" local PREVENT_SKIPPING = true local checkpoints = {} local i = 1 while true do local checkpoint = Workspace:FindFirstChild("Checkpoint " .. i, true) if not checkpoint then print("Last Checkpoint : " .. i-1) break end table.insert(checkpoints, checkpoint) i = i + 1 end game.Players.PlayerAdded:connect(function(player) local leaderstats = player:FindFirstChild("leaderstats") or Instance.new("Model", player) leaderstats.Name = "leaderstats" local checkpointStat = Instance.new("IntValue", leaderstats) checkpointStat.Name = STAT_NAME checkpointStat.Value = 1 player.CharacterAdded:connect(function(character) local goto = checkpoints[checkpointStat.Value] if goto then repeat wait() until character.Parent character:MoveTo(goto.Position) else warn("Checkpoint " .. checkpointStat.Value .. " not found") end end) end) for index, checkpoint in ipairs(checkpoints) do checkpoint.Touched:connect(function(hit) local player = game.Players:GetPlayerFromCharacter(hit.Parent) if not player then return end local humanoid = hit.Parent:FindFirstChild("Humanoid") if not humanoid or humanoid.Health <= 0 then return end local leaderstats = player:FindFirstChild("leaderstats") if not leaderstats then return end local checkpointStat = leaderstats:FindFirstChild(STAT_NAME) if not leaderstats then return end if (PREVENT_SKIPPING and checkpointStat.Value + 1 == index) or (not PREVENT_SKIPPING and checkpointStat.Value < index) then checkpointStat.Value = index end end) end
-- ==================== -- BASIC -- A basic settings for the gun -- ====================
Auto = true; MuzzleOffset = Vector3.new(0, 0.625, 1.25); BaseDamage = 24; FireRate = 0.1; --In second ReloadTime = 2; --In second AmmoPerClip = 25; --Put "math.huge" to make this gun has infinite ammo and never reload Spread = 1.25; --In degree HeadshotEnabled = true; --Enable the gun to do extra damage on headshot HeadshotDamageMultiplier = 4; MouseIconID = "316279304"; HitSoundIDs = {186809061,186809249,186809250,186809252}; IdleAnimationID = 94331086; --Set to "nil" if you don't want to animate IdleAnimationSpeed = 1; FireAnimationID = 94332152; --Set to "nil" if you don't want to animate FireAnimationSpeed = 6; ReloadAnimationID = nil; --Set to "nil" if you don't want to animate ReloadAnimationSpeed = 1;
-- ROBLOX deviation END
function VerboseReporter.new(globalConfig: Config_GlobalConfig): VerboseReporter local self = setmetatable((DefaultReporter.new(globalConfig) :: any) :: VerboseReporterPrivate, VerboseReporter) self._globalConfig = globalConfig return (self :: any) :: VerboseReporter end
-----------------------------------------------
function findAllFlagStands(root) local c = root:children() for i=1,#c do if (c[i].className == "Model" or c[i].className == "Part") then findAllFlagStands(c[i]) end if (c[i].className == "FlagStand") then table.insert(stands, c[i]) end end end function hookUpListeners() for i=1,#stands do stands[i].FlagCaptured:connect(onCaptureScored) end end function onPlayerEntered(newPlayer) if CTF_mode == true then local stats = Instance.new("IntValue") stats.Name = "leaderstats" local captures = Instance.new("IntValue") captures.Name = "Captures" captures.Value = 0 captures.Parent = stats -- VERY UGLY HACK -- Will this leak threads? -- Is the problem even what I think it is (player arrived before character)? while true do if newPlayer.Character ~= nil then break end wait(5) end stats.Parent = newPlayer else local stats = Instance.new("IntValue") stats.Name = "leaderstats" local kills = Instance.new("IntValue") kills.Name = "KOs" kills.Value = 0 local deaths = Instance.new("IntValue") deaths.Name = "Wipeouts" deaths.Value = 0 local cash = Instance.new("IntValue") cash.Name = "Cash" cash.Value = 0 local cashmoney = game.ServerStorage.MoneyStorage:FindFirstChild(newPlayer.Name) if cashmoney ~= nil then cashmoney.Changed:connect(function() cash.Value = cashmoney.Value end) end kills.Parent = stats deaths.Parent = stats cash.Parent = stats -- VERY UGLY HACK -- Will this leak threads? -- Is the problem even what I think it is (player arrived before character)? while true do if newPlayer.Character ~= nil then break end wait(5) end local humanoid = newPlayer.Character.Humanoid humanoid.Died:connect(function() onHumanoidDied(humanoid, newPlayer) end ) -- start to listen for new humanoid newPlayer.Changed:connect(function(property) onPlayerRespawn(property, newPlayer) end ) stats.Parent = newPlayer end end function onCaptureScored(player) local ls = player:findFirstChild("leaderstats") if ls == nil then return end local caps = ls:findFirstChild("Captures") if caps == nil then return end caps.Value = caps.Value + 1 end findAllFlagStands(game.Workspace) hookUpListeners() if (#stands > 0) then CTF_mode = true end game.Players.ChildAdded:connect(onPlayerEntered)
-- Returns the ancestor that contains a Humanoid, if it exists
local function FindCharacterAncestor(subject) if subject and subject ~= Workspace then local humanoid = subject:FindFirstChild('Humanoid') if humanoid then return subject, humanoid else return FindCharacterAncestor(subject.Parent) end end return nil end local function OnTouched(otherPart,RayPos) if Rocket and otherPart then -- Fly through anything in the ignore list if IGNORE_LIST[string.lower(otherPart.Name)] or (otherPart.Parent == Tank) then return end local myPlayer = CreatorTag.Value if myPlayer then -- Fly through the creator if myPlayer.Character and myPlayer.Character:IsAncestorOf(otherPart) then return end -- Fly through friendlies if not myPlayer.Neutral then local character = FindCharacterAncestor(otherPart.Parent) local player = PlayersService:GetPlayerFromCharacter(character) if player and player ~= myPlayer and player.TeamColor == Rocket.BrickColor then return end end end -- Fly through terrain water --[[if otherPart == Workspace.Terrain then --NOTE: If the rocket is large, then the simplifications made here will cause it to fly through terrain in some cases local frontOfRocket = Rocket.Position + (Rocket.CFrame.lookVector * (Rocket.Size.Z / 2)) local cellLocation = Workspace.Terrain:WorldToCellPreferSolid(frontOfRocket) local cellMaterial = Workspace.Terrain:GetCell(cellLocation.X, cellLocation.Y, cellLocation.Z) if cellMaterial == Enum.CellMaterial.Water or cellMaterial == Enum.CellMaterial.Empty then return end end]] Rocket.Transparency = 1 Rocket.CFrame = CFrame.new(RayPos.X,RayPos.Y,RayPos.Z) -- Create the explosion --[[local explosion = Instance.new('Explosion') explosion.BlastPressure = 500000 -- Completely safe explosion explosion.BlastRadius = BLAST_RADIUS explosion.DestroyJointRadiusPercent = 0 explosion.ExplosionType = Enum.ExplosionType.NoCraters explosion.Position = Rocket.Position explosion.Parent = game.Players.LocalPlayer.Character.Torso]] local character, humanoid = FindCharacterAncestor(otherPart.Parent) if humanoid and humanoid.Health > 0 then -- Humanoids are tagged and damaged DamageTag(character,DIRECT_HIT_DAMAGE) end -- Connect custom logic for the explosion --explosion.Hit:connect(function(hitPart, hitDistance) OnExplosionHit(hitPart, hitDistance, explosion.Position) end) ypcall(function() for i = 1, 1 do ExplodeClone = Explode:clone() ExplodeClone.Position = Rocket.Position ExplodeClone.Mesh.Scale = Vector3.new(5,5,5)*1 ExplodeClone.CFrame = ExplodeClone.CFrame * CFrame.fromEulerAnglesXYZ(math.random(-10000,10000)/100,math.random(-10000,10000)/100,math.random(-10000,10000)/100) ExplodeClone.Parent = game.Players.LocalPlayer.Character.Torso NewScript = Rocket.Script:clone() NewScript.Disabled = false NewScript.Parent = ExplodeClone end end) -- Move this script and the creator tag (so our custom logic can execute), then destroy the rocket --script.Parent = explosion CreatorTag.Parent = script Rocket:Destroy() end end
-- (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 = "Belgium hat" p.Parent = h p.Position = hit.Parent:findFirstChild("Head").Position p.Name = "Handle" p.formFactor = 0 p.Size = Vector3.new(1, 1.2, 1) p.BottomSurface = 0 p.TopSurface = 0 p.Locked = true script.Parent.Mesh:clone().Parent = p h.Parent = hit.Parent h.AttachmentForward = Vector3.new (-0, -0, -1) h.AttachmentPos = Vector3.new(0, -0.1, 0.05) h.AttachmentRight = Vector3.new (1, 0, 0) h.AttachmentUp = Vector3.new (0, 1, 0) wait(5) debounce = true end end script.Parent.Touched:connect(onTouched)
-- Decompiled with the Synapse X Luau decompiler.
return { Magnet = { canDrop = true, dropWeight = 8.5, isUnique = true, tiers = { { title = "Magnet", desc = "Pet can collect orbs for you" } } } };
--[[local db = false local cooldown = 10 local players = game:GetService("Players") local localPlayer = players.LocalPlayer script.Parent.MouseButton1Click:Connect(function() if script.Parent.Parent.message.Text ~= "" then if not db then db = true game.ReplicatedStorage.announceSystem.announce:FireServer(script.Parent.Parent.message.Text) -- Start the countdown loop for i = cooldown, 1, -1 do script.Parent.Text = "Cooldown for " .. i .. " seconds" wait(1) end -- Reset the button text and db flag script.Parent.Text = "Send" db = false else script.Parent.Text = "Cooldown for " .. cooldown .. " seconds" end end end) ]]
-- For all easing functions: -- t = elapsed time -- b = begin -- c = change == ending - beginning -- d = duration (total time)
local pow = math.pow local sin = math.sin local cos = math.cos local pi = math.pi local sqrt = math.sqrt local abs = math.abs local asin = math.asin local function default(b,c,d) if (b==nil) then b = 0 c = 1 d = 1 end return b,c,d end local function linear(t, b, c, d) b,c,d = default(b,c,d) return c * t / d + b end local function inQuad(t, b, c, d) b,c,d = default(b,c,d) t = t / d return c * pow(t, 2) + b end local function outQuad(t, b, c, d) b,c,d = default(b,c,d) t = t / d return -c * t * (t - 2) + b end local function inOutQuad(t, b, c, d) b,c,d = default(b,c,d) t = t / d * 2 if t < 1 then return c / 2 * pow(t, 2) + b else return -c / 2 * ((t - 1) * (t - 3) - 1) + b end end local function outInQuad(t, b, c, d) b,c,d = default(b,c,d) if t < d / 2 then return outQuad (t * 2, b, c / 2, d) else return inQuad((t * 2) - d, b + c / 2, c / 2, d) end end local function inCubic (t, b, c, d) b,c,d = default(b,c,d) t = t / d return c * pow(t, 3) + b end local function outCubic(t, b, c, d) b,c,d = default(b,c,d) t = t / d - 1 return c * (pow(t, 3) + 1) + b end local function inOutCubic(t, b, c, d) b,c,d = default(b,c,d) t = t / d * 2 if t < 1 then return c / 2 * t * t * t + b else t = t - 2 return c / 2 * (t * t * t + 2) + b end end local function outInCubic(t, b, c, d) b,c,d = default(b,c,d) if t < d / 2 then return outCubic(t * 2, b, c / 2, d) else return inCubic((t * 2) - d, b + c / 2, c / 2, d) end end local function inQuart(t, b, c, d) b,c,d = default(b,c,d) t = t / d return c * pow(t, 4) + b end local function outQuart(t, b, c, d) b,c,d = default(b,c,d) t = t / d - 1 return -c * (pow(t, 4) - 1) + b end local function inOutQuart(t, b, c, d) b,c,d = default(b,c,d) t = t / d * 2 if t < 1 then return c / 2 * pow(t, 4) + b else t = t - 2 return -c / 2 * (pow(t, 4) - 2) + b end end local function outInQuart(t, b, c, d) b,c,d = default(b,c,d) if t < d / 2 then return outQuart(t * 2, b, c / 2, d) else return inQuart((t * 2) - d, b + c / 2, c / 2, d) end end local function inQuint(t, b, c, d) b,c,d = default(b,c,d) t = t / d return c * pow(t, 5) + b end local function outQuint(t, b, c, d) b,c,d = default(b,c,d) t = t / d - 1 return c * (pow(t, 5) + 1) + b end local function inOutQuint(t, b, c, d) b,c,d = default(b,c,d) t = t / d * 2 if t < 1 then return c / 2 * pow(t, 5) + b else t = t - 2 return c / 2 * (pow(t, 5) + 2) + b end end local function outInQuint(t, b, c, d) b,c,d = default(b,c,d) if t < d / 2 then return outQuint(t * 2, b, c / 2, d) else return inQuint((t * 2) - d, b + c / 2, c / 2, d) end end local function inSine(t, b, c, d) b,c,d = default(b,c,d) return -c * cos(t / d * (pi / 2)) + c + b end local function outSine(t, b, c, d) b,c,d = default(b,c,d) return c * sin(t / d * (pi / 2)) + b end local function inOutSine(t, b, c, d) b,c,d = default(b,c,d) return -c / 2 * (cos(pi * t / d) - 1) + b end local function outInSine(t, b, c, d) b,c,d = default(b,c,d) if t < d / 2 then return outSine(t * 2, b, c / 2, d) else return inSine((t * 2) -d, b + c / 2, c / 2, d) end end local function inExpo(t, b, c, d) b,c,d = default(b,c,d) if t == 0 then return b else return c * pow(2, 10 * (t / d - 1)) + b - c * 0.001 end end local function outExpo(t, b, c, d) b,c,d = default(b,c,d) if t == d then return b + c else return c * 1.001 * (-pow(2, -10 * t / d) + 1) + b end end local function inOutExpo(t, b, c, d) b,c,d = default(b,c,d) if t == 0 then return b end if t == d then return b + c end t = t / d * 2 if t < 1 then return c / 2 * pow(2, 10 * (t - 1)) + b - c * 0.0005 else t = t - 1 return c / 2 * 1.0005 * (-pow(2, -10 * t) + 2) + b end end local function outInExpo(t, b, c, d) b,c,d = default(b,c,d) if t < d / 2 then return outExpo(t * 2, b, c / 2, d) else return inExpo((t * 2) - d, b + c / 2, c / 2, d) end end local function inCirc(t, b, c, d) b,c,d = default(b,c,d) t = t / d return(-c * (sqrt(1 - pow(t, 2)) - 1) + b) end local function outCirc(t, b, c, d) b,c,d = default(b,c,d) t = t / d - 1 return(c * sqrt(1 - pow(t, 2)) + b) end local function inOutCirc(t, b, c, d) b,c,d = default(b,c,d) t = t / d * 2 if t < 1 then return -c / 2 * (sqrt(1 - t * t) - 1) + b else t = t - 2 return c / 2 * (sqrt(1 - t * t) + 1) + b end end local function outInCirc(t, b, c, d) b,c,d = default(b,c,d) if t < d / 2 then return outCirc(t * 2, b, c / 2, d) else return inCirc((t * 2) - d, b + c / 2, c / 2, d) end end local function inElastic(t,a,p, b, c, d) b,c,d = default(b,c,d) if t == 0 then return b end t = t / d if t == 1 then return b + c end if not p then p = d * 0.3 end local s if not a or a < abs(c) then a = c s = p / 4 else s = p / (2 * pi) * asin(c/a) end t = t - 1 return -(a * pow(2, 10 * t) * sin((t * d - s) * (2 * pi) / p)) + b end
-- Expose GetLibraries function
_G.GetLibraries = GetLibraries;
--[[Engine]]
--Torque Curve Tune.Horsepower = 500 -- [TORQUE CURVE VISUAL] Tune.IdleRPM = 700 -- https://www.desmos.com/calculator/2uo3hqwdhf Tune.PeakRPM = 9000 -- Use sliders to manipulate values Tune.Redline = 11000 -- 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)
-- Calculate label length
local LABEL_TEXT = 'Z' local LABEL_LENGTH = TextService:GetTextSize(LABEL_TEXT, 24/2, Enum.Font.SourceSans, Vector2.new(math.huge, math.huge)).X local ICON_SIZE = 21 local function ScopeInTooltip(props) return new('ImageLabel', { BackgroundTransparency = 1; ImageTransparency = 1 - 0.14; Image = 'rbxassetid://4445959523'; ScaleType = Enum.ScaleType.Slice; SliceCenter = Rect.new(4, 4, 12, 12); ImageColor3 = Color3.fromRGB(0, 0, 0); Size = UDim2.new(0, LABEL_LENGTH + (ICON_SIZE + 9)/2, 0, 30/2); LayoutOrder = props.LayoutOrder or 3; }, { IconWrapper = new('Frame', { Size = UDim2.new(0, ICON_SIZE/2, 0, ICON_SIZE/2); Position = UDim2.new(0, 0, 0.5, 0); AnchorPoint = Vector2.new(0, 0.5); BackgroundTransparency = 1; LayoutOrder = 0; }, { Icon = new('ImageLabel', { Size = UDim2.new(1, 0, 1, 0); BackgroundTransparency = 1; ImageTransparency = 0.5; Image = 'rbxassetid://2244452978'; ImageRectOffset = Vector2.new(14*3, 0) * 2; ImageRectSize = Vector2.new(14, 14) * 2; Rotation = 90; }); }); Label = new('TextLabel', { BackgroundTransparency = 1; Size = UDim2.new(0, LABEL_LENGTH, 1, 0); Position = UDim2.new(0, ICON_SIZE/2, 0.5, 0); AnchorPoint = Vector2.new(0, 0.5); Font = Enum.Font.SourceSans; TextSize = 24/2; Text = LABEL_TEXT; TextTransparency = 0.5; TextYAlignment = Enum.TextYAlignment.Center; TextColor3 = Color3.fromRGB(255, 255, 255); LayoutOrder = 1; }); }) end return ScopeInTooltip
---
if script.Parent.Parent.Parent.IsOn.Value then script.Parent.Parent:TweenPosition(UDim2.new(0, 0, 0, 0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quad,1,true) end script.Parent.MouseButton1Click:connect(function() if car.Body.Lights.L.L.L.Enabled == false and car.Body.Lights.H.L.L.Enabled == false then script.Parent.BackgroundColor3 = Color3.new(0,255/255,0) script.Parent.TextStrokeColor3 = Color3.new(0,255/255,0) car.Body.Lights.L.L.L.Enabled = true car.Body.Lights.R.L.L.Enabled = true car.Body.Lights.H.L.L.Enabled = false car.Body.Lights.PLATE.L.GUI.Enabled = true for index, child in pairs(car.Body.Lights.L:GetChildren()) do child.Material = Enum.Material.Neon end for index, child in pairs(car.Body.Lights.R:GetChildren()) do child.Material = Enum.Material.Neon end for index, child in pairs(car.Body.Lights.H:GetChildren()) do child.Material = Enum.Material.SmoothPlastic end elseif car.Body.Lights.L.L.L.Enabled == true and car.Body.Lights.H.L.L.Enabled == false then script.Parent.BackgroundColor3 = Color3.new(0,0,255/255) script.Parent.TextStrokeColor3 = Color3.new(0,0,255/255) car.Body.Lights.L.L.L.Enabled = true car.Body.Lights.R.L.L.Enabled = true car.Body.Lights.H.L.L.Enabled = true car.Body.Lights.PLATE.L.GUI.Enabled = true for index, child in pairs(car.Body.Lights.L:GetChildren()) do child.Material = Enum.Material.Neon end for index, child in pairs(car.Body.Lights.R:GetChildren()) do child.Material = Enum.Material.Neon end for index, child in pairs(car.Body.Lights.H:GetChildren()) do child.Material = Enum.Material.Neon end elseif car.Body.Lights.L.L.L.Enabled == true and car.Body.Lights.H.L.L.Enabled == true then script.Parent.BackgroundColor3 = Color3.new(0,0,0) script.Parent.TextStrokeColor3 = Color3.new(0,0,0) car.Body.Lights.L.L.L.Enabled = false car.Body.Lights.R.L.L.Enabled = false car.Body.Lights.H.L.L.Enabled = false car.Body.Lights.PLATE.L.GUI.Enabled = false for index, child in pairs(car.Body.Lights.L:GetChildren()) do child.Material = Enum.Material.SmoothPlastic end for index, child in pairs(car.Body.Lights.R:GetChildren()) do child.Material = Enum.Material.SmoothPlastic end for index, child in pairs(car.Body.Lights.H:GetChildren()) do child.Material = Enum.Material.SmoothPlastic end end end) script.Parent.Parent.Parent.Values.Brake.Changed:connect(function() if script.Parent.Parent.Parent.Values.Brake.Value ~= 1 then for index, child in pairs(car.Body.Lights.B:GetChildren()) do child.Material = Enum.Material.SmoothPlastic end car.Body.Lights.B.L.L.Enabled = false car.Body.a1.Enabled = false car.Body.a2.Enabled = false car.Body.a3.Enabled = false car.Body.a4.Enabled = false car.Body.a5.Enabled = false car.Body.a6.Enabled = false car.Body.a7.Enabled = false car.Body.a8.Enabled = false else for index, child in pairs(car.Body.Lights.B:GetChildren()) do child.Material = Enum.Material.Neon end car.Body.Lights.B.L.L.Enabled = true car.Body.a1.Enabled = true car.Body.a2.Enabled = true car.Body.a3.Enabled = true car.Body.a4.Enabled = true car.Body.a5.Enabled = true car.Body.a6.Enabled = true car.Body.a7.Enabled = true car.Body.a8.Enabled = true end end) script.Parent.Parent.Parent.Values.Gear.Changed:connect(function() if script.Parent.Parent.Parent.Values.Gear.Value == -1 then for index, child in pairs(car.Body.Lights.Rev:GetChildren()) do child.Material = Enum.Material.Neon car.DriveSeat.Reverse:Play() end else for index, child in pairs(car.Body.Lights.Rev:GetChildren()) do child.Material = Enum.Material.SmoothPlastic car.DriveSeat.Reverse:Stop() end end end) while wait() do if (car.DriveSeat.Velocity.magnitude/40)+0.300 < 1.3 then car.DriveSeat.Reverse.Pitch = (car.DriveSeat.Velocity.magnitude/40)+0.300 car.DriveSeat.Reverse.Volume = (car.DriveSeat.Velocity.magnitude/150) else car.DriveSeat.Reverse.Pitch = 1.3 car.DriveSeat.Reverse.Volume = .2 end end
--- SERVICES/DIRECTORIES ---
Players = game:GetService("Players") ServerScriptService = game:GetService("ServerScriptService") ServerStorage = game:GetService("ServerStorage") ReplicatedStorage = game:GetService("ReplicatedStorage")
--[[ Public API ]]
-- function Thumbstick:Enable() Enabled = true ThumbstickFrame.Visible = true local humanoid = MasterControl:GetHumanoid() enableAutoJump(humanoid) end function Thumbstick:Disable() Enabled = false if RevertAutoJumpEnabledToFalse then local humanoid = MasterControl:GetHumanoid() if humanoid then humanoid.AutoJumpEnabled = false end end ThumbstickFrame.Visible = false OnMoveTouchEnded() end function Thumbstick:GetInputObject() return MoveTouchObject end function Thumbstick:Create(parentFrame) if ThumbstickFrame then ThumbstickFrame:Destroy() ThumbstickFrame = nil if OnTouchMovedCn then OnTouchMovedCn:disconnect() OnTouchMovedCn = nil end if OnTouchEndedCn then OnTouchEndedCn:disconnect() OnTouchEndedCn = nil end if OnRenderSteppedCn then OnRenderSteppedCn:disconnect() OnRenderSteppedCn = nil end if TouchActivateCn then TouchActivateCn:disconnect() TouchActivateCn = nil end end local ThumbstickSize = 45 local ThumbstickRingSize = 20 local MiddleSize = 10 local MiddleSpacing = MiddleSize + 4 local RadiusOfDeadZone = 2 local RadiusOfMaxSpeed = 50 local screenSize = parentFrame.AbsoluteSize local isBigScreen = math.min(screenSize.x, screenSize.y) > 500 if isBigScreen then ThumbstickSize = ThumbstickSize * 2 ThumbstickRingSize = ThumbstickRingSize * 2 MiddleSize = MiddleSize * 2 MiddleSpacing = MiddleSpacing * 2 RadiusOfDeadZone = RadiusOfDeadZone * 2 RadiusOfMaxSpeed = RadiusOfMaxSpeed * 2 end local color = Color3.fromRGB(255, 255, 255) local function layoutThumbstickFrame(portraitMode) if portraitMode then ThumbstickFrame.Size = UDim2.new(1, 0, 0.4, 0) ThumbstickFrame.Position = UDim2.new(0, 0, 0.6, 0) GestureArea.Size = UDim2.new(1, 0, 0.6, 0) GestureArea.Position = UDim2.new(0, 0, 0, 0) else ThumbstickFrame.Size = UDim2.new(0.4, 0, 2/3, 0) ThumbstickFrame.Position = UDim2.new(0, 0, 1/3, 0) GestureArea.Size = UDim2.new(1, 0, 1, 0) GestureArea.Position = UDim2.new(0, 0, 0, 0) end end GestureArea = Instance.new("Frame") GestureArea.Name = "GestureArea" GestureArea.Active = false GestureArea.Visible = true GestureArea.BackgroundTransparency = 1 GestureArea.BackgroundColor3 = Color3.fromRGB(0, 0, 0) ThumbstickFrame = Instance.new('Frame') ThumbstickFrame.Name = "DynamicThumbstickFrame" ThumbstickFrame.Active = false ThumbstickFrame.Visible = false ThumbstickFrame.BackgroundTransparency = 1.0 ThumbstickFrame.BackgroundColor3 = Color3.fromRGB(0, 0, 0) layoutThumbstickFrame() StartImage = Instance.new("ImageLabel") StartImage.Name = "ThumbstickStart" StartImage.Visible = true StartImage.BackgroundTransparency = 1 StartImage.Image = TOUCH_CONTROLS_SHEET StartImage.ImageRectOffset = Vector2.new(1,1) StartImage.ImageRectSize = Vector2.new(144, 144) StartImage.ImageColor3 = Color3.new(0, 0, 0) StartImage.AnchorPoint = Vector2.new(0.5, 0.5) StartImage.Position = UDim2.new(0, ThumbstickRingSize * 3.3, 1, -ThumbstickRingSize * 2.8) StartImage.Size = UDim2.new(0, ThumbstickRingSize * 3.7, 0, ThumbstickRingSize * 3.7) StartImage.ZIndex = 10 StartImage.Parent = ThumbstickFrame EndImage = Instance.new("ImageLabel") EndImage.Name = "ThumbstickEnd" EndImage.Visible = true EndImage.BackgroundTransparency = 1 EndImage.Image = TOUCH_CONTROLS_SHEET EndImage.ImageRectOffset = Vector2.new(1,1) EndImage.ImageRectSize = Vector2.new(144, 144) EndImage.AnchorPoint = Vector2.new(0.5, 0.5) EndImage.Position = StartImage.Position EndImage.Size = UDim2.new(0, ThumbstickSize * 0.8, 0, ThumbstickSize * 0.8) EndImage.ZIndex = 10 EndImage.Parent = ThumbstickFrame for i = 1, NUM_MIDDLE_IMAGES do MiddleImages[i] = Instance.new("ImageLabel") MiddleImages[i].Name = "ThumbstickMiddle" MiddleImages[i].Visible = false MiddleImages[i].BackgroundTransparency = 1 MiddleImages[i].Image = TOUCH_CONTROLS_SHEET MiddleImages[i].ImageRectOffset = Vector2.new(1,1) MiddleImages[i].ImageRectSize = Vector2.new(144, 144) MiddleImages[i].ImageTransparency = MIDDLE_TRANSPARENCIES[i] MiddleImages[i].AnchorPoint = Vector2.new(0.5, 0.5) MiddleImages[i].ZIndex = 9 MiddleImages[i].Parent = ThumbstickFrame end local CameraChangedConn = nil local function onCurrentCameraChanged() if CameraChangedConn then CameraChangedConn:Disconnect() CameraChangedConn = nil end local newCamera = workspace.CurrentCamera if newCamera then local function onViewportSizeChanged() local size = newCamera.ViewportSize local portraitMode = size.X < size.Y layoutThumbstickFrame(portraitMode) end CameraChangedConn = newCamera:GetPropertyChangedSignal("ViewportSize"):Connect(onViewportSizeChanged) onViewportSizeChanged() end end workspace:GetPropertyChangedSignal("CurrentCamera"):Connect(onCurrentCameraChanged) if workspace.CurrentCamera then onCurrentCameraChanged() end MoveTouchObject = nil local MoveTouchStartTime = nil local MoveTouchStartPosition = nil local startImageFadeTween, endImageFadeTween, middleImageFadeTweens = nil, nil, {} local function fadeThumbstick(visible) if not visible and MoveTouchObject then return end if IsFirstTouch then return end if startImageFadeTween then startImageFadeTween:Cancel() end if endImageFadeTween then endImageFadeTween:Cancel() end for i = 1, #MiddleImages do if middleImageFadeTweens[i] then middleImageFadeTweens[i]:Cancel() end end if visible then startImageFadeTween = TweenService:Create(StartImage, ThumbstickFadeTweenInfo, { ImageTransparency = 0 }) startImageFadeTween:Play() endImageFadeTween = TweenService:Create(EndImage, ThumbstickFadeTweenInfo, { ImageTransparency = 0.2 }) endImageFadeTween:Play() for i = 1, #MiddleImages do middleImageFadeTweens[i] = TweenService:Create(MiddleImages[i], ThumbstickFadeTweenInfo, { ImageTransparency = MIDDLE_TRANSPARENCIES[i] }) middleImageFadeTweens[i]:Play() end else startImageFadeTween = TweenService:Create(StartImage, ThumbstickFadeTweenInfo, { ImageTransparency = 1 }) startImageFadeTween:Play() endImageFadeTween = TweenService:Create(EndImage, ThumbstickFadeTweenInfo, { ImageTransparency = 1 }) endImageFadeTween:Play() for i = 1, #MiddleImages do middleImageFadeTweens[i] = TweenService:Create(MiddleImages[i], ThumbstickFadeTweenInfo, { ImageTransparency = 1 }) middleImageFadeTweens[i]:Play() end end end local function fadeThumbstickFrame(fadeDuration, fadeRatio) FadeInAndOutHalfDuration = fadeDuration * 0.5 FadeInAndOutBalance = fadeRatio TweenInAlphaStart = tick() end local function doMove(direction) MasterControl:AddToPlayerMovement(-currentMoveVector) currentMoveVector = direction -- Scaled Radial Dead Zone local inputAxisMagnitude = currentMoveVector.magnitude if inputAxisMagnitude < RadiusOfDeadZone then currentMoveVector = Vector3.new() else currentMoveVector = currentMoveVector.unit*(1 - math.max(0, (RadiusOfMaxSpeed - currentMoveVector.magnitude)/RadiusOfMaxSpeed)) currentMoveVector = Vector3.new(currentMoveVector.x, 0, currentMoveVector.y) end MasterControl:AddToPlayerMovement(currentMoveVector) end local function layoutMiddleImages(startPos, endPos) local startDist = (ThumbstickSize / 2) + MiddleSize local vector = endPos - startPos local distAvailable = vector.magnitude - (ThumbstickRingSize / 2) - MiddleSize local direction = vector.unit local distNeeded = MiddleSpacing * NUM_MIDDLE_IMAGES local spacing = MiddleSpacing if distNeeded < distAvailable then spacing = distAvailable / NUM_MIDDLE_IMAGES end for i = 1, NUM_MIDDLE_IMAGES do local image = MiddleImages[i] local distWithout = startDist + (spacing * (i - 2)) local currentDist = startDist + (spacing * (i - 1)) if distWithout < distAvailable then local pos = endPos - direction * currentDist local exposedFraction = math.clamp(1 - ((currentDist - distAvailable) / spacing), 0, 1) image.Visible = true image.Position = UDim2.new(0, pos.X, 0, pos.Y) image.Size = UDim2.new(0, MiddleSize * exposedFraction, 0, MiddleSize * exposedFraction) else image.Visible = false end end end local function moveStick(pos) local startPos = Vector2.new(MoveTouchStartPosition.X, MoveTouchStartPosition.Y) - ThumbstickFrame.AbsolutePosition local endPos = Vector2.new(pos.X, pos.Y) - ThumbstickFrame.AbsolutePosition local relativePosition = endPos - startPos local length = relativePosition.magnitude local maxLength = ThumbstickFrame.AbsoluteSize.X length = math.min(length, maxLength) relativePosition = relativePosition*length EndImage.Position = UDim2.new(0, endPos.X, 0, endPos.Y) layoutMiddleImages(startPos, endPos) end -- input connections ThumbstickFrame.InputBegan:connect(function(inputObject) if inputObject.UserInputType ~= Enum.UserInputType.Touch or inputObject.UserInputState ~= Enum.UserInputState.Begin then return end if MoveTouchObject then return end if IsFirstTouch then IsFirstTouch = false local tweenInfo = TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.Out,0,false,0) TweenService:Create(StartImage, tweenInfo, {Size = UDim2.new(0, 0, 0, 0)}):Play() TweenService:Create(EndImage, tweenInfo, {Size = UDim2.new(0, ThumbstickSize, 0, ThumbstickSize), ImageColor3 = Color3.new(0,0,0)}):Play() end MoveTouchObject = inputObject MoveTouchStartTime = tick() MoveTouchStartPosition = inputObject.Position local startPosVec2 = Vector2.new(inputObject.Position.X - ThumbstickFrame.AbsolutePosition.X, inputObject.Position.Y - ThumbstickFrame.AbsolutePosition.Y) StartImage.Visible = true StartImage.Position = UDim2.new(0, startPosVec2.X, 0, startPosVec2.Y) EndImage.Visible = true EndImage.Position = StartImage.Position fadeThumbstick(true) moveStick(inputObject.Position) if FadeInAndOutBackground then local playerGui = LocalPlayer:FindFirstChildOfClass("PlayerGui") local hasFadedBackgroundInOrientation = false -- only fade in/out the background once per orientation if playerGui then if playerGui.CurrentScreenOrientation == Enum.ScreenOrientation.LandscapeLeft or playerGui.CurrentScreenOrientation == Enum.ScreenOrientation.LandscapeRight then hasFadedBackgroundInOrientation = HasFadedBackgroundInLandscape HasFadedBackgroundInLandscape = true elseif playerGui.CurrentScreenOrientation == Enum.ScreenOrientation.Portrait then hasFadedBackgroundInOrientation = HasFadedBackgroundInPortrait HasFadedBackgroundInPortrait = true end end if not hasFadedBackgroundInOrientation then FadeInAndOutHalfDuration = FADE_IN_OUT_HALF_DURATION_DEFAULT FadeInAndOutBalance = FADE_IN_OUT_BALANCE_DEFAULT TweenInAlphaStart = tick() end end end) OnTouchMovedCn = UserInputService.TouchMoved:connect(function(inputObject, isProcessed) if inputObject == MoveTouchObject then local direction = Vector2.new(inputObject.Position.x - MoveTouchStartPosition.x, inputObject.Position.y - MoveTouchStartPosition.y) if math.abs(direction.x) > 0 or math.abs(direction.y) > 0 then doMove(direction) moveStick(inputObject.Position) end end end) OnMoveTouchEnded = function(inputObject) if inputObject then local direction = Vector2.new(inputObject.Position.x - MoveTouchStartPosition.x, inputObject.Position.y - MoveTouchStartPosition.y) end MoveTouchObject = nil fadeThumbstick(false) MasterControl:AddToPlayerMovement(-currentMoveVector) currentMoveVector = Vector3.new(0,0,0) end OnRenderSteppedCn = RunService.RenderStepped:Connect(function(step) if TweenInAlphaStart ~= nil then local delta = tick() - TweenInAlphaStart local fadeInTime = (FadeInAndOutHalfDuration * 2 * FadeInAndOutBalance) ThumbstickFrame.BackgroundTransparency = 1 - FadeInAndOutMaxAlpha*math.min(delta/fadeInTime, 1) if delta > fadeInTime then TweenOutAlphaStart = tick() TweenInAlphaStart = nil end elseif TweenOutAlphaStart ~= nil then local delta = tick() - TweenOutAlphaStart local fadeOutTime = (FadeInAndOutHalfDuration * 2) - (FadeInAndOutHalfDuration * 2 * FadeInAndOutBalance) ThumbstickFrame.BackgroundTransparency = 1 - FadeInAndOutMaxAlpha + FadeInAndOutMaxAlpha*math.min(delta/fadeOutTime, 1) if delta > fadeOutTime then TweenOutAlphaStart = nil end end end) OnTouchEndedCn = UserInputService.TouchEnded:connect(function(inputObject, isProcessed) if inputObject == MoveTouchObject then OnMoveTouchEnded(inputObject) end end) GuiService.MenuOpened:connect(function() if MoveTouchObject then OnMoveTouchEnded(nil) end end) local playerGui = LocalPlayer:FindFirstChildOfClass("PlayerGui") while not playerGui do LocalPlayer.ChildAdded:wait() playerGui = LocalPlayer:FindFirstChildOfClass("PlayerGui") end local playerGuiChangedConn = nil local originalScreenOrientationWasLandscape = playerGui.CurrentScreenOrientation == Enum.ScreenOrientation.LandscapeLeft or playerGui.CurrentScreenOrientation == Enum.ScreenOrientation.LandscapeRight local function longShowBackground() FadeInAndOutHalfDuration = 2.5 FadeInAndOutBalance = 0.05 TweenInAlphaStart = tick() end playerGuiChangedConn = playerGui.Changed:connect(function(prop) if prop == "CurrentScreenOrientation" then if (originalScreenOrientationWasLandscape and playerGui.CurrentScreenOrientation == Enum.ScreenOrientation.Portrait) or (not originalScreenOrientationWasLandscape and playerGui.CurrentScreenOrientation ~= Enum.ScreenOrientation.Portrait) then playerGuiChangedConn:disconnect() longShowBackground() if originalScreenOrientationWasLandscape then HasFadedBackgroundInPortrait = true else HasFadedBackgroundInLandscape = true end end end end) GestureArea.Parent = parentFrame.Parent ThumbstickFrame.Parent = parentFrame spawn(function() if game:IsLoaded() then longShowBackground() else game.Loaded:wait() longShowBackground() end end) end return Thumbstick
--Valve Properties
local BOVsound = car.DriveSeat.BOV BOVsound.Volume = 3 --Bov Volume BOVsound.Pitch = 1 -- Pitch [Don't change this] BOVsound.SoundId = "rbxassetid://337982546" --Sound local CPSI = 0 local Values = script.Parent.Parent:FindFirstChild("A-Chassis Interface") local Throttle = Values.Values.Throttle.Value local CurrentGear = Values.Values.Gear.Value local CurrentRPM = Values.Values.RPM.Value local _Tune = require(car["A-Chassis Tune"]) local MaxRPM = _Tune.Redline Values.Values.TPSI.Value = PSI local DEADBOOST = PSI - 0.5 local active = false local boom = true
-- Only called on the server
function Grid:_onAddGridObject(player, objectTypeName, cellId) local objectType = self.objectTypes[objectTypeName] local placed = self.contentsManager:add(objectType, cellId) if not placed then AddGridObjectRejected:FireClient(player, objectTypeName, cellId) end end
--[[** <description> Run this once to combine all keys provided into one "main key". Internally, this means that data will be stored in a table with the key mainKey. This is used to get around the 2-DataStore2 reliability caveat. </description> <parameter name = "mainKey"> The key that will be used to house the table. </parameter> <parameter name = "..."> All the keys to combine under one table. </parameter> **--]]
function DataStore2.Combine(mainKey, ...) for _, name in ipairs({...}) do combinedDataStoreInfo[name] = mainKey end end function DataStore2.ClearCache() DataStoreCache = {} end function DataStore2.SaveAll(Player) if DataStoreCache[Player] then for _, dataStore in pairs(DataStoreCache[Player]) do if dataStore.combinedStore == nil then dataStore:Save() end end end end DataStore2.SaveAllAsync = Promise.promisify(DataStore2.SaveAll) function DataStore2.PatchGlobalSettings(patch) for key, value in pairs(patch) do assert(Settings[key] ~= nil, "No such key exists: " .. key) -- TODO: Implement type checking with this when osyris' t is in Settings[key] = value end end function DataStore2.__call(_, dataStoreName, Player) assert( typeof(dataStoreName) == "string" and IsPlayer.Check(Player), ("DataStore2() API call expected {string dataStoreName, Player Player}, got {%s, %s}") :format( typeof(dataStoreName), typeof(Player) ) ) if DataStoreCache[Player] and DataStoreCache[Player][dataStoreName] then return DataStoreCache[Player][dataStoreName] elseif combinedDataStoreInfo[dataStoreName] then local dataStore = DataStore2(combinedDataStoreInfo[dataStoreName], Player) dataStore:BeforeSave(function(combinedData) for key in pairs(combinedData) do if combinedDataStoreInfo[key] then local combinedStore = DataStore2(key, Player) local value = combinedStore:Get(nil, true) if value ~= nil then if combinedStore.combinedBeforeSave then value = combinedStore.combinedBeforeSave(clone(value)) end combinedData[key] = value end end end return combinedData end) local combinedStore = setmetatable({ combinedName = dataStoreName, combinedStore = dataStore, }, { __index = function(_, key) return CombinedDataStore[key] or dataStore[key] end, }) if not DataStoreCache[Player] then DataStoreCache[Player] = {} end DataStoreCache[Player][dataStoreName] = combinedStore return combinedStore end local dataStore = { Name = dataStoreName, UserId = Player.UserId, callbacks = {}, beforeInitialGet = {}, afterSave = {}, bindToClose = {}, } dataStore.savingMethod = SavingMethods[Settings.SavingMethod].new(dataStore) setmetatable(dataStore, DataStoreMetatable) local saveFinishedEvent, isSaveFinished = Instance.new("BindableEvent"), false local bindToCloseEvent = Instance.new("BindableEvent") local bindToCloseCallback = function() if not isSaveFinished then -- Defer to avoid a race between connecting and firing "saveFinishedEvent" Promise.defer(function() bindToCloseEvent:Fire() -- Resolves the Promise.race to save the data end) saveFinishedEvent.Event:Wait() end local value = dataStore:Get(nil, true) for _, bindToClose in ipairs(dataStore.bindToClose) do bindToClose(Player, value) end end local success, errorMessage = pcall(function() game:BindToClose(function() if bindToCloseCallback == nil then return end bindToCloseCallback() end) end) if not success then warn("DataStore2 could not BindToClose", errorMessage) end Promise.race({ Promise.fromEvent(bindToCloseEvent.Event), Promise.fromEvent(Player.AncestryChanged, function() return not Player:IsDescendantOf(game) end), }):andThen(function() dataStore:SaveAsync():andThen(function() print("Player "..Player.Name.." left, saved", dataStoreName, ":", dataStore["value"]) end):catch(function(error) -- TODO: Something more elegant warn("error when Player left!", error) end):finally(function() isSaveFinished = true saveFinishedEvent:Fire() end) --Give a long delay for people who haven't figured out the cache :^( return Promise.delay(40):andThen(function() DataStoreCache[Player] = nil bindToCloseCallback = nil end) end) if not DataStoreCache[Player] then DataStoreCache[Player] = {} end DataStoreCache[Player][dataStoreName] = dataStore return dataStore end DataStore2.Constants = Constants return setmetatable(DataStore2, DataStore2)
--[[ A 'Symbol' is an opaque marker type that can be used to signify unique statuses. Symbols have the type 'userdata', but when printed to the console, the name of the symbol is shown. ]]
local Symbol = {}
-- Modules
local Engine = require(script:WaitForChild("Engine")) local ReplicatedModuleScripts = ReplicatedStorage:FindFirstChild("ModuleScripts") local PlayerConverter = require(ReplicatedModuleScripts:FindFirstChild("PlayerConverter"))
--[Funkcje]
function onClicked() if legansio == false then g1.Transparency = 1 g2.Transparency = 0 wait(0.1) g2.Transparency = 1 g3.Transparency = 0 pala2.Transparency = 0 wait(0.1) g3.Transparency = 1 pala3.Transparency = 0 g4.Transparency = 0 wait(0.1) g5.Transparency = 0 g4.Transparency = 1 wait(0.1) pala4.Transparency = 0 g5.Transparency = 1 g6.Transparency = 0 wait(0.1) g6.Transparency = 1 g7.Transparency = 0 wait(0.1) g7.Transparency = 1 g8.Transparency = 0 pala5.Transparency = 0 wait(0.1) g8.Transparency = 1 g9.Transparency = 0 wait(0.1) g9.Transparency = 1 g10.Transparency = 0 wait(0.1) g10.Transparency = 1 g11.Transparency = 0 pala6.Transparency = 0 wait(0.1) g11.Transparency = 1 g12.Transparency = 0 wait(0.1) g12.Transparency = 1 g13.Transparency = 0 wait(0.1) g13.Transparency = 1 g14.Transparency = 0 wait(0.1) g14.Transparency = 1 s1.Transparency = 0 pala7.Transparency = 0 wait(1) s1.Transparency = 1 wait(0.1) q1.Transparency = 0 l1.Transparency = 0 p1.Transparency = 0 sp1.Transparency = 0 sl1.Transparency = 0 wait(2) l1.Transparency = 1 sl1.Transparency = 1 l2.Transparency = 0 sl2.Transparency = 0 wait(0.1) l2.Transparency = 1 sl2.Transparency = 1 l3.Transparency = 0 sl3.Transparency = 0 wait(0.1) l3.Transparency = 1 sl3.Transparency = 1 l4.Transparency = 0 sl4.Transparency = 0 wait(0.1) l4.Transparency = 1 sl4.Transparency = 1 l5.Transparency = 0 sl5.Transparency = 0 wait(0.1) l5.Transparency = 1 sl5.Transparency = 1 l6.Transparency = 0 sl6.Transparency = 0 wait(0.1) l6.Transparency = 1 sl6.Transparency = 1 l7.Transparency = 0 sl7.Transparency = 0 wait(1) wait(2) p1.Transparency = 1 sp1.Transparency = 1 p2.Transparency = 0 sp2.Transparency = 0 wait(0.1) p2.Transparency = 1 sp2.Transparency = 1 p3.Transparency = 0 sp3.Transparency = 0 wait(0.1) p3.Transparency = 1 sp3.Transparency = 1 p4.Transparency = 0 sp4.Transparency = 0 wait(0.1) p4.Transparency = 1 sp4.Transparency = 1 p5.Transparency = 0 sp5.Transparency = 0 wait(0.1) p5.Transparency = 1 sp5.Transparency = 1 p6.Transparency = 0 sp6.Transparency = 0 wait(0.1) p6.Transparency = 1 sp6.Transparency = 1 p7.Transparency = 0 sp7.Transparency = 0 wait(1) sl7.Material="Neon" sp7.Material="Neon" sl7.SurfaceLight.Enabled = true sp7.SurfaceLight.Enabled = true end end script.Parent.ClickDetector.MouseClick:connect(onClicked)
--Made on September 4 2021
local pp = script.Parent.PPPart.ProximityPrompt pp.Triggered:Connect(function() script.Parent:Destroy() end)
-- Implements Javascript's `Array.prototype.forEach` as defined below -- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach
return function<T, U>(t: Array<T>, callback: callbackFn<T> | callbackFnWithThisArg<T, U>, thisArg: U?): () if typeof(t) ~= "table" then error(string.format("Array.forEach called on %s", typeof(t))) end if typeof(callback) ~= "function" then error("callback is not a function") end local len = #t local k = 1 while k <= len do local kValue = t[k] if thisArg ~= nil then (callback :: callbackFnWithThisArg<T, U>)(thisArg, kValue, k, t) else (callback :: callbackFn<T>)(kValue, k, t) end if #t < len then -- don't iterate on removed items, don't iterate more than original length len = #t end k += 1 end end
--------------------) Settings
Damage = 0 -- the ammout of health the player or mob will take Cooldown = 10 -- cooldown for use of the tool again ZoneModelName = "Fatal error string" -- name the zone model MobHumanoidName = "Humanoid"-- the name of player or mob u want to damage
--[[Brakes]]
Tune.ABSEnabled = true -- Implements ABS Tune.ABSThreshold = 20 -- Slip speed allowed before ABS starts working (in SPS) Tune.FBrakeForce = 4000 -- Front brake force Tune.RBrakeForce = 3000 -- 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]
--
function Portal.new(surfaceGUI) local self = setmetatable({}, Portal) self.SurfaceGUI = surfaceGUI self.Camera = Instance.new("Camera", surfaceGUI) self.ViewportFrame = VPF:Clone() self.ViewportFrame.CurrentCamera = self.Camera self.ViewportFrame.Parent = surfaceGUI return self end function Portal.fromPart(part, enum, parent) local surfaceGUI = Instance.new("SurfaceGui") surfaceGUI.Face = enum surfaceGUI.Adornee = part surfaceGUI.ClipsDescendants = true surfaceGUI.Parent = parent return Portal.new(surfaceGUI) end
--Prompt GetValidPrompt --* returns the first valid prompt for this response.
function Response:GetValidPrompt() local validPrompts = {} for _, prompt in pairs(self:GetPrompts()) do if prompt:IsValid() then table.insert(validPrompts, prompt) end end table.sort(validPrompts, function(a, b) return a.Priority > b.Priority end) return validPrompts[1] end
--[[ Returns true if the given HumanoidDescription has the item described in itemInfo equipped. ]]
local MerchBooth = script:FindFirstAncestor("MerchBooth") local types = require(MerchBooth.types) local isAccessory = require(MerchBooth.Modules.isAccessory) local isClassicClothing = require(MerchBooth.Modules.isClassicClothing) local isItemEquipped = function(description: HumanoidDescription, itemInfo: types.ItemInfo) if isAccessory(itemInfo.assetType) then for _, accessory in ipairs(description:GetAccessories(true)) do if accessory.AssetId == itemInfo.assetId then return true end end elseif isClassicClothing(itemInfo.assetType) then if description.GraphicTShirt == itemInfo.assetId or description.Shirt == itemInfo.assetId or description.Pants == itemInfo.assetId then return true end end return false end return isItemEquipped
-------------------------
function onClicked() FX.ROLL.BrickColor = BrickColor.new("CGA brown") FX.ROLL.loop.Disabled = true R.Function1.Disabled = true FX.ECHO.BrickColor = BrickColor.new("CGA brown") FX.ECHO.loop.Disabled = true FX.GATE.BrickColor = BrickColor.new("CGA brown") FX.GATE.loop.Disabled = true FX.PHASER.BrickColor = BrickColor.new("CGA brown") FX.PHASER.loop.Disabled = true FX.SLIPROLL.BrickColor = BrickColor.new("CGA brown") FX.SLIPROLL.loop.Disabled = true FX.FILTER.BrickColor = BrickColor.new("CGA brown") FX.FILTER.loop.Disabled = true FX.SENDRETURN.BrickColor = BrickColor.new("Really red") FX.SENDRETURN.loop.Disabled = true FX.TRANS.BrickColor = BrickColor.new("CGA brown") FX.TRANS.loop.Disabled = true FX.MultiTapDelay.BrickColor = BrickColor.new("CGA brown") FX.MultiTapDelay.loop.Disabled = true FX.DELAY.BrickColor = BrickColor.new("CGA brown") FX.DELAY.loop.Disabled = true FX.REVROLL.BrickColor = BrickColor.new("CGA brown") FX.REVROLL.loop.Disabled = true R.loop.Disabled = false R.Function2.Disabled = false end script.Parent.ClickDetector.MouseClick:connect(onClicked)
--Active
Values.Gear.Changed:Connect(function(Value) local TextLabel = Dash.Gear.TextValue if Value == -1 then TextLabel.Text = "R" elseif Value == 0 then TextLabel.Text = "N" else TextLabel.Text = Value end end) Values.RPM.Changed:Connect(function(Value) for i = 1, 30 do if Value >= (_Tune.Redline - 500) / 30 * i then Dash.Tach.ln[i].BackgroundTransparency = 0 else Dash.Tach.ln[i].BackgroundTransparency = 0.7 end end for i = 1, 3 do if Value > _Tune.Redline - i * 750 then Dash.Parent.Parent.Parent["RPM"..i].Material = "Neon" else Dash.Parent.Parent.Parent["RPM"..i].Material = "SmoothPlastic" end end end) Values.Velocity.Changed:Connect(function(Value) Dash.Speed.TextValue.Text = math.floor(Value.Magnitude * Speed_Units) end) Values.PBrake.Changed:Connect(function() CheckValue(Values.PBrake) end) Values.ABS.Changed:Connect(function() CheckValue(Values.ABS) end) Values.TCS.Changed:Connect(function() CheckValue(Values.TCS) end) Values.ABSActive.Changed:Connect(function(Value) wait() if Values.ABS.Value == true then if Dash.ABS.ImageTransparency == 0 then Dash.ABS.ImageTransparency = 0.7 else Dash.ABS.ImageTransparency = 0 end end end) Values.TCSActive.Changed:Connect(function(Value) wait() if Values.TCS.Value == true then if Dash.TCS.ImageTransparency == 0 then Dash.TCS.ImageTransparency = 0.7 else Dash.TCS.ImageTransparency = 0 end end end) Values.Horsepower.Changed:Connect(function(Value) if Value > tonumber(Dash.HP.TextValue.Text) then Dash.HP.TextValue.Text = math.floor(Value) end end) Values.Torque.Changed:Connect(function(Value) if Value > tonumber(Dash.TQ.TextValue.Text) then Dash.TQ.TextValue.Text = math.floor(Value) end end) game.Players.LocalPlayer.Character.Humanoid.Touched:Connect(function(part) if part.Name == "Start" and part.Parent.Name == "Wes_Timing_System_3" then local timeStart = tick() wait() if Dash.Time.TextValue.Text ~= "--:---.---" then game["Run Service"]:UnbindFromRenderStep("GaugeTimer") wait(3) end local function updateTimer() local value = tick() - timeStart value = math.floor(value*1000)/1000 local min = math.floor(value/60) local sec = math.floor(value)-60*min local milisec = math.floor((value-sec-min*60)*1000+0.5) if min > 0 and min < 10 then min = "0"..tostring(min) elseif min < 1 then min = "00" end if sec > 0 and sec < 10 then sec = "0"..tostring(sec) elseif sec < 1 then sec = "00" end if string.len(tostring(milisec)) == 2 then milisec = tostring(milisec).."0" elseif string.len(tostring(milisec)) == 1 then milisec = tostring(milisec).."00" end Dash.Time.TextValue.Text = min..":"..sec.."."..milisec end game["Run Service"]:BindToRenderStep("GaugeTimer",50,updateTimer) end end)
--[[ Used to set a handler for when the promise resolves, rejects, or is cancelled. Returns a new promise chained from this promise. ]]
function Promise.prototype:_finally(traceback, finallyHandler, onlyOk) if not onlyOk then self._unhandledRejection = false end -- Return a promise chained off of this promise return Promise._new(traceback, function(resolve, reject) local finallyCallback = resolve if finallyHandler then finallyCallback = createAdvancer( traceback, finallyHandler, resolve, reject ) end if onlyOk then local callback = finallyCallback finallyCallback = function(...) if self._status == Promise.Status.Rejected then return resolve(self) end return callback(...) end end if self._status == Promise.Status.Started then -- The promise is not settled, so queue this. table.insert(self._queuedFinally, finallyCallback) else -- The promise already settled or was cancelled, run the callback now. finallyCallback(self._status) end end, self) end function Promise.prototype:finally(finallyHandler) assert( finallyHandler == nil or type(finallyHandler) == "function", string.format(ERROR_NON_FUNCTION, "Promise:finally") ) return self:_finally(debug.traceback(nil, 2), finallyHandler) end Promise.prototype.Finally = Promise.prototype.finally
---Set Free Camera
function module.SetFreeCamera(Player,Target) local camera = workspace.CurrentCamera camera.CameraType = Enum.CameraType.Custom camera.CameraSubject = Target end return module
--BOV--
script.Parent.Parent.Values.RPM.Changed:connect(function() local t = 0 t = (totalPSI*10) BOVact = math.floor(t) end) script.Parent.Parent.Values.RPM.Changed:connect(function() wait(0.1) local t2 = 0 t2 = (totalPSI*10) BOVact2 = math.floor(t2) end) script.Parent.Parent.Values.RPM.Changed:connect(function() if BOVact > BOVact2 then if BOV.IsPlaying == false then BOV:Play() end end if BOVact < BOVact2 then if BOV.IsPlaying == true then BOV:Stop() end end end)
--[[ Script Variables ]]
-- while not Players.LocalPlayer do task.wait() end local lastInputType = nil local LocalPlayer = Players.LocalPlayer local PlayerGui = LocalPlayer:WaitForChild('PlayerGui') local IsTouchDevice = UserInputService.TouchEnabled local UserMovementMode = IsTouchDevice and GameSettings.TouchMovementMode or GameSettings.ComputerMovementMode local DevMovementMode = IsTouchDevice and LocalPlayer.DevTouchMovementMode or LocalPlayer.DevComputerMovementMode local IsUserChoice = (IsTouchDevice and DevMovementMode == Enum.DevTouchMovementMode.UserChoice) or (DevMovementMode == Enum.DevComputerMovementMode.UserChoice) local TouchGui = nil local TouchControlFrame = nil local IsModalEnabled = UserInputService.ModalEnabled local BindableEvent_OnFailStateChanged = nil local isJumpEnabled = false
--|| VARIABLES ||--
local Player = Players.LocalPlayer local Character = script.Parent local Humanoid = Character:WaitForChild("Humanoid") local HumanoidRootPart = Character:WaitForChild("HumanoidRootPart") local Torso = Character:WaitForChild("Torso") local RootJoint = HumanoidRootPart.RootJoint local LeftHipJoint = Torso["Left Hip"] local RightHipJoint = Torso["Right Hip"] local function Lerp(a, b, c) return a + (b - a) * c end local Force = nil local Direction = nil local Value1 = 0 local Value2 = 0 local RootJointC0 = RootJoint.C0 local LeftHipJointC0 = LeftHipJoint.C0 local RightHipJointC0 = RightHipJoint.C0 RunService.RenderStepped:Connect(function() --> To get the force, we multiply the velocity by 1,0,1, we don't want the Y value so we set y to 0 Force = HumanoidRootPart.Velocity * Vector3.new(1,0,1) if Force.Magnitude > 2 then --> This represents the direction Direction = Force.Unit Value1 = HumanoidRootPart.CFrame.RightVector:Dot(Direction) Value2 = HumanoidRootPart.CFrame.LookVector:Dot(Direction) else Value1 = 0 Value2 = 0 end --> the values being multiplied are how much you want to rotate by RootJoint.C0 = RootJoint.C0:Lerp(RootJointC0 * CFrame.Angles(math.rad(Value2 * 5), math.rad(-Value1 * 5), 0), 0.2) end)
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Place this into StarterGui or StarterPack -- -- CREDIT -- -- EvelienSterk; for the initial script -- -- SawyerDGamer; some stuff ripped from his panner script -- -- iytgggggg; showing it all into this script and then some :) -- -- UPDATE: turned it into r15, made it so you can swim right in water -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
--// # key, Cruise
mouse.KeyDown:connect(function(key) if key=="b" then veh.Lightbar.middle.Beep:Play() veh.Lightbar.Remotes.CruiseEvent:FireServer(true) end end)
--- Sends an event message to a player
function Command:SendEvent(player, event, ...) assert(typeof(player) == "Instance", "Argument #1 must be a Player") assert(player:IsA("Player"), "Argument #1 must be a Player") assert(type(event) == "string", "Argument #2 must be a string") if IsServer then self.Dispatcher.Cmdr.RemoteEvent:FireClient(player, event, ...) elseif self.Dispatcher.Cmdr.Events[event] then assert(player == Players.LocalPlayer, "Event messages can only be sent to the local player on the client.") self.Dispatcher.Cmdr.Events[event](...) end end
-------- OMG HAX
r = game:service("RunService") local damage = 5 local slash_damage = 12 sword = script.Parent.Handle Tool = script.Parent local SlashSound = Instance.new("Sound") SlashSound.SoundId = "http://www.roblox.com/asset/?id=12814239" SlashSound.Parent = sword SlashSound.Volume = 1 local UnsheathSound = Instance.new("Sound") UnsheathSound.SoundId = "http://www.roblox.com/asset/?id=12813086" UnsheathSound.Parent = sword UnsheathSound.Volume = 1 function blow(hit) local humanoid = hit.Parent:findFirstChild("Humanoid") local vCharacter = Tool.Parent local vPlayer = game.Players:playerFromCharacter(vCharacter) local hum = vCharacter:findFirstChild("Humanoid") -- non-nil if tool held by a character if humanoid~=nil and humanoid ~= hum and hum ~= nil then -- final check, make sure sword is in-hand local right_arm = vCharacter:FindFirstChild("Right Arm") if (right_arm ~= nil) then local joint = right_arm:FindFirstChild("RightGrip") if (joint ~= nil and (joint.Part0 == sword or joint.Part1 == sword)) then tagHumanoid(humanoid, vPlayer) humanoid:TakeDamage(damage) wait(1) untagHumanoid(humanoid) end end end end function tagHumanoid(humanoid, player) local creator_tag = Instance.new("ObjectValue") creator_tag.Value = player creator_tag.Name = "creator" creator_tag.Parent = humanoid end function untagHumanoid(humanoid) if humanoid ~= nil then local tag = humanoid:findFirstChild("creator") if tag ~= nil then tag.Parent = nil end end end function attack() damage = slash_damage SlashSound:play() local anim = Instance.new("StringValue") anim.Name = "toolanim" anim.Value = "Slash" anim.Parent = Tool end function swordUp() Tool.GripForward = Vector3.new(-1,0,0) Tool.GripRight = Vector3.new(0,1,0) Tool.GripUp = Vector3.new(0,0,1) end function swordOut() Tool.GripForward = Vector3.new(0,0,1) Tool.GripRight = Vector3.new(0,-1,0) Tool.GripUp = Vector3.new(-1,0,0) end Tool.Enabled = true function onActivated() if not Tool.Enabled then return end Tool.Enabled = false local character = Tool.Parent; local humanoid = character.Humanoid if humanoid == nil then print("Humanoid not found") return end attack() wait(1) Tool.Enabled = true end function onEquipped() UnsheathSound:play() end script.Parent.Activated:connect(onActivated) script.Parent.Equipped:connect(onEquipped) connection = sword.Touched:connect(blow)
--- Skill
local UIS = game:GetService("UserInputService") local plr = game.Players.LocalPlayer local Mouse = plr:GetMouse() local Debounce = true Player = game.Players.LocalPlayer UIS.InputBegan:Connect(function(Input) if Input.KeyCode == Enum.KeyCode.Z and Debounce == true and Tool.Equip.Value == true and Tool.Active.Value == "None" then Debounce = false Tool.Active.Value = "FireFist" wait(0.1) Track1 = Player.Character.Humanoid:LoadAnimation(script.Anim01) Track1:Play() wait(0.15) script.Fire:FireServer(plr) local hum = Player.Character.Humanoid for i = 1,30 do wait() hum.CameraOffset = Vector3.new( math.random(-1,1), math.random(-1,1), math.random(-1,1) ) end hum.CameraOffset = Vector3.new(0,0,0) wait(0.15) Tool.Active.Value = "None" wait(2) Debounce = true end end)
--[=[ @within Gamepad @prop SupportsVibration boolean @readonly Flag to indicate if the currently-active gamepad supports haptic motor vibration. It is safe to use the motor methods on the gamepad without checking this value, but nothing will happen if the motors are not supported. ]=]
--Update Function
function update() local count = 0 local t = frame.Search.Text local abssizey for _, v in pairs(scroll:GetChildren()) do if v.ClassName=="TextButton" then v.Visible = v.Text:sub(1, t:len()):lower()==t:lower() abssizey=v.AbsoluteSize.Y if v.Visible then count = count + 1 end end end local csize = (count*abssizey) scroll.CanvasSize = UDim2.new(0, 0, 0, csize) end
-- Increase chase speed every specified interval
while true do wait(increaseInterval) increaseChaseSpeed() end
--Make sure the mouse is on the canvas
canvas.MouseEnter:Connect(function() uis.MouseIconEnabled = false cursor.Visible = true local zoom = (workspace.CurrentCamera.CFrame.Position - game.Players.LocalPlayer.Character.Head.Position).Magnitude game.Players.LocalPlayer.CameraMinZoomDistance = zoom game.Players.LocalPlayer.CameraMaxZoomDistance = zoom end) canvas.MouseLeave:Connect(function() uis.MouseIconEnabled = true cursor.Visible = false game.Players.LocalPlayer.CameraMinZoomDistance = 0.5 game.Players.LocalPlayer.CameraMaxZoomDistance = 128 end)
-- Tags --
local pantsId = script.Parent.Parent.Pants.PantsTemplate local shirtId = script.Parent.Parent.Shirt.ShirtTemplate local cPart = script.Parent local cDetector = script.Parent.ProximityPrompt local function onClicked(player) if player.Team.TeamColor == BrickColor.new("Mint")then local foundShirt = player.Character:FindFirstChild("Shirt") -- Tries to find Shirt if not foundShirt then -- if there is no shirt print("No shirt found, creating for "..player.Name) local newShirt = Instance.new("Shirt",player.Character) newShirt.Name = "Shirt" else if foundShirt then -- if there is a shirt print("Shirt found, reconstructing for "..player.Name) player.Character.Shirt:remove() local newShirt = Instance.new("Shirt",player.Character) newShirt.Name = "Shirt" end end local foundPants = player.Character:FindFirstChild("Pants") -- Tries to find Pants if not foundPants then -- if there are no pants print("No pants found, creating for "..player.Name) local newPants = Instance.new("Pants",player.Character) newPants.Name = "Pants" else if foundPants then -- if there are pants print("Pants found, reconstructing for "..player.Name) player.Character.Pants:remove() local newPants = Instance.new("Pants",player.Character) newPants.Name = "Pants" end end player.Character.Shirt.ShirtTemplate = shirtId player.Character.Pants.PantsTemplate = pantsId end end
--|| VARIABLES ||--
local Player = Players.LocalPlayer local Character = script.Parent local Humanoid = Character:WaitForChild"Humanoid" local HumanoidRootPart = Character.HumanoidRootPart local Torso = Character.Torso local RootJoint = HumanoidRootPart.RootJoint local LeftHipJoint = Torso["Left Hip"] local RightHipJoint = Torso["Right Hip"] local function Lerp(a, b, c) return a + (b - a) * c end local Force = nil local Direction = nil local Value1 = 0 local Value2 = 0 local RootJointC0 = RootJoint.C0 local LeftHipJointC0 = LeftHipJoint.C0 local RightHipJointC0 = RightHipJoint.C0 RunService.RenderStepped:Connect(function() --> To get the force, we multiply the velocity by 1,0,1, we don't want the Y value so we set y to 0 Force = HumanoidRootPart.Velocity * Vector3.new(1,0,1) if Force.Magnitude > 2 then --> This represents the direction Direction = Force.Unit Value1 = HumanoidRootPart.CFrame.RightVector:Dot(Direction) Value2 = HumanoidRootPart.CFrame.LookVector:Dot(Direction) else Value1 = 0 Value2 = 0 end --> the values being multiplied are how much you want to rotate by RootJoint.C0 = RootJoint.C0:Lerp(RootJointC0 * CFrame.Angles(math.rad(Value2 * 5), math.rad(-Value1 * 5), 0), 0.2) end)
-- not working --
script.Parent = nil ClockTime = true GeographicLatitude = true FogColor = true Color = 206,255,252 DynamicLighting = true SimulatedShadows = true DarkAmbient = false AmbientBrightness = 1 Fog = true FogDistance = 3000 if Fog then game.Lighting.FogEnd = FogDistance end if DarkAmbient and DynamicLighting then game.Lighting.OutdoorAmbient = Color3.new(AmbientBrightness/255, AmbientBrightness/255, AmbientBrightness/255) end if DynamicLighting then game.Lighting.GlobalShadows = true if SimulatedShadows then game.Lighting.Brightness = 1 game.Lighting.Ambient = Color3.new(0/255, 0/255, 0/255) game.Lighting.ShadowColor = Color3.new(61/255, 61/255, 61/255) end if FogColor then game.Lighting.FogColor = FogColor end if Color then game.Lighting.FogColor = Color end if GeographicLatitude then game.Lighting.GeographicLatitude = 51 end if ClockTime then game.Lighting.ClockTime = 12 end
---- Services
local ReplicatedStorage = game:GetService("ReplicatedStorage") local RunService = game:GetService("RunService") local PlayersService = game:GetService("Players")
--[[ Add a new describe node with the given method as a callback. Generates or reuses all the describe nodes along the path. ]]
function TestPlan:addRoot(path, method, instance) local curNode = self for i = #path, 1, -1 do local nextNode = nil for _, child in ipairs(curNode.children) do if child.phrase == path[i] then nextNode = child break end end if nextNode == nil then local filePath = getFilePathFromInstance(instance) nextNode = curNode:addChild(path[i], TestEnum.NodeType.Describe, nil, filePath) end curNode = nextNode end curNode.isRoot = true curNode.instance = instance curNode.callback = method curNode:expand() end
-- << CONFIGURATION >>
local rankAndBelowToRemove = "Mod" local successColor = Color3.fromRGB(0,255,0) local errorColor = Color3.fromRGB(255,0,0)
--// WebPanel module uploaded as a group model due to there being multiple maintainers --// Module source available at https://www.roblox.com/library/6289861017/WebPanel-Module
return function(Vargs, GetEnv) local env = GetEnv(nil, {script = script}) setfenv(1, env) local server = Vargs.Server; local service = Vargs.Service; local Settings = server.Settings local Functions, Commands, Admin, Anti, Core, HTTP, Logs, Remote, Process, Variables, Deps = server.Functions, server.Commands, server.Admin, server.Anti, server.Core, server.HTTP, server.Logs, server.Remote, server.Process, server.Variables, server.Deps --[[ settings.WebPanel_Enabled = true; wait(1) settings.WebPanel_ApiKey = _G.ADONIS_WEBPANEL_TESTING_APIKEY; --]] --// Note: This will only run/be required if the WebPanel_Enabled setting is true at server startup if Settings.WebPanel_Enabled then local ran, WebModFunc = pcall(require, 6289861017) if ran and type(WebModFunc) == "function" then task.defer(WebModFunc, Vargs, env) elseif not ran then warn("Unexpected error while loading WebPanel!", tostring(WebModFunc)) end end Logs:AddLog("Script", "WebPanel Module Loaded"); end
--// All global vars will be wiped/replaced except script
return function(data, env) if env then setfenv(1, env) end local gui = script.Parent.Parent--client.UI.Prepare(script.Parent.Parent) local frame = gui.Frame local frame2 = frame.Frame local msg = frame2.Message local ttl = frame2.Title local gIndex = data.gIndex local gTable = data.gTable local title = data.Title local message = data.Message local scroll = data.Scroll local tim = data.Time local gone = false if not data.Message or not data.Title then gTable:Destroy() end ttl.Text = title msg.Text = message ttl.TextTransparency = 1 msg.TextTransparency = 1 ttl.TextStrokeTransparency = 1 msg.TextStrokeTransparency = 1 frame.BackgroundTransparency = 1 local log = { Type = "Small Screen Message"; Title = title; Message = message; Icon = "rbxassetid://7501175708"; Time = os.date("%X"); Function = nil; } table.insert(client.Variables.CommunicationsHistory, log) service.Events.CommsPanel:Fire(log) local fadeSteps = 10 local blurSize = 10 local textFade = 0.1 local strokeFade = 0.5 local frameFade = 0.3 local blurStep = blurSize/fadeSteps local frameStep = frameFade/fadeSteps local textStep = 0.1 local strokeStep = 0.1 local function fadeIn() gTable:Ready() for i = 1,fadeSteps do if msg.TextTransparency>textFade then msg.TextTransparency = msg.TextTransparency-textStep ttl.TextTransparency = ttl.TextTransparency-textStep end if msg.TextStrokeTransparency>strokeFade then msg.TextStrokeTransparency = msg.TextStrokeTransparency-strokeStep ttl.TextStrokeTransparency = ttl.TextStrokeTransparency-strokeStep end if frame.BackgroundTransparency>frameFade then frame.BackgroundTransparency = frame.BackgroundTransparency-frameStep frame2.BackgroundTransparency = frame.BackgroundTransparency end service.Wait("Stepped") end end local function fadeOut() if not gone then gone = true for i = 1,fadeSteps do if msg.TextTransparency<1 then msg.TextTransparency = msg.TextTransparency+textStep ttl.TextTransparency = ttl.TextTransparency+textStep end if msg.TextStrokeTransparency<1 then msg.TextStrokeTransparency = msg.TextStrokeTransparency+strokeStep ttl.TextStrokeTransparency = ttl.TextStrokeTransparency+strokeStep end if frame.BackgroundTransparency<1 then frame.BackgroundTransparency = frame.BackgroundTransparency+frameStep frame2.BackgroundTransparency = frame.BackgroundTransparency end service.Wait("Stepped") end service.UnWrap(gui):Destroy() end end gTable.CustomDestroy = function() fadeOut() end fadeIn() if not tim then local _,time = message:gsub(" ","") time = math.clamp(time/2,4,11)+1 wait(time) else wait(tim) end if not gone then fadeOut() end end