Advertisement
Guest User

Untitled

a guest
Apr 26th, 2018
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. local Player = game:GetService("Players").LocalPlayer
  2. local UserInputService = game:GetService('UserInputService')
  3. local Power = 100
  4.  
  5. local gui = Instance.new("ScreenGui", Player.PlayerGui)
  6. local text = Instance.new("TextLabel", gui)
  7. text.Size = UDim2.new(0.1, 0, 0.1, 0)
  8. text.Position = UDim2.new(0.9, 0, 0.9, 0)
  9. text.TextScaled = true
  10. text.Text = Power
  11.  
  12. UserInputService.InputBegan:connect(function(InputObject, gameProcessedEvent)
  13. if not gameProcessedEvent and InputObject.KeyCode.Name == "Three" then
  14. Power = Power - 5
  15. text.Text = Power
  16. elseif not gameProcessedEvent and InputObject.KeyCode.Name == "Four" then
  17. Power = Power + 5
  18. text.Text = Power
  19. elseif not gameProcessedEvent and InputObject.KeyCode.Name == "Two" then
  20. for _, v in pairs(game:GetService("Workspace"):GetChildren()) do
  21. if v then
  22. local bal = v:FindFirstChild('Basketball')
  23. if bal then
  24. game.ReplicatedStorage.FolderService.Communications.Funcs:FireServer(bal, "Power", Power)
  25. end
  26. end
  27. end
  28. end
  29. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement