REDPlays

Todoroki's Ice Pillars

Jul 15th, 2018
314
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.82 KB | None | 0 0
  1. script:WaitForChild("IcePillar")
  2. local Player = game.Players.LocalPlayer
  3. local Character = Player.Character
  4. local UserInput = game:GetService("UserInputService")
  5. Anim = script.Anim
  6.  
  7. Damage = script.Damage
  8. Use = true
  9.  
  10. UserInput.InputBegan:connect(function(Key)
  11.     if Key.KeyCode == Enum.KeyCode.X and Use == true then
  12.         Use = false
  13.        
  14.         print("Freeze!")
  15.         local Anim = Character:FindFirstChild("Humanoid"):LoadAnimation(Anim)
  16.         Anim:Play()
  17.        
  18.         wait(.25)
  19.         local Ice = script.IcePillar
  20.        
  21.         local PositionFor = -6
  22.         local SizeY = 12
  23.         local SizeX = 2
  24.        
  25.         for i=0,30,1 do
  26.             local Pillar = Ice:Clone()
  27.             Pillar.Name = "Pillar"
  28.             Pillar.Size = Vector3.new(SizeX,SizeY,SizeX)
  29.             Pillar.CFrame = Character:FindFirstChild("HumanoidRootPart").CFrame * CFrame.new(math.random(-5,5),1,PositionFor)
  30.             Pillar.Orientation = Character:FindFirstChild("HumanoidRootPart").Orientation + Vector3.new(0,math.random(-60,60),math.random(-45,45))
  31.             Pillar.CanCollide = false
  32.             Pillar.Anchored = true
  33.             Pillar.Parent = Character:FindFirstChild("UpperTorso")
  34.                
  35.             PositionFor = PositionFor + -3
  36.             SizeY = SizeY + 4
  37.             SizeX = SizeX + 2
  38.            
  39.             Pillar.Touched:connect(function(Hit)
  40.                 if Hit.Parent == Character or Hit.Parent.Parent == Character then
  41.                     print(Character)
  42.                    
  43.                 elseif Hit.Parent ~= Character or Hit.Parent.Parent ~= Character then
  44.                     local Humanoid = Hit.Parent:FindFirstChild("Humanoid")
  45.                     if Humanoid then
  46.                         Humanoid.Health = Humanoid.Health - Damage.Value
  47.                         Pillar:Destroy()
  48.                         wait()
  49.                     end
  50.                 end
  51.             end)
  52.            
  53.             wait()
  54.         end
  55.         wait(2)
  56.         while Character:FindFirstChild("UpperTorso"):FindFirstChildOfClass("UnionOperation") do
  57.             Character:FindFirstChild("UpperTorso"):FindFirstChildOfClass("UnionOperation"):Destroy()
  58.             wait()
  59.         end
  60.         wait(9)
  61.         Use = true
  62.     end
  63. end)
Advertisement
Add Comment
Please, Sign In to add comment