Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local plr = game.Players.LocalPlayer
- local mouse = plr:GetMouse()
- local chr = plr.Character or plr.CharacterAdded:wait()
- local shield = Instance.new("Part")
- shield.Anchored = true
- shield.Transparency = .8
- shield.CanCollide = false
- shield.FormFactor = "Custom"
- shield.Size = Vector3.new(.2,.2,.2)
- shield.BottomSurface = "Smooth"
- shield.TopSurface = "Smooth"
- local mesh = Instance.new("SpecialMesh",shield)
- mesh.MeshType = "Sphere"
- mouse.KeyDown:connect(function(key)
- if key == 't' then
- chr.Humanoid.WalkSpeed = 0
- clone = shield:Clone()
- clone.Parent = workspace
- clone.CFrame = chr.Torso.CFrame
- cloneB = clone:Clone()
- cloneB.Parent = workspace
- cloneB.Locked = true
- chr.Humanoid.Changed:connect(function()
- chr.Humanoid.Health = chr.Humanoid.MaxHealth
- end)
- clone.Touched:connect(function(p)
- if p and p.Parent.ClassName == "Part" and p.Parent.Locked == false then
- p:Destroy()
- end
- end)
- for i = 1,45 do
- if i<31 then
- game:GetService('RunService').RenderStepped:wait()
- clone.Size = clone.Size + Vector3.new(.2,.2,.2)
- clone.CFrame = chr.Torso.CFrame
- else
- game:GetService('RunService').RenderStepped:wait()
- cloneB.Size = cloneB.Size + Vector3.new(.4,.4,.4)
- cloneB.CFrame = chr.Torso.CFrame
- end
- end
- end
- end)
- mouse.KeyUp:connect(function(key)
- if key == 't' then
- chr.Humanoid.WalkSpeed = 16
- for i = 1,45 do
- if i<31 then
- game:GetService('RunService').RenderStepped:wait()
- clone.Size = clone.Size - Vector3.new(.2,.2,.2)
- clone.CFrame = chr.Torso.CFrame
- else
- game:GetService('RunService').RenderStepped:wait()
- cloneB.Size = cloneB.Size - Vector3.new(.4,.4,.4)
- cloneB.CFrame = chr.Torso.CFrame
- end
- end
- clone:Destroy()
- cloneB:Destroy()
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement