Advertisement
Guest User

Untitled

a guest
Jan 14th, 2020
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.30 KB | None | 0 0
  1.  
  2. local plr = game.Players.LocalPlayer
  3. local mouse = plr:GetMouse()
  4. local default_power = 20
  5. local power = default_power
  6. local UserInputService = game:GetService("UserInputService")
  7. local playAnimations = true
  8.  
  9. local gui = Instance.new("ScreenGui",game.CoreGui)
  10. local label = Instance.new("TextLabel",gui)
  11. label.BackgroundTransparency = 1
  12. label.TextColor3 = Color3.fromRGB(255,255,255)
  13.  
  14. label.Size = UDim2.new(0.1,0,.2,0)
  15. label.Position = UDim2.new(0,0,.8,0)
  16.  
  17. label.Text = "Power = " .. power
  18.  
  19. function haveTools()
  20. local a = false
  21. local b = false
  22. for i,v in pairs(plr.Character:GetDescendants()) do
  23. if v:IsA("Tool") then
  24. if v ~= nil then
  25. a = true
  26. else
  27. a = false
  28. end
  29. end
  30. end
  31. for i,k in pairs(plr.Backpack:GetDescendants()) do
  32. if k:IsA("Tool") then
  33. if k ~= nil then
  34. b = true
  35. else
  36. b = false
  37. end
  38. end
  39. end
  40. return a or b
  41. end
  42.  
  43. local q_up = false
  44. local e_up = false
  45.  
  46.  
  47. mouse.KeyDown:connect(function(key)
  48. if key == "q" then
  49. spawn(function()
  50. if UserInputService:IsKeyDown(Enum.KeyCode.LeftShift) then
  51. playAnimations = not playAnimations
  52. end
  53. end)
  54. while not q_up do
  55. if power > 1 then
  56. power = power - 1
  57. else
  58. if power > 0.1 then
  59. power = power - .1
  60. end
  61. end
  62. label.Text = "Power = " .. power
  63. wait(0.15)
  64. end
  65. q_up = false
  66. elseif key == "e" then
  67. spawn(function()
  68. if UserInputService:IsKeyDown(Enum.KeyCode.LeftShift) then
  69. if power > 90000 then
  70. power = default_power
  71. else
  72. power = math.huge
  73. end
  74. label.Text = "Power = " .. power
  75. end
  76. end)
  77. while not e_up do
  78. if power >= 1 then
  79. power = power + 1
  80. else
  81. power = power + 0.1
  82. end
  83. label.Text = "Power = " .. power
  84. wait(0.15)
  85. end
  86. e_up = false
  87. end
  88.  
  89. if key == "f" then
  90. local AnimationId
  91. if game.Players.LocalPlayer.Character.Humanoid.RigType == Enum.HumanoidRigType.R15 then
  92. AnimationId = "846744780"
  93. else
  94. AnimationId = "204062532"
  95. end
  96. local Anim = Instance.new("Animation")
  97. Anim.AnimationId = "rbxassetid://"..AnimationId
  98. local k = game.Players.LocalPlayer.Character.Humanoid:LoadAnimation(Anim)
  99. if playAnimations then
  100. k:Play() --Play the animation
  101. end--Play the animation
  102. game.Players.LocalPlayer.Character:FindFirstChild("Humanoid"):UnequipTools()
  103. k:AdjustSpeed(1) --Set '1' to any value you want to adjust the animation speed.
  104. wait()
  105. local tool = plr.Backpack:FindFirstChild("FFWEFFWE")
  106. if tool ~= nil then
  107. tool.Parent = plr.Character
  108. tool.GripPos = Vector3.new(0,power * 10000,250)
  109. end
  110. wait(1)
  111. game.Players.LocalPlayer.Character:FindFirstChild("Humanoid"):UnequipTools()
  112. elseif key == "c" then
  113. if game.Players.LocalPlayer.Character.Humanoid.RigType == Enum.HumanoidRigType.R15 then
  114. AnimationId = "675025570"
  115. else
  116. AnimationId = "218504594"
  117. end
  118. local Anim = Instance.new("Animation")
  119. Anim.AnimationId = "rbxassetid://"..AnimationId
  120. local k = game.Players.LocalPlayer.Character.Humanoid:LoadAnimation(Anim)
  121. if playAnimations then
  122. k:Play() --Play the animation
  123. end
  124. if game.Players.LocalPlayer.Character.Humanoid.RigType == Enum.HumanoidRigType.R15 then
  125. k:AdjustSpeed(3.4) --Set '1' to any value you want to adjust the animation speed.
  126. else
  127. k:AdjustSpeed(1)
  128. end
  129. game.Players.LocalPlayer.Character:FindFirstChild("Humanoid"):UnequipTools()
  130. wait()
  131. local tool = plr.Backpack:FindFirstChild("FFWEFFWE")
  132. if tool ~= nil then
  133. tool.Parent = plr.Character
  134. tool.GripPos = Vector3.new(0,power * 10000,250)
  135. end
  136. wait(1)
  137. game.Players.LocalPlayer.Character:FindFirstChild("Humanoid"):UnequipTools()
  138. end
  139. label.Text = "Power = " .. power
  140. end)
  141. mouse.KeyUp:connect(function(key)
  142. if key == "q" then
  143. q_up = true
  144. elseif key == "e" then
  145. e_up = true
  146. end
  147. end)
  148.  
  149. function get_hatTool()
  150. local LocalPlayer = game:GetService("Players").LocalPlayer
  151. for _, hat in pairs(LocalPlayer.Character.Humanoid:GetAccessories()) do
  152. if hat.Handle ~= nil then
  153. local tool = Instance.new("Tool", LocalPlayer.Backpack)
  154. tool.Name = "FFWEFFWE"
  155. local hathandle = hat.Handle
  156. hathandle:FindFirstChildOfClass("Weld").Part1 = nil
  157. hathandle.Parent = tool
  158. hathandle.Massless = true
  159. end
  160. break
  161. end
  162. end
  163. get_hatTool()
  164.  
  165. plr.Character.Animate.toolnone.ToolNoneAnim.AnimationId = "nil"
  166.  
  167.  
  168. plr.CharacterAdded:connect(function()
  169. wait(1)
  170. get_hatTool()
  171. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement