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")
- local Frame = Instance.new("Frame")
- local toggle = Instance.new("TextButton")
- local TextLabel = Instance.new("TextLabel")
- --Properties:
- ScreenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
- ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
- Frame.Parent = ScreenGui
- Frame.BackgroundColor3 = Color3.fromRGB(187, 244, 255)
- Frame.Position = UDim2.new(0, 0, 0.445328146, 0)
- Frame.Size = UDim2.new(0, 63, 0, 146)
- toggle.Name = "toggle"
- toggle.Parent = Frame
- toggle.BackgroundColor3 = Color3.fromRGB(165, 213, 255)
- toggle.Position = UDim2.new(0, 0, 0.328767121, 0)
- toggle.Size = UDim2.new(0, 63, 0, 50)
- toggle.Font = Enum.Font.SourceSans
- toggle.Text = "off"
- toggle.TextColor3 = Color3.fromRGB(248, 43, 29)
- toggle.TextScaled = true
- toggle.TextSize = 14.000
- toggle.TextWrapped = true
- TextLabel.Parent = Frame
- TextLabel.BackgroundColor3 = Color3.fromRGB(165, 201, 255)
- TextLabel.Size = UDim2.new(0, 63, 0, 33)
- TextLabel.Font = Enum.Font.SourceSans
- TextLabel.Text = "AimBot"
- TextLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
- TextLabel.TextScaled = true
- TextLabel.TextSize = 14.000
- TextLabel.TextWrapped = true
- -- Scripts:
- local function TKJCW_fake_script() -- toggle.LocalScript
- local script = Instance.new('LocalScript', toggle)
- _G.silentaim = false
- script.Parent.MouseButton1Click:Connect(function()
- if _G.silentaim == false then
- _G.silentaim = true
- script.Parent.Text = "On"
- script.Parent.TextColor3 = Color3.fromRGB(136, 255, 0)
- else
- _G.silentaim = false
- script.Parent.Text = "Off"
- script.Parent.TextColor3 = Color3.fromRGB(255, 0, 4)
- end
- end)
- local players = game:GetService("Players")
- local plr = players.LocalPlayer
- local mouse = plr:GetMouse()
- local camera = game.Workspace.CurrentCamera
- local teamcheck = true
- local function ClosestPlayerToMouse()
- local target = nil
- local dist = math.huge
- for i,v in pairs(players:GetPlayers()) do
- if v.Name ~= plr.Name then
- if v.Character and v.Character:FindFirstChild("Humanoid") and v.Character.Humanoid.Health ~= 0 and v.Character:FindFirstChild("HumanoidRootPart") and _G.silentaim and teamcheck and v.TeamColor ~= plr.TeamColor then
- local screenpoint = camera:WorldToScreenPoint(v.Character.HumanoidRootPart.Position)
- local check = (Vector2.new(mouse.X,mouse.Y)-Vector2.new(screenpoint.X,screenpoint.Y)).magnitude
- if check < dist then
- target = v
- dist = check
- end
- end
- end
- end
- return target
- end
- local mt = getrawmetatable(game)
- local namecall = mt.__namecall
- setreadonly(mt,false)
- mt.__namecall = function(self,...)
- local args = {...}
- local method = getnamecallmethod()
- if tostring(self) == "HitPart" and method == "FireServer" then
- print("so?")
- args[1] = ClosestPlayerToMouse().Character.Head
- args[2] = ClosestPlayerToMouse().Character.Head.Position
- return self.FireServer(self, unpack(args))
- end
- return namecall(self,...)
- end
- end
- coroutine.wrap(TKJCW_fake_script)()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement