local Players = game:GetService("Players") local ReplicatedStorage = game:GetService("ReplicatedStorage") local LocalPlayer = Players.LocalPlayer local Remote = ReplicatedStorage:WaitForChild("remotes"):WaitForChild("abilities") -- SETTINGS local prediction = 0.18 -- 0.12 = short, 0.18 = normal, 0.25+ = fast games -- GUI local gui = Instance.new("ScreenGui") gui.Parent = LocalPlayer:WaitForChild("PlayerGui") local main = Instance.new("Frame", gui) main.Size = UDim2.fromScale(0.3, 0.55) main.Position = UDim2.fromScale(0.02, 0.2) main.BackgroundColor3 = Color3.fromRGB(25,25,25) main.Active = true main.Draggable = true local corner = Instance.new("UICorner", main) corner.CornerRadius = UDim.new(0,12) local title = Instance.new("TextLabel", main) title.Size = UDim2.fromScale(1, 0.1) title.Text = "Hammer Targeter" title.TextScaled = true title.BackgroundTransparency = 1 title.TextColor3 = Color3.new(1,1,1) -- Player list local list = Instance.new("ScrollingFrame", main) list.Size = UDim2.fromScale(0.9, 0.5) list.Position = UDim2.fromScale(0.05, 0.12) list.AutomaticCanvasSize = Enum.AutomaticSize.Y list.CanvasSize = UDim2.new(0,0,0,0) list.ScrollBarImageTransparency = 0 list.BackgroundColor3 = Color3.fromRGB(30,30,30) list.BorderSizePixel = 0 local listCorner = Instance.new("UICorner", list) listCorner.CornerRadius = UDim.new(0,10) local layout = Instance.new("UIListLayout", list) layout.Padding = UDim.new(0,8) -- Body part selector local partLabel = Instance.new("TextLabel", main) partLabel.Size = UDim2.fromScale(0.4, 0.08) partLabel.Position = UDim2.fromScale(0.05, 0.64) partLabel.Text = "Target Part:" partLabel.TextScaled = true partLabel.BackgroundTransparency = 1 partLabel.TextColor3 = Color3.new(1,1,1) local partButton = Instance.new("TextButton", main) partButton.Size = UDim2.fromScale(0.45, 0.08) partButton.Position = UDim2.fromScale(0.5, 0.64) partButton.Text = "Head" partButton.TextScaled = true partButton.BackgroundColor3 = Color3.fromRGB(70,70,70) partButton.TextColor3 = Color3.new(1,1,1) local partCorner = Instance.new("UICorner", partButton) partCorner.CornerRadius = UDim.new(0,10) -- Throw button local fireButton = Instance.new("TextButton", main) fireButton.Size = UDim2.fromScale(0.9, 0.12) fireButton.Position = UDim2.fromScale(0.05, 0.78) fireButton.Text = "THROW" fireButton.TextScaled = true fireButton.BackgroundColor3 = Color3.fromRGB(60,160,60) fireButton.TextColor3 = Color3.new(1,1,1) local btnCorner = Instance.new("UICorner", fireButton) btnCorner.CornerRadius = UDim.new(0,12) -- Logic local selectedPlayer = nil local selectedPart = "Head" -- Toggle body part partButton.MouseButton1Click:Connect(function() if selectedPart == "Head" then selectedPart = "HumanoidRootPart" partButton.Text = "Torso" else selectedPart = "Head" partButton.Text = "Head" end end) -- Refresh player list local function refreshList() for _, child in ipairs(list:GetChildren()) do if child:IsA("TextButton") then child:Destroy() end end for _, plr in ipairs(Players:GetPlayers()) do if plr ~= LocalPlayer then local btn = Instance.new("TextButton") btn.Size = UDim2.new(1, -10, 0, 40) btn.Text = plr.DisplayName .. " (" .. plr.Name .. ")" btn.TextScaled = true btn.BackgroundColor3 = Color3.fromRGB(40,40,40) btn.TextColor3 = Color3.new(1,1,1) btn.Parent = list local c = Instance.new("UICorner", btn) c.CornerRadius = UDim.new(0,8) btn.MouseButton1Click:Connect(function() selectedPlayer = plr for _, child in ipairs(list:GetChildren()) do if child:IsA("TextButton") then child.BackgroundColor3 = Color3.fromRGB(40,40,40) end end btn.BackgroundColor3 = Color3.fromRGB(80,140,200) end) end end end refreshList() Players.PlayerAdded:Connect(refreshList) Players.PlayerRemoving:Connect(refreshList) -- THROW ONCE (with prediction) fireButton.MouseButton1Click:Connect(function() if not selectedPlayer then return end if not selectedPlayer.Character then return end local char = selectedPlayer.Character local part = char:FindFirstChild(selectedPart) if not part then return end -- Predict where the player will be local predictedPosition = part.Position + (part.AssemblyLinearVelocity * prediction) local args = { "throwHammer", predictedPosition } Remote:FireServer(unpack(args)) end)