local UIS = game:GetService("UserInputService")
local Holding = false
local Power = 0
local MaxPower = 100
UIS.InputBegan:Connect(function(Input, GPE)
if GPE then return end
if Input.UserInputType == Enum.UserInputType.MouseButton1 then
Holding = true
while Holding do
task.wait(0.02)
Power += 2
if Power >= MaxPower then
Power = 0
end
print("Shot Power:", Power)
end
end
end)
UIS.InputEnded:Connect(function(Input)
if Input.UserInputType == Enum.UserInputType.MouseButton1 then
Holding = false
local GreenStart = 48
local GreenEnd = 52
if Power >= GreenStart and Power <= GreenEnd then
print("GREEN!")
-- Guaranteed make logic
else
print("MISS")
end
Power = 0
end
end)
Comments
No comments yet
Be the first to share your thoughts!