Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- myTimer = Timer()
- function Foo(args)
- if args.input == Action.FireRight then
- local results = LocalPlayer:GetAimTarget()
- if results.entity and myTimer:GetMilliseconds() > 1000 then
- local entityType = results.entity.__type
- if entityType == "Vehicle" or entityType == "Player" then
- Chat:Print("You are aiming at a "..entityType..": "..tostring(results.entity), Color(255, 255, 255))
- local args = {}
- args.player = LocalPlayer
- args.target = results.entity
- Network:Send("Shoot", args)
- myTimer:Restart()
- end
- end
- end
- end
- Events:Subscribe("LocalPlayerInput", Foo)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement