script.Parent.RemoteEvent.OnServerEvent:Connect(function(s,P)local m=Instance.new("\080\097\114\116")m.Size=Vector3.new(.5,.5,.5)m.Material="\078\101\111\110"m.BrickColor=BrickColor.new("\078\101\111\110 \111\114\097\110\103\101")m.Transparency=.5 m.Shape=Enum.PartType.Ball m.CFrame=tool.Handle.CFrame local T=Instance.new("\065\116\116\097\099\104\109\101\110\116",m)local w=Instance.new("\086\101\099\116\111\114\070\111\114\099\101",m)w.RelativeTo=Enum.ActuatorRelativeTo.World w.Attachment0=T w.Force=(P-tool.Handle.CFrame.p).unit*PROJECTILE_FORCE m.Parent=workspace m:SetNetworkOwner(s)Debris:AddItem(m,5)m.Touched:Connect(function()m:Destroy()end)end)
-- Don't use this as a learning example. It has no serverside verification and
-- is easily exploitable. This is fine for demo purposes, but not live games!
script.Parent.RemoteEvent.OnServerEvent:Connect(function(player, cursorPos)
	local projectile = Instance.new("Part")
	projectile.Size = Vector3.new(0.5, 0.5, 0.5)
	projectile.Material = "Neon"
	projectile.BrickColor = BrickColor.new("Neon orange")
	projectile.Transparency = 0.5
	projectile.Shape = Enum.PartType.Ball
	projectile.CFrame = tool.Handle.CFrame

	local attachment = Instance.new("Attachment", projectile)

	local vectorForce = Instance.new("VectorForce", projectile)
	vectorForce.RelativeTo = Enum.ActuatorRelativeTo.World
	vectorForce.Attachment0 = attachment
	vectorForce.Force = (cursorPos - tool.Handle.CFrame.p).unit * PROJECTILE_FORCE

	projectile.Parent = workspace
	projectile:SetNetworkOwner(player)
	Debris:AddItem(projectile, 5)

	projectile.Touched:Connect(function()
		projectile:Destroy()
	end)
end)
