local Players = game:GetService("Players") local RunService = game:GetService("RunService") local ReplicatedStorage = game:GetService("ReplicatedStorage") local Workspace = game:GetService("Workspace") local UserInputService = game:GetService("UserInputService") local player = Players.LocalPlayer local camera = Workspace.CurrentCamera local Event = ReplicatedStorage:WaitForChild("MenuToys"):WaitForChild("SpawnToyRemoteFunction") local targetPart = Instance.new("Part") targetPart.Name = "NeonTargetIndicator" targetPart.Shape = Enum.PartType.Ball targetPart.Size = Vector3.new(1.5, 1.5, 1.5) targetPart.Material = Enum.Material.Neon targetPart.Color = Color3.fromRGB(255, 0, 0) targetPart.CanCollide = false targetPart.Anchored = true targetPart.Parent = Workspace RunService.RenderStepped:Connect(function() local character = player.Character if not character or not character:FindFirstChild("HumanoidRootPart") then return end local camCFrame = camera.CFrame local lookVector = camCFrame.LookVector local pitch = math.asin(lookVector.Y) local alpha = math.clamp((-pitch) / (math.pi / 2), 0, 1) local fixedOffset = -0.66 + (alpha * (-14.9 - (-0.66))) local finalPosition = camCFrame.Position + (lookVector * fixedOffset) targetPart.Position = finalPosition end) local pg = player:WaitForChild("PlayerGui") local gui = Instance.new("ScreenGui", pg) gui.Name = "FastUI" gui.ResetOnSpawn = false gui.IgnoreGuiInset = true local btn = Instance.new("TextButton", gui) btn.Size = UDim2.new(0, 55, 0, 55) btn.Position = UDim2.new(0.1, 0, 0.4, 0) btn.BackgroundColor3 = Color3.fromRGB(15, 15, 15) btn.Text = "7S" btn.TextColor3 = Color3.fromRGB(160, 160, 160) btn.TextSize = 16 btn.Font = Enum.Font.SourceSansBold btn.Active = true btn.Draggable = false local c = Instance.new("UICorner", btn) c.CornerRadius = UDim.new(1, 0) local s = Instance.new("UIStroke", btn) s.Color = Color3.fromRGB(60, 60, 60) s.Thickness = 2 local dragging, dInput, dStart, sPos, moved = false, nil, nil, nil, false btn.InputBegan:Connect(function(io) if not moved and (io.UserInputType == Enum.UserInputType.MouseButton1 or io.UserInputType == Enum.UserInputType.Touch) then dragging = true dStart = io.Position sPos = btn.Position io.Changed:Connect(function() if io.UserInputState == Enum.UserInputState.End and dragging then dragging = false moved = true end end) end end) btn.InputChanged:Connect(function(io) if not moved and (io.UserInputType == Enum.UserInputType.MouseMovement or io.UserInputType == Enum.UserInputType.Touch) then dInput = io end end) UserInputService.InputChanged:Connect(function(io) if not moved and dragging and io == dInput then local delta = io.Position - dStart btn.Position = UDim2.new(sPos.X.Scale, sPos.X.Offset + delta.X, sPos.Y.Scale, sPos.Y.Offset + delta.Y) end end) btn.MouseButton1Down:Connect(function() if not dragging then btn.BackgroundColor3 = Color3.fromRGB(35, 35, 35) end end) btn.MouseButton1Up:Connect(function() btn.BackgroundColor3 = Color3.fromRGB(15, 15, 15) end) btn.MouseButton1Click:Connect(function() if dragging then return end local character = player.Character if not character then return end task.spawn(function() RunService.Heartbeat:Wait() local spawnPosition = targetPart.Position local camCFrame = camera.CFrame local _, yaw, _ = camCFrame:ToOrientation() local newCFrame = camCFrame.Rotation + spawnPosition local rotationVector = Vector3.new(0, math.deg(yaw), 0) pcall(function() Event:InvokeServer( "PalletLightBrown", newCFrame, rotationVector ) end) end) end)