Guest User

Untitled

a guest
Oct 11th, 2020
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.20 KB | None | 0 0
  1. local Plr = game.Players.LocalPlayer
  2. local Char = Plr.Character
  3. local UIS = game:GetService('UserInputService')
  4. local RS = game:GetService('ReplicatedStorage')
  5. local Weap = RS:FindFirstChild('Weapons')
  6.  
  7. game.StarterGui:SetCoreGuiEnabled('Backpack', false)
  8.  
  9. local Selected = false
  10.  
  11. UIS.InputBegan:connect(function(input)
  12.     if input.KeyCode == Enum.KeyCode.One then
  13.         if Selected == false then
  14.             Selected = true
  15.             Char:WaitForChild('Humanoid'):EquipTool(Plr.Backpack:WaitForChild('Shotgun'))
  16.             local mouse = game.Players.LocalPlayer:GetMouse()
  17.             mouse.Icon = 'rbxassetid://68308747'
  18.         else Selected = false
  19.             Char:WaitForChild('Humanoid'):UnequipTools()
  20.         end
  21.     end
  22.    
  23.     if input.KeyCode == Enum.KeyCode.Two then
  24.         if Selected == false then
  25.             Selected = true
  26.             Char:WaitForChild('Humanoid'):EquipTool(Plr.Backpack:WaitForChild('Pickaxe'))
  27.         else Selected = false
  28.             Char:WaitForChild('Humanoid'):UnequipTools()
  29.         end
  30.     end
  31.    
  32.     if input.KeyCode == Enum.KeyCode.Three then
  33.         if Selected == false then
  34.             Selected = true
  35.             Char:WaitForChild('Humanoid'):EquipTool(Plr.Backpack:WaitForChild('Pitchfork'))
  36.         else Selected = false
  37.             Char:WaitForChild('Humanoid'):UnequipTools()
  38.         end
  39.     end
  40. end)
Advertisement
Add Comment
Please, Sign In to add comment