Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local tool = script.Parent
- local cam = workspace.CurrentCamera
- local mouse = game.Players.LocalPlayer:GetMouse()
- local rs = game.ReplicatedStorage:WaitForChild("MurderMysteryReplicatedStorage")
- local config = require(rs:WaitForChild("CONFIGURATION"))
- local re = rs:WaitForChild("RemoteEvent")
- local onCooldown = false
- tool.Activated:Connect(function()
- mouse.TargetFilter = game.Players.LocalPlayer.Character or game.Players.LocalPlayer.CharacterAdded:Wait()
- if not onCooldown then
- onCooldown = true
- re:FireServer("SHERIFF SHOOT", tool, cam.CFrame, mouse.Hit)
- task.wait(config.SheriffWeaponCooldown)
- onCooldown = false
- end
- end)
Advertisement
Advertisement