Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Player = game.Players.LocalPlayer
- local rp = game:GetService("ReplicatedStorage")
- local Stand = rp:WaitForChild("Stand")
- local UIS = game:GetService("UserInputService")
- local debounce = false
- local active = false
- UIS.InputBegan:Connect(function(input,isTyping)
- if isTyping then
- return
- elseif input.UserInputType == Enum.UserInputType.standbutton then
- if debounce == false and active == false then
- debounce = true
- Stand:FireServer(active)
- end
- end
- end)
- UIS.InputBegan:Connect(function(input,isTyping)
- if isTyping then
- return
- elseif input.UserInputType == Enum.UserInputType.standbutton then
- if debounce == true and active == false then
- active = true
- Stand:FireServer(active)
- end
- end
- end)
- Stand.OnClientEvent:Connect(function()
- wait(1)
- debounce = false
- active = false
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement