Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- game:GetService("StarterGui"):SetCore("SendNotification",{
- Title = " Script Tool",
- Text = "Script a ÊtÊ executer",
- Icon = "rbxassetid://11823384169",
- Duration = 15
- })
- local UserInputService = game:GetService("UserInputService")
- local Mouse = game:GetService("Players").LocalPlayer:GetMouse()
- UserInputService.InputBegan:Connect(function(input, processed)
- if processed then -- This is called "guarding": we can skip making more indents by checking a requirement beforehand (like usual) but also returning early, so it's much easier to read
- return
- end
- -- We SHOULDNT guard this, since the check is much more specific
- if UserInputService:IsKeyDown(Enum.KeyCode.G) then
- pcall(function()
- Mouse.Target:Destroy()
- end)
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement