Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --@author FiredDusk (aka Previized)
- --// Remotes
- local ShootWeb = game.ReplicatedStorage:WaitForChild('ShootWeb')
- local RemoveWeb = game.ReplicatedStorage:WaitForChild('RemoveWeb')
- local ClimbUpWeb = game.ReplicatedStorage:WaitForChild('ClimbUpWeb')
- local ClimbDownWeb = game.ReplicatedStorage:WaitForChild('ClimbDownWeb')
- local AddForce = game.ReplicatedStorage:WaitForChild('AddForce')
- --// Stats Handler
- game.Players.PlayerAdded:Connect(function(Player)
- local Prefix = 'user_'..tostring(Player.UserId)
- --// Player Stats (leaderboard)
- local Stats = Instance.new('Folder',Player)
- Stats.Name = 'leaderstats'
- local Speed2 = Instance.new('IntValue',Stats)
- Speed2.Name = 'Speed'
- Speed2.Value = 0
- --// Character Added
- Player.CharacterAdded:Connect(function(Character)
- spawn(function()
- while wait(1) do
- for i,v in pairs(Character:GetChildren()) do
- if v:IsA('Shirt') then
- v.ShirtTemplate = 'rbxassetid://811703916' -- Spider-man shirt
- elseif v:IsA('Pants') then
- v.PantsTemplate = 'rbxassetid://816000903' -- Spider-man pants
- end
- end
- end
- end)
- while wait() do
- if Character:FindFirstChild('HumanoidRootPart') then
- Speed2.Value = math.floor(Character.HumanoidRootPart.Velocity.magnitude)
- end
- end
- end)
- end)
- --// Remote Handler
- ShootWeb.OnServerEvent:Connect(function(Player,Request,MousePos)
- if Request == 'ShootWeb' then
- local Part = Instance.new('Part',workspace.AttatchmentParts)
- Part.Name = Player.Name
- Part.Size = Vector3.new(1,1,1)
- Part.Transparency = 1
- Part.Anchored = true
- Part.CanCollide = false
- Part.CFrame = CFrame.new(MousePos)
- local Att0 = Instance.new('Attachment',Player.Character.LeftHand)
- local Att1 = Instance.new('Attachment',Part)
- Rope = Instance.new('RopeConstraint',Player.Character.LeftHand)
- Rope.Color = BrickColor.new('Institutional white')
- Rope.Visible = true
- Rope.Length = (Player.Character.LeftHand.Position - Part.Position).magnitude
- Rope.Attachment0 = Att0
- Rope.Attachment1 = Att1
- end
- end)
- RemoveWeb.OnServerEvent:Connect(function(Player,Request)
- if Request == 'RemoveWeb' then
- local Character = Player.Character
- local HumanoidRP = Character:FindFirstChild('HumanoidRootPart')
- local LeftHand = Character:FindFirstChild('LeftHand')
- for i,v in pairs(LeftHand:GetChildren()) do
- if v:IsA('RopeConstraint') then
- v:Destroy()
- end
- end
- for i,v in pairs(workspace.AttatchmentParts:GetChildren()) do
- if v:IsA('Part') then
- if v.Name == Player.Name then
- v:Destroy()
- end
- end
- end
- end
- end)
- --// Climb Up
- ClimbUpWeb.OnServerEvent:Connect(function(Player,Request,Climbing,OppositeDeb)
- local ClimbingWeb = Climbing
- if Request == 'Start' then
- local Character = Player.Character
- local HumanoidRP = Character:FindFirstChild('HumanoidRootPart')
- local LeftHand = Character:FindFirstChild('LeftHand')
- if LeftHand:FindFirstChild('RopeConstraint') then
- ClimbingWeb = Climbing
- while ClimbingWeb == true and LeftHand:FindFirstChild('RopeConstraint') do
- Rope.Length = Rope.Length - 3
- game:GetService('RunService').Heartbeat:Wait()
- end
- end
- elseif Request == 'Stop' then
- ClimbingWeb = Climbing
- end
- end)
- --// Climb Down
- ClimbDownWeb.OnServerEvent:Connect(function(Player,Request,Climbing,OppositeDeb)
- local HoldingE
- local ClimbingWeb = Climbing
- if Request == 'Start' then
- local Character = Player.Character
- local HumanoidRP = Character:FindFirstChild('HumanoidRootPart')
- local LeftHand = Character:FindFirstChild('LeftHand')
- if LeftHand:FindFirstChild('RopeConstraint') then
- ClimbingWeb = Climbing
- while ClimbingWeb == true and LeftHand:FindFirstChild('RopeConstraint') do
- Rope.Length = Rope.Length + 3
- game:GetService('RunService').Heartbeat:Wait()
- end
- end
- elseif Request == 'Stop' then
- ClimbingWeb = Climbing
- end
- end)
Add Comment
Please, Sign In to add comment