Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Plr = game.Players.LocalPlayer
- local Char = Plr.Character
- local UIS = game:GetService('UserInputService')
- local RS = game:GetService('ReplicatedStorage')
- local Weap = RS:FindFirstChild('Weapons')
- game.StarterGui:SetCoreGuiEnabled('Backpack', false)
- local Selected = false
- UIS.InputBegan:connect(function(input)
- if input.KeyCode == Enum.KeyCode.One then
- if Selected == false then
- Selected = true
- Char:WaitForChild('Humanoid'):EquipTool(Plr.Backpack:WaitForChild('Shotgun'))
- local mouse = game.Players.LocalPlayer:GetMouse()
- mouse.Icon = 'rbxassetid://68308747'
- else Selected = false
- Char:WaitForChild('Humanoid'):UnequipTools()
- end
- end
- if input.KeyCode == Enum.KeyCode.Two then
- if Selected == false then
- Selected = true
- Char:WaitForChild('Humanoid'):EquipTool(Plr.Backpack:WaitForChild('Pickaxe'))
- else Selected = false
- Char:WaitForChild('Humanoid'):UnequipTools()
- end
- end
- if input.KeyCode == Enum.KeyCode.Three then
- if Selected == false then
- Selected = true
- Char:WaitForChild('Humanoid'):EquipTool(Plr.Backpack:WaitForChild('Pitchfork'))
- else Selected = false
- Char:WaitForChild('Humanoid'):UnequipTools()
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment