--BROUGHT TO YOU BY RobloxScripter.com!--
function onKeyPress(input, gameProcessed)
-- If the "F" key is pressed and the input was not processed by the game...
if input.KeyCode == Enum.KeyCode.F and not gameProcessed then
local mouse = player:GetMouse()
local hit = mouse.Hit
if hit then
local args = {
"PlacementTower",
"Sniper",
"Default",
hit.Position.X,
hit.Position.Y,
hit.Position.Z,
0
}
game:GetService("ReplicatedStorage").Others.Placement:FireServer(unpack(args))
end
end
end
-- Connect the function to the InputBegan event on the UserInputService
game:GetService("UserInputService").InputBegan:Connect(onKeyPress)