Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local plr = game.Players.LocalPlayer
- local mouse = plr:GetMouse()
- local default_power = 20
- local power = default_power
- local UserInputService = game:GetService("UserInputService")
- local playAnimations = true
- local gui = Instance.new("ScreenGui",game.CoreGui)
- local label = Instance.new("TextLabel",gui)
- label.BackgroundTransparency = 1
- label.TextColor3 = Color3.fromRGB(255,255,255)
- label.Size = UDim2.new(0.1,0,.2,0)
- label.Position = UDim2.new(0,0,.8,0)
- label.Text = "Power = " .. power
- function haveTools()
- local a = false
- local b = false
- for i,v in pairs(plr.Character:GetDescendants()) do
- if v:IsA("Tool") then
- if v ~= nil then
- a = true
- else
- a = false
- end
- end
- end
- for i,k in pairs(plr.Backpack:GetDescendants()) do
- if k:IsA("Tool") then
- if k ~= nil then
- b = true
- else
- b = false
- end
- end
- end
- return a or b
- end
- local q_up = false
- local e_up = false
- mouse.KeyDown:connect(function(key)
- if key == "q" then
- spawn(function()
- if UserInputService:IsKeyDown(Enum.KeyCode.LeftShift) then
- playAnimations = not playAnimations
- end
- end)
- while not q_up do
- if power > 1 then
- power = power - 1
- else
- if power > 0.1 then
- power = power - .1
- end
- end
- label.Text = "Power = " .. power
- wait(0.15)
- end
- q_up = false
- elseif key == "e" then
- spawn(function()
- if UserInputService:IsKeyDown(Enum.KeyCode.LeftShift) then
- if power > 90000 then
- power = default_power
- else
- power = math.huge
- end
- label.Text = "Power = " .. power
- end
- end)
- while not e_up do
- if power >= 1 then
- power = power + 1
- else
- power = power + 0.1
- end
- label.Text = "Power = " .. power
- wait(0.15)
- end
- e_up = false
- end
- if key == "f" then
- local AnimationId
- if game.Players.LocalPlayer.Character.Humanoid.RigType == Enum.HumanoidRigType.R15 then
- AnimationId = "846744780"
- else
- AnimationId = "204062532"
- end
- local Anim = Instance.new("Animation")
- Anim.AnimationId = "rbxassetid://"..AnimationId
- local k = game.Players.LocalPlayer.Character.Humanoid:LoadAnimation(Anim)
- if playAnimations then
- k:Play() --Play the animation
- end--Play the animation
- game.Players.LocalPlayer.Character:FindFirstChild("Humanoid"):UnequipTools()
- k:AdjustSpeed(1) --Set '1' to any value you want to adjust the animation speed.
- wait()
- local tool = plr.Backpack:FindFirstChild("FFWEFFWE")
- if tool ~= nil then
- tool.Parent = plr.Character
- tool.GripPos = Vector3.new(0,power * 10000,250)
- end
- wait(1)
- game.Players.LocalPlayer.Character:FindFirstChild("Humanoid"):UnequipTools()
- elseif key == "c" then
- if game.Players.LocalPlayer.Character.Humanoid.RigType == Enum.HumanoidRigType.R15 then
- AnimationId = "675025570"
- else
- AnimationId = "218504594"
- end
- local Anim = Instance.new("Animation")
- Anim.AnimationId = "rbxassetid://"..AnimationId
- local k = game.Players.LocalPlayer.Character.Humanoid:LoadAnimation(Anim)
- if playAnimations then
- k:Play() --Play the animation
- end
- if game.Players.LocalPlayer.Character.Humanoid.RigType == Enum.HumanoidRigType.R15 then
- k:AdjustSpeed(3.4) --Set '1' to any value you want to adjust the animation speed.
- else
- k:AdjustSpeed(1)
- end
- game.Players.LocalPlayer.Character:FindFirstChild("Humanoid"):UnequipTools()
- wait()
- local tool = plr.Backpack:FindFirstChild("FFWEFFWE")
- if tool ~= nil then
- tool.Parent = plr.Character
- tool.GripPos = Vector3.new(0,power * 10000,250)
- end
- wait(1)
- game.Players.LocalPlayer.Character:FindFirstChild("Humanoid"):UnequipTools()
- end
- label.Text = "Power = " .. power
- end)
- mouse.KeyUp:connect(function(key)
- if key == "q" then
- q_up = true
- elseif key == "e" then
- e_up = true
- end
- end)
- function get_hatTool()
- local LocalPlayer = game:GetService("Players").LocalPlayer
- for _, hat in pairs(LocalPlayer.Character.Humanoid:GetAccessories()) do
- if hat.Handle ~= nil then
- local tool = Instance.new("Tool", LocalPlayer.Backpack)
- tool.Name = "FFWEFFWE"
- local hathandle = hat.Handle
- hathandle:FindFirstChildOfClass("Weld").Part1 = nil
- hathandle.Parent = tool
- hathandle.Massless = true
- end
- break
- end
- end
- get_hatTool()
- plr.Character.Animate.toolnone.ToolNoneAnim.AnimationId = "nil"
- plr.CharacterAdded:connect(function()
- wait(1)
- get_hatTool()
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement