Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Player = game:GetService("Players").LocalPlayer
- local UserInputService = game:GetService('UserInputService')
- local Power = 100
- local gui = Instance.new("ScreenGui", Player.PlayerGui)
- local text = Instance.new("TextLabel", gui)
- text.Size = UDim2.new(0.1, 0, 0.1, 0)
- text.Position = UDim2.new(0.9, 0, 0.9, 0)
- text.TextScaled = true
- text.Text = Power
- UserInputService.InputBegan:connect(function(InputObject, gameProcessedEvent)
- if not gameProcessedEvent and InputObject.KeyCode.Name == "Three" then
- Power = Power - 5
- text.Text = Power
- elseif not gameProcessedEvent and InputObject.KeyCode.Name == "Four" then
- Power = Power + 5
- text.Text = Power
- elseif not gameProcessedEvent and InputObject.KeyCode.Name == "Two" then
- for _, v in pairs(game:GetService("Workspace"):GetChildren()) do
- if v then
- local bal = v:FindFirstChild('Basketball')
- if bal then
- game.ReplicatedStorage.FolderService.Communications.Funcs:FireServer(bal, "Power", Power)
- end
- end
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement