Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local plr = game.Players.LocalPlayer
- wait()
- local UIS = game:GetService("UserInputService")
- local CAS = game:GetService("ContextActionService")
- local RS = game:GetService("ReplicatedStorage")
- local plr = game.Players.LocalPlayer
- local char = plr.Character
- if not char or not char.Parent then
- char = plr.CharacterAdded:wait()
- end
- local WallRotation = 0
- local pushforce = Vector3.new(0, 0, 0)
- local Power = "Spiderman"
- local Mode = "Idle"
- local auto = true
- local CanWallclimb = false
- local NormalVector = Vector3.new(1, 0, 0)
- local AtkDebounce = false
- local UltDebounce = false
- local UltAtkDebounce = false
- local UltActive = false
- local interaction
- local ThumbstickDir = math.pi / 2
- local input = {}
- local humanoid = char:WaitForChild("Humanoid")
- local Defaultanim = Instance.new("Animation")
- local charlist = {}
- Defaultanim.AnimationId = "rbxassetid://1021993937"
- local DefaultPlay = humanoid:LoadAnimation(Defaultanim)
- local Atkanim = Instance.new("Animation")
- Atkanim.AnimationId = "rbxassetid://1008473434"
- local Atkplay2 = humanoid:LoadAnimation(Atkanim)
- local OnMobile = _G.OnMobile
- local OnConsole = _G.OnConsole
- _G.isInteracting = false
- local m = plr:GetMouse()
- local list = {}
- local Stamina = 100
- for _, v in pairs(workspace.OnomatopoeiaParts:GetChildren()) do
- v:destroy()
- end
- local OriginalEnviromentPosition = {}
- local CreateInstance = function(classname, info)
- local instance = Instance.new(classname)
- for i, v in pairs(info) do
- instance[i] = v
- end
- return instance
- end
- local resetBindable = Instance.new("BindableEvent")
- resetBindable.Event:connect(function()
- CAS:UnbindAction("Activate ULT")
- CAS:UnbindAction("WebSwing")
- CAS:UnbindAction("WallClimb")
- game.ReplicatedStorage.RemoteEvents.Reset:FireServer(Power)
- end)
- local attemptnr = 0
- local function Reset()
- if attemptnr < 100 then
- local success = pcall(function()
- game:GetService("StarterGui"):SetCore("ResetButtonCallback", resetBindable)
- end)
- if success == false then
- attemptnr = attemptnr + 1
- game:GetService("RunService").RenderStepped:wait()
- Reset()
- end
- else
- end
- end
- coroutine.resume(coroutine.create(function()
- Reset()
- end))
- function AutoAim(arm)
- local floor, floorpos = workspace:FindPartOnRayWithIgnoreList(Ray.new(char.HumanoidRootPart.Position, Vector3.new(0, -1000, 0)), charlist)
- if floor == nil then
- floorpos = Vector3.new(char.HumanoidRootPart.Position.X, 10, char.HumanoidRootPart.Position.Z)
- end
- local floorpos = floorpos + Vector3.new(0, 100, 0)
- local direction = CFrame.new(floorpos, floorpos + Vector3.new(workspace.CurrentCamera.CFrame.lookVector.X, 0, workspace.CurrentCamera.CFrame.lookVector.Z))
- if pushforce.magnitude < 0.2 then
- direction = CFrame.new(workspace.CurrentCamera.CFrame.p.X, floorpos.Y, workspace.CurrentCamera.CFrame.p.Z)
- end
- local fortegn = 1
- if arm == "RightHand" then
- fortegn = -1
- end
- local offset = 0
- local wall, wallpos
- repeat
- offset = offset + 1
- local dir = direction * CFrame.Angles(0, fortegn * math.pi / 50 * offset, 0)
- wall, wallpos = workspace:FindPartOnRayWithIgnoreList(Ray.new(direction.p, dir.lookVector * 225), charlist)
- if wall ~= nil and wall.Transparency == 1 then
- wall = nil
- end
- until offset >= 30 or wall ~= nil
- if wall ~= nil then
- return wall, Vector3.new(wallpos.X, wall.Position.Y + wall.Size.Y / 2 - 1, wallpos.Z)
- end
- end
- function RayFunction(origin, direction, startpoint, part)
- local point = origin + direction + CFrame.new(Vector3.new(0, 0, 0), direction):pointToWorldSpace(Vector3.new(math.random(1, 18) / 10 - 0.9, math.random(1, 18) / 10 - 0.9, 0))
- local part = part
- if part then
- if part:FindFirstChild("Mesh") then
- part.CFrame = CFrame.new(startpoint + (point - startpoint) / 2, point)
- part.Mesh.Scale = Vector3.new(0.2, 0.2, point - startpoint.magnitude)
- end
- else
- part = Instance.new("Part")
- local mesh = Instance.new("BlockMesh", part)
- mesh.Scale = Vector3.new(0.2, 0.2, point - startpoint.magnitude)
- part.Size = Vector3.new(1, 1, 1)
- part.CFrame = CFrame.new(startpoint + (point - startpoint) / 2, point)
- part.Anchored = true
- part.Material = "Neon"
- part.BrickColor = BrickColor.new("Pastel violet")
- part.CanCollide = false
- part.Parent = char
- end
- return point, part
- end
- function RayHit(part, position, direction)
- local depth = math.random(1, 10)
- local x = math.random(1, 30)
- local onopos = CFrame.new(position, position - direction):toWorldSpace(CFrame.new(4 * math.cos(2 * x * math.pi / 30), 2 * math.sin(2 * x * math.pi / 30) + 1, -depth / 10 - 0.5))
- Onomatopoeia("Zap!", onopos)
- end
- function FireRay(origin, direction, chr)
- local tid = tick()
- local origtid = tick()
- local part
- local offset1 = origin
- local offset2 = origin
- local offset3 = origin
- local part1, part2, part3, position
- repeat
- game:GetService("RunService").Stepped:wait()
- game:GetService("RunService").Stepped:wait()
- local delta = tick() - tid
- tid = tick()
- local ray = Ray.new(origin, direction * delta)
- part, position = workspace:FindPartOnRayWithIgnoreList(ray, {
- chr,
- workspace.Triggers
- })
- offset1, part1 = RayFunction(origin, direction * delta, offset1, part1)
- offset3, part3 = RayFunction(origin, direction * delta, offset1, part3)
- offset2, part2 = RayFunction(origin, direction * delta, offset2, part2)
- origin = origin + direction * delta
- until part or tick() - origtid > 2
- if part then
- RayHit(part, position, direction)
- end
- part1:destroy()
- part2:destroy()
- part3:destroy()
- return part
- end
- function ChargeRay(chr, target)
- local tid = tick()
- local origtid = tick()
- local rightA = target - chr.RightHand.Position.magnitude
- local leftA = target - chr.LeftHand.Position.magnitude
- local left1 = {}
- local left2 = {}
- local right1 = {}
- local right2 = {}
- for i = 1, math.ceil(leftA / 7) + 1 do
- left1[i] = {
- offset = chr.LeftHand.Position
- }
- left2[i] = {
- offset = chr.LeftHand.Position
- }
- end
- for i = 1, math.ceil(rightA / 7) + 1 do
- right1[i] = {
- offset = chr.RightHand.Position
- }
- right2[i] = {
- offset = chr.RightHand.Position
- }
- end
- repeat
- game:GetService("RunService").Stepped:wait()
- game:GetService("RunService").Stepped:wait()
- local rightdirection = target - chr.RightHand.Position
- local leftdirection = target - chr.LeftHand.Position
- right1[1].offset = chr.RightHand.Position
- left1[1].offset = chr.LeftHand.Position
- right2[1].offset = chr.RightHand.Position
- left2[1].offset = chr.LeftHand.Position
- for i = 1, math.ceil(rightdirection.magnitude / 7) do
- local length = 7
- if 7 > chr.RightHand.Position + rightdirection.unit * 7 * (i - 1) - target.magnitude then
- length = chr.RightHand.Position + rightdirection.unit * 7 * (i - 1) - target.magnitude
- end
- local holder
- holder, right1[i].part = RayFunction(chr.RightHand.Position + rightdirection.unit * 7 * (i - 1), rightdirection.unit * length, right1[i].offset, right1[i].part)
- if right1[i + 1] then
- right1[i + 1].offset = holder
- end
- holder, right2[i].part = RayFunction(chr.RightHand.Position + rightdirection.unit * 7 * (i - 1), rightdirection.unit * length, right2[i].offset, right2[i].part)
- if right2[i + 1] then
- right2[i + 1].offset = holder
- end
- holder, left1[i].part = RayFunction(chr.LeftHand.Position + leftdirection.unit * 7 * (i - 1), leftdirection.unit * length, left1[i].offset, left1[i].part)
- if left1[i + 1] then
- left1[i + 1].offset = holder
- end
- holder, left2[i].part = RayFunction(chr.LeftHand.Position + leftdirection.unit * 7 * (i - 1), leftdirection.unit * length, left2[i].offset, left2[i].part)
- if left2[i + 1] then
- left2[i + 1].offset = holder
- end
- end
- until chr.HumanoidRootPart:FindFirstChild("ElectricGyro") == nil
- for i = 1, math.ceil(leftA / 7) + 1 do
- if left1[i].part ~= nil then
- left1[i].part:destroy()
- left2[i].part:destroy()
- end
- end
- for i = 1, math.ceil(rightA / 7) + 1 do
- if right1[i].part ~= nil then
- right1[i].part:destroy()
- right2[i].part:destroy()
- end
- end
- left1, left2, right1, right2 = nil, nil, nil, nil
- end
- function UltimateRay(chr)
- local tid = tick()
- local origtid = tick()
- local opponents = {}
- repeat
- game:GetService("RunService").Stepped:wait()
- game:GetService("RunService").Stepped:wait()
- for _, v in pairs(workspace.NPCs:GetChildren()) do
- local direction = v.HumanoidRootPart.Position - chr.UpperTorso.Position
- if direction.magnitude < 21 then
- if opponents[v] == nil then
- opponents[v] = {}
- for q = 1, 2 do
- opponents[v][q] = {
- part = {},
- offset = {}
- }
- end
- end
- for q = 1, 2 do
- opponents[v][q].offset[1] = chr.UpperTorso.Position
- for i = 1, math.ceil(direction.magnitude / 7) do
- local length = 7
- if 7 > chr.UpperTorso.Position + direction.unit * 7 * (i - 1) - v.HumanoidRootPart.Position.magnitude then
- length = chr.UpperTorso.Position + direction.unit * 7 * (i - 1) - v.HumanoidRootPart.Position.magnitude
- end
- local holder
- holder, opponents[v][q].part[i] = RayFunction(chr.UpperTorso.Position + direction.unit * 7 * (i - 1), direction.unit * length, opponents[v][q].offset[i], opponents[v][q].part[i])
- if i < math.ceil(direction.magnitude / 7) then
- opponents[v][q].offset[i + 1] = holder
- elseif opponents[v][q].part[i + 1] then
- opponents[v][q].part[i + 1]:destroy()
- opponents[v][q].offset[i + 1] = nil
- end
- end
- end
- elseif opponents[v] then
- for q = 1, 2 do
- for _, x in pairs(opponents[v][q].part) do
- x:destroy()
- end
- end
- opponents[v] = nil
- end
- end
- until tick() - tid >= 10
- for _, v in pairs(opponents) do
- for q = 1, 2 do
- for _, x in pairs(v[q].part) do
- x:destroy()
- end
- end
- end
- opponents = nil
- end
- function FindShortestDistance(point1, point2, offsetpoint)
- local v = point2 - point1
- local sin = v.unit:Cross(offsetpoint - point1.unit).magnitude
- local cos = v.unit * offsetpoint - point1.unit.magnitude
- return math.abs(sin * offsetpoint - point1.magnitude), cos, v.unit:Dot(offsetpoint - point1.unit)
- end
- function Onomatopoeia(name, pos, f, variable)
- coroutine.resume(coroutine.create(function()
- local part = game.ReplicatedStorage.Onomatopoetikon:clone()
- local gui = part.BillboardGui
- gui.ImageLabel.Image = "rbxgameasset://Images/" .. name
- part.Name = name
- part.CFrame = pos
- part.Parent = workspace.OnomatopoeiaParts
- local tid = tick()
- repeat
- local size = (tick() - tid) / 0.2 * 5
- gui.Size = UDim2.new(size, 0, size, 0)
- game:GetService("RunService").RenderStepped:wait()
- until tick() - tid >= 0.2
- tid = tick()
- repeat
- local size = 5 + math.sin(5 * math.pi * (tick() - tid) / 0.2)
- gui.Size = UDim2.new(size, 0, size, 0)
- game:GetService("RunService").RenderStepped:wait()
- until tick() - tid >= 0.2
- tid = tick()
- repeat
- local size = 5 - (tick() - tid) / 0.2 * 5
- gui.Size = UDim2.new(size, 0, size, 0)
- game:GetService("RunService").RenderStepped:wait()
- until tick() - tid >= 0.2
- part:destroy()
- end))
- end
- game.ReplicatedStorage.RemoteEvents.Onomatopoeia.OnClientEvent:connect(function(name, pos, f, variable)
- Onomatopoeia(name, pos, f, variable)
- end)
- function RayCheck(origin, direction)
- local hit
- local ray = Ray.new(origin, direction)
- local ignorelist = {}
- for _, v in pairs(game.Players:GetPlayers()) do
- table.insert(ignorelist, v.Character)
- end
- local part, position = workspace:FindPartOnRayWithIgnoreList(ray, ignorelist)
- if part and part.Transparency < 1 then
- hit = position
- end
- return part, position
- end
- local function EndWallClimb()
- char.Humanoid.AutoRotate = true
- char.HumanoidRootPart.Anchored = false
- end
- local function TransitionSurface(origcframe, newcframe)
- local origtid = tick()
- local tid = tick()
- repeat
- game:GetService("RunService").Heartbeat:wait()
- char.HumanoidRootPart.CFrame = origcframe:lerp(newcframe, (tick() - origtid) / 0.5)
- until tick() - origtid >= 0.5
- end
- local function WallClimb()
- local wall, position = workspace:FindPartOnRayWithIgnoreList(Ray.new(char.HumanoidRootPart.CFrame.p, -NormalVector * 15), charlist)
- if char.RightHand:FindFirstChild("RightHandForce") or char.LeftHand:FindFirstChild("LeftHandForce") then
- if char.LeftHand:FindFirstChild("LeftHandForce") then
- EndWebsling(char.LeftHand)
- end
- if char.RightHand:FindFirstChild("RightHandForce") then
- EndWebsling(char.RightHand)
- end
- wait()
- end
- if wall and Mode ~= "WallClimbing" and NormalVector:Dot(Vector3.new(0, 1, 0)) < 0.3 then
- local Wallclimbanim = Instance.new("Animation")
- Wallclimbanim.AnimationId = "rbxassetid://1034576967"
- local Wallclimbtrack = humanoid:LoadAnimation(Wallclimbanim)
- Wallclimbtrack:Play(0.1, 1, 0)
- Mode = "WallClimbing"
- char.HumanoidRootPart.Velocity = Vector3.new(0, 0, 0)
- char.HumanoidRootPart.Anchored = true
- char.Humanoid.AutoRotate = false
- char.HumanoidRootPart.CFrame = CFrame.new(position + NormalVector * 0.75 + Vector3.new(0, 1, 0), position + Vector3.new(0, 1, 0))
- local transition = false
- local tid = tick()
- local timeincrement = tick()
- repeat
- game:GetService("RunService").Heartbeat:wait()
- if transition == false then
- local delta = tick() - tid
- game.ReplicatedStorage.RemoteEvents.Spiderman:FireServer("WallClimbing", char.HumanoidRootPart.CFrame)
- Wallclimbtrack:AdjustSpeed(pushforce.Z)
- char.HumanoidRootPart.CFrame = (char.HumanoidRootPart.CFrame + char.HumanoidRootPart.CFrame.upVector * pushforce.Z * 14 * delta) * CFrame.Angles(0, 0, -math.pi * pushforce.X * delta)
- WallRotation = (WallRotation - math.pi * pushforce.X * delta) % (2 * math.pi)
- if math.abs(pushforce.Z) > 0.5 then
- local roof, roofpos, roofsurface = workspace:FindPartOnRayWithIgnoreList(Ray.new(char.HumanoidRootPart.CFrame.p, char.HumanoidRootPart.CFrame.upVector * pushforce.Z * 3), charlist)
- if roof == nil or roof ~= nil and roof.Transparency == 1 then
- local Wall, Wallpos, Wallsurface = workspace:FindPartOnRayWithIgnoreList(Ray.new(char.HumanoidRootPart.CFrame.p + char.HumanoidRootPart.CFrame.upVector * pushforce.Z * 3, -NormalVector * 2), charlist)
- if Wall == nil or Wall ~= nil and Wall.Transparency == 1 then
- local floor, pos, surface = workspace:FindPartOnRayWithIgnoreList(Ray.new(char.HumanoidRootPart.CFrame.p + char.HumanoidRootPart.CFrame.upVector * pushforce.Z * 3 - NormalVector * 3, -char.HumanoidRootPart.CFrame.upVector * pushforce.Z * 5), charlist)
- if surface:Dot(Vector3.new(0, 1, 0)) > 0.3 then
- Mode = "Idle"
- char.HumanoidRootPart.Velocity = Vector3.new(0, 100, 0)
- else
- transition = true
- TransitionSurface(char.HumanoidRootPart.CFrame, CFrame.new(pos + surface * 0.75, pos) * CFrame.Angles(0, 0, WallRotation))
- transition = false
- end
- end
- elseif roofsurface:Dot(Vector3.new(0, 1, 0)) > 0.3 then
- Mode = "Idle"
- else
- transition = true
- TransitionSurface(char.HumanoidRootPart.CFrame, CFrame.new(roofpos + roofsurface * 0.75, roofpos) * CFrame.Angles(0, 0, -WallRotation))
- transition = false
- end
- end
- end
- tid = tick()
- until Mode ~= "WallClimbing"
- game.ReplicatedStorage.RemoteEvents.Spiderman:FireServer("EndWallClimbing")
- Wallclimbtrack:Stop()
- Wallclimbtrack:destroy()
- EndWallClimb()
- end
- end
- local weblist = {}
- local function CreateWeb(character, target, armname, length)
- local arm = character[armname]
- local webpart = Instance.new("Part")
- webpart.Name = arm.Name .. "WebPart"
- webpart.Transparency = 1
- webpart.CanCollide = false
- webpart.Size = Vector3.new(0.2, 0.2, 0.2)
- webpart.Anchored = true
- webpart.Parent = character
- local webpart2 = Instance.new("Part")
- webpart2.Name = arm.Name .. "WebPart2"
- webpart2.Transparency = 1
- webpart2.CanCollide = false
- webpart2.Size = Vector3.new(0.2, 0.2, 0.2)
- webpart2.Anchored = true
- webpart2.CFrame = CFrame.new(target)
- webpart2.Parent = character
- local attachment2 = Instance.new("Attachment", webpart)
- if weblist[character] == nil then
- weblist[character] = {}
- end
- weblist[character][armname] = 1
- attachment2.Name = "WebAttachment"
- local attachment3 = Instance.new("Attachment", webpart2)
- attachment3.Name = "WebAttachment"
- local web = Instance.new("RopeConstraint", webpart)
- web.Color = BrickColor.new("Institutional white")
- web.Attachment0 = attachment2
- web.Attachment1 = attachment3
- web.Visible = true
- repeat
- game:GetService("RunService").Heartbeat:wait()
- webpart.CFrame = arm.CFrame
- until character.Parent ~= workspace or weblist[character] == nil or weblist[character][armname] == nil
- if webpart ~= nil then
- web:destroy()
- webpart:destroy()
- webpart2:destroy()
- print("Destroy part")
- end
- end
- local function RemoveWeb(character, arm)
- if weblist[character] then
- weblist[character][arm] = nil
- end
- end
- game.ReplicatedStorage.RemoteEvents.Spiderman.OnClientEvent:connect(function(mode, plr, armname, target, length)
- print(mode)
- if mode == "SwingStart" then
- CreateWeb(plr.Character, target, armname, length)
- elseif mode == "SwingEnd" then
- RemoveWeb(plr.Character, armname)
- elseif mode == "WallClimbing" then
- plr.Character.HumanoidRootPart.Anchored = true
- plr.Character.HumanoidRootPart.CFrame = armname
- elseif mode == "EndWallClimbing" then
- wait()
- plr.Character.HumanoidRootPart.Anchored = false
- end
- end)
- local function WebSling(arm, target)
- if Mode ~= "Fighting" then
- do
- local distance = 0
- local asda
- if auto == true then
- asda, target = AutoAim(arm.Name)
- end
- local direction = target - arm.Position.unit * 800
- local hit, pos
- Mode = "Slinging"
- local swinganim = Instance.new("Animation")
- swinganim.AnimationId = "rbxassetid://1040609459"
- local swingtrack = humanoid:LoadAnimation(swinganim)
- local swingendanim = Instance.new("Animation")
- swingendanim.AnimationId = "rbxassetid://1040639592"
- local swingendtrack = humanoid:LoadAnimation(swingendanim)
- local oldorigin = arm.Position
- local origin = arm.Position
- local tid = tick()
- local origtid = tick()
- local audio = CreateInstance("Sound", {
- Name = "WebSound",
- SoundId = "rbxassetid://1054823746"
- })
- audio.Parent = game.Soundscape
- audio:Play()
- coroutine.resume(coroutine.create(function()
- wait(2)
- audio:Stop()
- audio:destroy()
- end))
- local webpart = Instance.new("Part")
- webpart.Name = arm.Name .. "WebPart"
- webpart.Transparency = 1
- webpart.CanCollide = false
- webpart.Size = Vector3.new(0.2, 0.2, 0.2)
- webpart.Anchored = true
- webpart.Parent = workspace
- local webpart2 = Instance.new("Part")
- webpart2.Name = arm.Name .. "WebPart2"
- webpart2.Transparency = 1
- webpart2.CanCollide = false
- webpart2.Size = Vector3.new(0.2, 0.2, 0.2)
- webpart2.Anchored = true
- webpart2.Parent = workspace
- local attachment2 = Instance.new("Attachment", webpart)
- attachment2.Name = "WebAttachment"
- local attachment3 = Instance.new("Attachment", webpart2)
- attachment3.Name = "WebAttachment"
- local length = 0.2
- local web = Instance.new("RopeConstraint", webpart)
- web.Color = BrickColor.new("Institutional white")
- web.Length = webpart.Position - webpart2.Position.magnitude
- web.Attachment0 = attachment2
- web.Attachment1 = attachment3
- web.Visible = true
- repeat
- game:GetService("RunService").Heartbeat:wait()
- local delta = tick() - tid
- hit, pos = RayCheck(origin, direction * delta)
- origin = origin + direction * delta
- webpart.CFrame = arm.CFrame
- webpart2.CFrame = CFrame.new(origin)
- web.Length = oldorigin - webpart2.Position.magnitude
- if hit ~= nil and hit.Transparency == 1 then
- hit = nil
- end
- tid = tick()
- until tick() - origtid > 0.75 or hit ~= nil
- webpart2:destroy()
- if hit and webpart.Parent == workspace and Mode ~= "WallClimbing" then
- local distToGround = pos.Y
- if distToGround < 40 then
- distToGround = 40
- end
- swingtrack:Play(0.1, 1, 0)
- length = pos - oldorigin.magnitude
- local attachment0 = Instance.new("Attachment", arm)
- attachment0.Name = "WebAttachment"
- local attachment1 = Instance.new("Attachment", hit)
- attachment1.Position = hit.CFrame:pointToObjectSpace(pos)
- web.Attachment1 = attachment1
- if length > distToGround - 30 then
- length = (distToGround - 30) * 1.2
- end
- web.Length = length / 1.2
- game.ReplicatedStorage.RemoteEvents.Spiderman:FireServer("SwingStart", arm.Name, pos, length / 1.2)
- local gyro = CreateInstance("BodyGyro", {
- Name = arm.Name .. "Gyro",
- CFrame = CFrame.new(Vector3.new(char.HumanoidRootPart.Position.X, 0, char.HumanoidRootPart.Position.Z), Vector3.new(pos.X, 0, pos.Z)),
- P = 5000,
- D = 500,
- MaxTorque = Vector3.new(10000000000, 1000000000, 100000000),
- Parent = char.HumanoidRootPart
- })
- local vectorforce = Instance.new("VectorForce")
- vectorforce.Attachment0 = attachment0
- vectorforce.Enabled = false
- vectorforce.Name = arm.Name .. "Force"
- vectorforce.RelativeTo = "World"
- vectorforce.Parent = arm
- local pushvectorforce = Instance.new("VectorForce")
- pushvectorforce.Attachment0 = char.HumanoidRootPart.RootRigAttachment
- pushvectorforce.Enabled = true
- pushvectorforce.Name = "PushForce"
- pushvectorforce.RelativeTo = "World"
- pushvectorforce.Parent = char.HumanoidRootPart
- coroutine.resume(coroutine.create(function()
- repeat
- game:GetService("RunService").Heartbeat:wait()
- humanoid:ChangeState(Enum.HumanoidStateType.Physics)
- if arm.Position - pos.magnitude > length / 1.2 then
- vectorforce.Force = pos - arm.Position.unit * 50000 * (1 - pos - arm.Position.unit:Dot(char.HumanoidRootPart.Velocity.unit)) * (arm.Position - pos.magnitude - length / 1.2) / 25
- vectorforce.Enabled = true
- else
- vectorforce.Enabled = false
- end
- webpart.CFrame = arm.CFrame
- local lookatpoint = CFrame.new(arm.Position, pos)
- local cframe = CFrame.new(Vector3.new(0, 0, 0), -lookatpoint.upVector) + arm.Position
- local atan1 = math.atan2(char.HumanoidRootPart.Velocity.Z, char.HumanoidRootPart.Velocity.X)
- local atan2 = math.atan2(cframe.lookVector.Z, cframe.lookVector.X)
- local LookingCFrame = cframe * CFrame.Angles(0, atan2 - atan1, 0)
- if pushforce.magnitude > 0.5 then
- local atan1 = math.atan2(workspace.CurrentCamera.CFrame.lookVector.Z, workspace.CurrentCamera.CFrame.lookVector.X)
- local LookingCFrame = cframe * CFrame.Angles(0, atan2 - atan1, 0)
- pushvectorforce.Force = LookingCFrame:pointToWorldSpace(Vector3.new(pushforce.X, pushforce.Y, -pushforce.Z)) - LookingCFrame.p.unit * 3000
- else
- pushvectorforce.Force = Vector3.new(0, 0, 0)
- end
- gyro.CFrame = LookingCFrame
- local timestep = char.HumanoidRootPart.Velocity.unit.Y
- if char.HumanoidRootPart.Velocity.unit.Y < -0.45 then
- timestep = -0.45
- elseif char.HumanoidRootPart.Velocity.unit.Y > 0.45 then
- timestep = 0.45
- end
- if timestep - (swingtrack.TimePosition - 0.5) > 0.15 then
- timestep = swingtrack.TimePosition - 0.5 + 0.15
- elseif timestep - (swingtrack.TimePosition - 0.5) < -0.15 then
- timestep = swingtrack.TimePosition - 0.5 - 0.15
- end
- swingtrack.TimePosition = 0.5 + timestep
- until vectorforce.Parent ~= arm
- game.ReplicatedStorage.RemoteEvents.Spiderman:FireServer("SwingEnd", arm.Name)
- swingtrack:Stop()
- swingtrack:destroy()
- if swingtrack.TimePosition > 0.925 then
- local oppositearm = char.RightHand
- if arm.Name == "RightHand" then
- oppositearm = char.LeftHand
- end
- if oppositearm:FindFirstChild(oppositearm.Name .. "Force") == nil then
- swingendtrack:Play(0.1)
- wait(0.25)
- swingendtrack:Stop(0.6)
- swingendtrack:destroy()
- end
- end
- end))
- end
- end
- end
- end
- function EndWebsling(arm)
- local oppositearm = char.RightHand
- if arm.Name == "RightHand" then
- oppositearm = char.LeftHand
- end
- if oppositearm:FindFirstChild(oppositearm.Name .. "Force") == nil and Mode ~= "WallClimbing" then
- Mode = "Idle"
- print(Mode)
- end
- if arm:FindFirstChild("WebAttachment") then
- arm:FindFirstChild(arm.Name .. "Force"):destroy()
- arm.WebAttachment:Destroy()
- end
- workspace[arm.Name .. "WebPart"]:destroy()
- if char.HumanoidRootPart:FindFirstChild(arm.Name .. "Gyro") then
- char.HumanoidRootPart:FindFirstChild(arm.Name .. "Gyro"):destroy()
- char.HumanoidRootPart:FindFirstChild("PushForce"):destroy()
- end
- end
- local function DefaultAttack(point)
- print("Punching!")
- if Mode == "Idle" and AtkDebounce == false and interaction == nil then
- Mode = "Fighting"
- local target = point
- AtkDebounce = true
- local gyro
- local targetnum = 10
- local targetmob
- local anim = Instance.new("Animation")
- local num = math.random(1, 3)
- local position
- local waittime = 0.4
- local speed = 1.75
- if num == 1 then
- anim.AnimationId = "rbxassetid://1044296535"
- elseif num == 2 then
- waittime = 0.5
- anim.AnimationId = "rbxassetid://1044347256"
- speed = 1.75
- else
- anim.AnimationId = "rbxassetid://1044505610"
- waittime = 0.5
- speed = 1
- end
- local play = char.Humanoid:LoadAnimation(anim)
- play:Play(0.1, 1, speed)
- local humanoid = char:WaitForChild("Humanoid")
- target = char.HumanoidRootPart.Position + char.HumanoidRootPart.CFrame.lookVector * 18
- for _, v in pairs(workspace.NPCs:GetChildren()) do
- if v.ClassName == "Model" and v:FindFirstChild("Humanoid") and v.Humanoid.Health > 0 then
- local distance
- if point == nil then
- local sin, cos = FindShortestDistance(char.HumanoidRootPart.Position, char.HumanoidRootPart.Position + char.HumanoidRootPart.CFrame.lookVector, v.HumanoidRootPart.Position)
- if v.HumanoidRootPart.Position - (char.HumanoidRootPart.Position + workspace.CurrentCamera.CFrame * CFrame.Angles(0, ThumbstickDir - math.pi / 2, 0).lookVector * cos).magnitude < v.HumanoidRootPart.Position - char.HumanoidRootPart.Position.magnitude then
- distance = sin
- else
- distance = 9999
- end
- else
- distance = FindShortestDistance(char.HumanoidRootPart.Position, char.HumanoidRootPart.Position + char.HumanoidRootPart.CFrame.lookVector, v.HumanoidRootPart.Position)
- end
- local bull, sht, cos = FindShortestDistance(char.HumanoidRootPart.CFrame.p, char.HumanoidRootPart.CFrame.p + char.HumanoidRootPart.CFrame.lookVector * 10, v.HumanoidRootPart.Position)
- print("Cos: " .. cos)
- if targetnum > distance and cos ~= nil and cos > 0.1 and v.HumanoidRootPart.Position - char.HumanoidRootPart.Position.magnitude < 15 then
- targetnum = distance
- targetmob = v
- end
- end
- end
- char.HumanoidRootPart.Punch.PlaybackSpeed = 1 + math.random() * 1
- char.HumanoidRootPart.Punch.Volume = 0.75
- char.HumanoidRootPart.Punch:Play()
- humanoid.AutoRotate = false
- if targetmob ~= nil then
- print("Heeeeyee")
- local ononum = math.random(1, 3)
- local ononame = "Pow!"
- local x = math.random(1, 30)
- local depth = math.random(1, 10)
- local onopos = CFrame.new(targetmob.HumanoidRootPart.Position, char.HumanoidRootPart.Position):toWorldSpace(CFrame.new(4 * math.cos(2 * x * math.pi / 30), 2 * math.sin(2 * x * math.pi / 30) + 1, -depth / 10 - 0.5))
- if ononum == 1 then
- ononame = "Bam!"
- elseif ononum == 3 then
- ononame = "Wham!"
- end
- Onomatopoeia(ononame, onopos)
- game.ReplicatedStorage.RemoteEvents.Spiderman:FireServer("DefaultAttack", {
- target = targetmob,
- name = ononame,
- pos = onopos,
- animnum = num
- })
- end
- wait(waittime)
- AtkDebounce = false
- Mode = "Idle"
- humanoid.WalkSpeed = 16
- humanoid.AutoRotate = true
- end
- end
- local function UltimateActivate()
- if UltActive == false and interaction == nil and (_G.lastUlt == nil or _G.lastUlt ~= nil and tick() - _G.lastUlt > 30) then
- UltActive = true
- UltDebounce = true
- print("ActivateUlt")
- local humanoid = char:WaitForChild("Humanoid")
- local num = 1
- local anim = Instance.new("Animation")
- anim.AnimationId = "rbxassetid://1046029730"
- local play = humanoid:LoadAnimation(anim)
- local anim = Instance.new("Animation")
- anim.AnimationId = "rbxassetid://1046143909"
- local play2 = humanoid:LoadAnimation(anim)
- local walkspeed = humanoid.WalkSpeed
- _G.lastUlt = tick()
- humanoid.WalkSpeed = 0
- humanoid.AutoRotate = false
- local tid = tick()
- local gyro = CreateInstance("BodyGyro", {
- P = 10000000000000000,
- D = 100000000,
- MaxTorque = Vector3.new(20000, 20000, 20000),
- Parent = char.HumanoidRootPart
- })
- local targetted = 0
- local p = workspace.CurrentCamera.CFrame.p
- for _, v in pairs(workspace.NPCs:GetChildren()) do
- if v.HumanoidRootPart.Position - char.HumanoidRootPart.Position.magnitude < 40 and targetted < 9 and v.Torso:FindFirstChild("WebDecal") == nil then
- targetted = targetted + 1
- do
- local shot = game.ReplicatedStorage.WebShot:clone()
- local charcframe = char.HumanoidRootPart.CFrame.p
- local vcframe = v.HumanoidRootPart.CFrame.p
- gyro.CFrame = CFrame.new(Vector3.new(charcframe.X, 0, charcframe.Z), Vector3.new(vcframe.X, 0, vcframe.Z))
- local arm = char.RightHand
- if targetted % 2 == 0 then
- arm = char.LeftHand
- play2:Stop()
- play:Play()
- else
- play:Stop()
- play2:Play()
- end
- wait(0.2)
- local audio = CreateInstance("Sound", {
- Name = "WebSound",
- SoundId = "rbxassetid://1054823746"
- })
- audio.Parent = game.Soundscape
- audio:Play()
- coroutine.resume(coroutine.create(function()
- wait(2)
- audio:Stop()
- audio:destroy()
- end))
- shot.CFrame = arm.CFrame + Vector3.new(0, 0.25, 0)
- local dir = v.HumanoidRootPart.Position - shot.CFrame.p
- shot.Parent = workspace
- coroutine.resume(coroutine.create(function()
- local tic = tick()
- local tid = tick()
- repeat
- game:GetService("RunService").Heartbeat:wait()
- local delta = tick() - tid
- if 300 * delta < shot.CFrame.p - v.HumanoidRootPart.Position.magnitude then
- shot.CFrame = shot.CFrame + dir.unit * 300 * delta
- else
- shot.CFrame = shot.CFrame + dir.unit * shot.CFrame.p - v.HumanoidRootPart.Position.magnitude
- end
- tid = tick()
- until (tick() - tic) * 300 > dir.magnitude or shot.Parent ~= workspace
- wait(1)
- shot:destroy()
- end))
- wait(0.25)
- game.ReplicatedStorage.RemoteEvents.Spiderman:FireServer("StuckEnemy", v)
- end
- end
- end
- gyro:destroy()
- humanoid.WalkSpeed = 16
- humanoid.AutoRotate = true
- wait(10 - (tick() - tid))
- UltDebounce = false
- play2 = nil
- wait(20)
- UltActive = false
- end
- end
- local EnviromentInteraction = function()
- end
- function CheckInteractables()
- end
- UIS.TouchTap:connect(function(list, chatting)
- if chatting == false then
- DefaultAttack()
- end
- end)
- UIS.InputChanged:connect(function(key, processed)
- if key.KeyCode == Enum.KeyCode.Thumbstick1 then
- if key.Position.magnitude > 0.25 then
- local dir = math.atan2(key.Position.Y, key.Position.X) % (math.pi * 2)
- if dir > math.pi * 0.2 and dir < 0.8 * math.pi and input[Enum.KeyCode.W] == nil then
- input[Enum.KeyCode.W] = 1
- elseif input[Enum.KeyCode.W] ~= nil and (dir > 0.7 * math.pi or dir < math.pi * 0.2) and input[Enum.KeyCode.W] then
- input[Enum.KeyCode.W] = nil
- end
- if dir > math.pi * 1.2 and dir < math.pi * 1.8 and input[Enum.KeyCode.S] == nil then
- input[Enum.KeyCode.S] = 1
- elseif input[Enum.KeyCode.S] ~= nil and (dir < math.pi * 1.2 or dir > math.pi * 1.8) and input[Enum.KeyCode.S] then
- input[Enum.KeyCode.S] = nil
- end
- if (dir < math.pi * 0.3 or dir > math.pi * 1.7) and input[Enum.KeyCode.D] == nil then
- input[Enum.KeyCode.D] = 1
- elseif input[Enum.KeyCode.D] ~= nil and dir < math.pi * 1.7 and dir > math.pi * 0.3 and input[Enum.KeyCode.D] then
- input[Enum.KeyCode.D] = nil
- end
- if dir > math.pi * 0.7 and dir < math.pi * 1.3 and input[Enum.KeyCode.A] == nil then
- input[Enum.KeyCode.A] = 1
- elseif input[Enum.KeyCode.A] ~= nil and (dir > math.pi * 1.3 or dir < math.pi * 0.7) and input[Enum.KeyCode.A] then
- input[Enum.KeyCode.A] = nil
- end
- ThumbstickDir = dir
- elseif key.Position.magnitude < 0.1 then
- ThumbstickDir = math.pi / 2
- if input[Enum.KeyCode.W] then
- input[Enum.KeyCode.W] = nil
- end
- if input[Enum.KeyCode.A] then
- input[Enum.KeyCode.A] = nil
- end
- if input[Enum.KeyCode.D] then
- input[Enum.KeyCode.D] = nil
- end
- if input[Enum.KeyCode.S] then
- input[Enum.KeyCode.S] = nil
- end
- end
- end
- end)
- local armnumber = 1
- CAS:BindAction("Activate ULT", UltimateActivate, true)
- CAS:SetPosition("Activate ULT", UDim2.new(0.65, 0, 0.1, 0))
- CAS:BindAction("WebSwing", function(name, mode)
- if mode == Enum.UserInputState.Begin then
- armnumber = armnumber + 1
- if char.RightHand:FindFirstChild("RightHandForce") then
- EndWebsling(char.RightHand)
- end
- if char.LeftHand:FindFirstChild("LeftHandForce") then
- EndWebsling(char.LeftHand)
- end
- wait()
- local localarm = char.RightHand
- if armnumber % 2 == 0 then
- localarm = char.LeftHand
- end
- WebSling(localarm)
- elseif mode == Enum.UserInputState.End then
- local localarm = char.RightHand
- if armnumber % 2 == 0 then
- localarm = char.LeftHand
- end
- if char.RightHand:FindFirstChild("RightHandForce") then
- EndWebsling(char.RightHand)
- end
- if char.LeftHand:FindFirstChild("LeftHandForce") then
- EndWebsling(char.LeftHand)
- end
- end
- end, true)
- CAS:SetPosition("WebSwing", UDim2.new(0.35, 0, 0.2, 0))
- CAS:BindAction("WallClimb", function(name, mode)
- if mode == Enum.UserInputState.Begin then
- if CanWallclimb == true and Mode ~= "WallClimbing" and Mode ~= "Fighting" then
- WallClimb()
- elseif Mode == "WallClimbing" then
- Mode = "Idle"
- end
- end
- end, true)
- CAS:SetPosition("WallClimb", UDim2.new(0.2, 0, 0.55, 0))
- local n = 0
- UIS.InputBegan:connect(function(key, chatting)
- if chatting == false then
- if key.UserInputType == Enum.UserInputType.MouseButton1 or key.KeyCode == Enum.KeyCode.ButtonR2 then
- local point
- if key.UserInputType == Enum.UserInputType.MouseButton1 then
- point = m.Hit.p
- end
- DefaultAttack(point)
- end
- if key.KeyCode == Enum.KeyCode.F or key.KeyCode == Enum.KeyCode.ButtonB then
- if CanWallclimb == true and Mode ~= "WallClimbing" and Mode ~= "Fighting" then
- WallClimb()
- elseif Mode == "WallClimbing" then
- Mode = "Idle"
- end
- end
- if key.KeyCode == Enum.KeyCode.R or key.KeyCode == Enum.KeyCode.ButtonY then
- UltimateActivate()
- end
- if key.KeyCode == Enum.KeyCode.E or key.KeyCode == Enum.KeyCode.ButtonX or key.KeyCode == Enum.KeyCode.ButtonR1 then
- if key.KeyCode ~= Enum.KeyCode.ButtonR1 then
- spawn(function()
- if interaction == nil then
- EnviromentInteraction()
- else
- if plr.PlayerGui:FindFirstChild("MobileExitInteraction") then
- plr.PlayerGui:FindFirstChild("MobileExitInteraction"):destroy()
- end
- RS.RemoteEvents.Strength:FireServer(interaction.model, "EndEnviroment")
- end
- end)
- end
- if key.KeyCode ~= Enum.KeyCode.ButtonX then
- if char.RightHand:FindFirstChild("RightHandForce") then
- EndWebsling(char.RightHand)
- end
- WebSling(char.RightHand, m.Hit.p)
- end
- end
- if key.KeyCode == Enum.KeyCode.Q or key.KeyCode == Enum.KeyCode.ButtonL1 then
- if char.LeftHand:FindFirstChild("LeftHandForce") then
- EndWebsling(char.LeftHand)
- end
- WebSling(char.LeftHand, m.Hit.p)
- end
- if key.KeyCode == Enum.KeyCode.W or key.KeyCode == Enum.KeyCode.S or key.KeyCode == Enum.KeyCode.D or key.KeyCode == Enum.KeyCode.A then
- input[key.KeyCode] = 1
- end
- end
- end)
- UIS.InputEnded:connect(function(key, chatting)
- if chatting == false then
- if key.KeyCode == Enum.KeyCode.E or key.KeyCode == Enum.KeyCode.ButtonR1 then
- EndWebsling(char.RightHand)
- end
- if key.KeyCode == Enum.KeyCode.Q or key.KeyCode == Enum.KeyCode.ButtonL1 then
- EndWebsling(char.LeftHand)
- end
- if key.KeyCode == Enum.KeyCode.W or key.KeyCode == Enum.KeyCode.S or key.KeyCode == Enum.KeyCode.D or key.KeyCode == Enum.KeyCode.A then
- input[key.KeyCode] = nil
- end
- end
- end)
- local t = 0
- local LastCheckedTime = tick()
- char.Humanoid.StateChanged:connect(function(old, new)
- if new == Enum.HumanoidStateType.Landed and char.HumanoidRootPart.Velocity.Y < -250 then
- print("Crash land! " .. char.HumanoidRootPart.Velocity.Y)
- humanoid.WalkSpeed = 0
- humanoid.AutoRotate = false
- local Defaultanim = Instance.new("Animation")
- local charlist = {}
- Defaultanim.AnimationId = "rbxassetid://1042575388"
- local DefaultPlay = humanoid:LoadAnimation(Defaultanim)
- DefaultPlay:Play(0.15)
- wait(0.35)
- DefaultPlay:Stop(0.5)
- wait(0.4)
- humanoid.WalkSpeed = 16
- humanoid.AutoRotate = true
- end
- end)
- game:GetService("RunService").Heartbeat:connect(function(delta)
- t = t + 1
- if t % 30 == 0 then
- OnMobile = _G.OnMobile
- OnConsole = _G.OnConsole
- charlist = {}
- for _, v in pairs(game.Players:GetPlayers()) do
- table.insert(charlist, v.Character)
- end
- end
- if OnMobile then
- local point = plr.PlayerGui:WaitForChild("TouchGui"):WaitForChild("TouchControlFrame"):WaitForChild("ThumbstickFrame"):WaitForChild("StickImage")
- local centre = plr.PlayerGui:WaitForChild("TouchGui"):WaitForChild("TouchControlFrame"):WaitForChild("ThumbstickFrame"):WaitForChild("OuterImage")
- local position = Vector2.new((point.AbsolutePosition.X + point.AbsoluteSize.X / 2 - (centre.AbsolutePosition.X + centre.AbsoluteSize.X / 2)) / (centre.AbsoluteSize.X / 2), -(point.AbsolutePosition.Y + point.AbsoluteSize.Y / 2 - (centre.AbsolutePosition.Y + centre.AbsoluteSize.Y / 2)) / (centre.AbsoluteSize.Y / 2))
- if position.magnitude > 0.25 then
- local dir = math.atan2(position.Y, position.X) % (math.pi * 2)
- if dir > math.pi * 0.2 and dir < 0.8 * math.pi and input[Enum.KeyCode.W] == nil then
- input[Enum.KeyCode.W] = 1
- elseif input[Enum.KeyCode.W] ~= nil and (dir > 0.7 * math.pi or dir < math.pi * 0.2) and input[Enum.KeyCode.W] then
- input[Enum.KeyCode.W] = nil
- end
- if dir > math.pi * 1.2 and dir < math.pi * 1.8 and input[Enum.KeyCode.S] == nil then
- input[Enum.KeyCode.S] = 1
- elseif input[Enum.KeyCode.S] ~= nil and (dir < math.pi * 1.2 or dir > math.pi * 1.8) and input[Enum.KeyCode.S] then
- input[Enum.KeyCode.S] = nil
- end
- if (dir < math.pi * 0.3 or dir > math.pi * 1.7) and input[Enum.KeyCode.D] == nil then
- input[Enum.KeyCode.D] = 1
- elseif input[Enum.KeyCode.D] ~= nil and dir < math.pi * 1.7 and dir > math.pi * 0.3 and input[Enum.KeyCode.D] then
- input[Enum.KeyCode.D] = nil
- end
- if dir > math.pi * 0.7 and dir < math.pi * 1.3 and input[Enum.KeyCode.A] == nil then
- input[Enum.KeyCode.A] = 1
- elseif input[Enum.KeyCode.A] ~= nil and (dir > math.pi * 1.3 or dir < math.pi * 0.7) and input[Enum.KeyCode.A] then
- input[Enum.KeyCode.A] = nil
- end
- ThumbstickDir = dir
- elseif position.magnitude < 0.1 then
- ThumbstickDir = math.pi / 2
- if input[Enum.KeyCode.W] then
- input[Enum.KeyCode.W] = nil
- end
- if input[Enum.KeyCode.A] then
- input[Enum.KeyCode.A] = nil
- end
- if input[Enum.KeyCode.D] then
- input[Enum.KeyCode.D] = nil
- end
- if input[Enum.KeyCode.S] then
- input[Enum.KeyCode.S] = nil
- end
- end
- end
- if input[Enum.KeyCode.W] ~= nil and input[Enum.KeyCode.S] == nil then
- pushforce = Vector3.new(pushforce.X, 0, 1)
- elseif input[Enum.KeyCode.S] ~= nil and input[Enum.KeyCode.W] == nil then
- pushforce = Vector3.new(pushforce.X, 0, -1)
- else
- pushforce = Vector3.new(pushforce.X, 0, 0)
- end
- if input[Enum.KeyCode.D] ~= nil and input[Enum.KeyCode.A] == nil then
- pushforce = Vector3.new(1, 0, pushforce.Z)
- elseif input[Enum.KeyCode.A] ~= nil and input[Enum.KeyCode.D] == nil then
- pushforce = Vector3.new(-1, 0, pushforce.Z)
- else
- pushforce = Vector3.new(0, 0, pushforce.Z)
- end
- if humanoid:GetState() == Enum.HumanoidStateType.Physics and Mode ~= "Slinging" then
- humanoid:ChangeState(Enum.HumanoidStateType.GettingUp)
- end
- if 0.2 <= tick() - LastCheckedTime then
- local hit, pos, normal = workspace:FindPartOnRayWithIgnoreList(Ray.new(char.HumanoidRootPart.CFrame.p, char.HumanoidRootPart.CFrame.lookVector * 10), charlist)
- if hit == nil then
- hit, pos, normal = workspace:FindPartOnRayWithIgnoreList(Ray.new(char.HumanoidRootPart.CFrame.p, -char.HumanoidRootPart.CFrame.lookVector * 10), charlist)
- if hit == nil then
- hit, pos, normal = workspace:FindPartOnRayWithIgnoreList(Ray.new(char.HumanoidRootPart.CFrame.p, -char.HumanoidRootPart.CFrame.rightVector * 10), charlist)
- if hit == nil then
- hit, pos, normal = workspace:FindPartOnRayWithIgnoreList(Ray.new(char.HumanoidRootPart.CFrame.p, char.HumanoidRootPart.CFrame.rightVector * 10), charlist)
- end
- end
- end
- if hit and hit.Size.magnitude > 25 and 1 > hit.Transparency then
- CanWallclimb = true
- NormalVector = normal
- else
- CanWallclimb = false
- end
- CheckInteractables()
- end
- if _G.lastUlt ~= nil then
- if 30 >= tick() - _G.lastUlt then
- plr.PlayerGui.UltCountdown.Frame.Visible = true
- plr.PlayerGui.UltCountdown.Frame.Countdown.Text = tostring(math.abs(30 - math.floor(tick() - _G.lastUlt)))
- plr.PlayerGui.UltCountdown.Frame.Countdown.Countdown.Text = tostring(math.abs(30 - math.floor(tick() - _G.lastUlt)))
- elseif 30 < tick() - _G.lastUlt and plr.PlayerGui.UltCountdown.Frame.Visible == true then
- plr.PlayerGui.UltCountdown.Frame.Visible = false
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement