ADVERTISEMENTREMOVE ADS
Game icon

shoot from anywhere

Script preview thumbnail
Script Preview

Description

this script will allow you to set a point on the court ( cframe) and then when you click the button to shoot i will shoot from where you set that point no matter where you are and green it

ADVERTISEMENTREMOVE ADS
47 Lines • 1.39 KiB
Raw
local Players = game:GetService("Players")
local UserInputService = game:GetService("UserInputService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local player = Players.LocalPlayer
local shootRemote = ReplicatedStorage.Client.Remotes.Gameplay.Shoot
local perfectFill = 99.81245458126068
local direction = "Down"
local thirdArg = false
local savedCFrame = nil
local shootEnabled = true
local keys = {
setCFrame = Enum.KeyCode.Y,
shoot = Enum.KeyCode.E
}
--[[
How to use:
Move to the spot you want to shoot from.
Press the "setCFrame" key (default Y) to save your position.
Press the "shoot" key (default E) to shoot with perfect fill from the saved position.
]]
local function saveCFrame()
local char = player.Character
if char and char:FindFirstChild("HumanoidRootPart") then
savedCFrame = char.HumanoidRootPart.CFrame
print("CFrame saved:", savedCFrame.Position)
else
print("No character found to save CFrame.")
end
end
UserInputService.InputBegan:Connect(function(input, gameProcessed)
if gameProcessed then return end
if input.KeyCode == keys.setCFrame then
saveCFrame()
elseif input.KeyCode == keys.shoot and shootEnabled and savedCFrame then
pcall(function()
shootRemote:InvokeServer(perfectFill, direction, thirdArg, savedCFrame)
end)
end
end)
ADVERTISEMENTREMOVE ADS

Comments

1 comment
to add a comment
ii

Does it still make a green

0
0
ADVERTISEMENTREMOVE ADS