Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Gui to Lua
- -- Version: 3.2
- -- Instances:
- local ScreenGui = Instance.new("ScreenGui", owner.PlayerGui)
- local Frame = Instance.new("Frame")
- local UICorner = Instance.new("UICorner")
- local AimToggle = Instance.new("TextButton")
- local UICorner_2 = Instance.new("UICorner")
- local Froim = Instance.new("TextLabel")
- local UICorner_3 = Instance.new("UICorner")
- --Properties:
- Frame.Parent = ScreenGui
- Frame.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- Frame.Position = UDim2.new(0.0648147687, 0, 0.296748012, 0)
- Frame.Size = UDim2.new(0, 187, 0, 236)
- UICorner.Parent = Frame
- AimToggle.Name = "AimToggle"
- AimToggle.Parent = Frame
- AimToggle.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- AimToggle.Position = UDim2.new(0.101604283, 0, 0.516949177, 0)
- AimToggle.Size = UDim2.new(0, 149, 0, 42)
- AimToggle.Font = Enum.Font.SourceSansLight
- AimToggle.Text = "Off"
- AimToggle.TextColor3 = Color3.fromRGB(255, 6, 0)
- AimToggle.TextScaled = true
- AimToggle.TextSize = 14.000
- AimToggle.TextWrapped = true
- UICorner_2.Parent = AimToggle
- Froim.Name = "Froim"
- Froim.Parent = Frame
- Froim.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- Froim.Position = UDim2.new(0.00534759369, 0, 0, 0)
- Froim.Size = UDim2.new(0, 186, 0, 50)
- Froim.Font = Enum.Font.SourceSansLight
- Froim.Text = "Aimbot"
- Froim.TextColor3 = Color3.fromRGB(0, 0, 0)
- Froim.TextScaled = true
- Froim.TextSize = 14.000
- Froim.TextWrapped = true
- UICorner_3.Parent = Froim
- -- Scripts:
- local function BAIOOPO_fake_script() -- AimToggle.ToggleScript
- local script = Instance.new('LocalScript', AimToggle)
- script.Parent.MouseButton1Click:Connect(function()
- if script.Parent.TextColor3 == Color3.fromRGB(255, 0, 0) then
- script.Parent.Text = "On"
- script.Parent.TextColor3 = Color3.fromRGB(0, 255, 0)
- else
- script.Parent.Text = "Off"
- script.Parent.TextColor3 = Color3.fromRGB(255, 0, 0)
- end
- -- set the color you're looking for
- local targetColor = Color3.fromRGB(255, 0, 0) -- color red
- -- get all parts with the target color
- local targets = game:GetService("CollectionService"):GetTagged("TargetColor")
- -- function to calculate the distance between two Vector3 positions
- local function distance(pos1, pos2)
- return (pos1 - pos2).magnitude
- end
- -- loop through all the targets and find the nearest one
- local target = nil
- local distanceToTarget = math.huge
- for _, part in ipairs(targets) do
- if part.Color == targetColor then -- check if it's the target color
- local dist = distance(part.Position, script.Parent.Position)
- if dist < distanceToTarget then -- check if it's the closest one so far
- target = part
- distanceToTarget = dist
- end
- end
- end
- -- aim at the target
- if target then
- local desiredAimDirection = (target.Position - script.Parent.Position).unit
- script.Parent.CFrame = CFrame.lookAt(script.Parent.Position + desiredAimDirection*5, target.Position)
- -- create a projectile and shoot it at the target
- local projectile = Instance.new("Part")
- projectile.Shape = Enum.PartType.Ball
- projectile.Size = Vector3.new(1, 1, 1)
- projectile.Color = Color3.new(1, 1, 0) -- yellow
- projectile.Position = script.Parent.Position + script.Parent.CFrame.lookVector*2
- projectile.CanCollide = false
- projectile.Velocity = script.Parent.CFrame.lookVector * 50
- projectile.Parent = game.Workspace
- end
- end)
- end
- coroutine.wrap(BAIOOPO_fake_script)()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement