Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- Written by A1_exe
- Edited by Shrektella
- F to Use the Aimbot
- Q to toggle between 100/99 accuracy
- ]]
- local player = game:GetService('Players').LocalPlayer
- local mouse = player:GetMouse()
- local range_min, range_max = 99, 99;
- local ScreenGui = Instance.new("ScreenGui",player.PlayerGui)
- local Frame = Instance.new("Frame",ScreenGui)
- Frame.Size = UDim2.new(0,44,0,44)
- Frame.Position = UDim2.new(0.005,0,0.923, 0)
- Frame.BackgroundColor3 = Color3.new(255, 255, 127/255)
- Frame.Active = true
- Frame.Draggable = true
- local TextLabel = Instance.new("TextLabel",Frame)
- TextLabel.Size = UDim2.new(0,32,0,34)
- TextLabel.Position = UDim2.new(0.136,0,0.114, 0)
- TextLabel.BackgroundTransparency = 1
- TextLabel.Text = range_min
- TextLabel.TextScaled = true
- TextLabel.Font = "SciFi"
- TextLabel.Active = false
- mouse.KeyDown:connect(function(key)
- if key == "q" then
- if range_min == 99 and range_max == 99 then
- TextLabel.Text = "100"
- Frame.BackgroundColor3 = Color3.new(85/255, 255, 127/255)
- range_min = 100
- range_max = 100
- else if range_min == 100 and range_max == 100 then
- TextLabel.Text = "99"
- Frame.BackgroundColor3 = Color3.new(255, 255, 127/255)
- range_min = 99
- range_max = 99
- end
- end
- end
- end)
- local playerData = player:FindFirstChild('System')
- local onTeam = playerData and playerData:FindFirstChild('OnTeam')
- local storage = game:GetService('ReplicatedStorage')
- local gp = storage.gameplay
- local char = gp.character
- local val = char.value
- local function find(t,i)
- for index, val in next, (t) do
- if (index == i) then
- return true, index, val
- elseif (val == i) then
- return true, index, val
- end
- end
- end
- local hoops = (function()
- local hs = {},{};
- local rec do
- rec = function(o)
- for __, child in next, (o:GetChildren()) do
- if string.lower(child['Name']):match('hoop') and child:FindFirstChild('Goal') then
- table.insert(hs, child)
- elseif #child:GetChildren() > 0 then
- rec(child)
- end
- end
- end
- end
- rec(game.Workspace)
- return hs
- end)()
- local getShoot = function()
- local c = player.Character or player.CharacterAdded:wait()
- local hrp = c:WaitForChild('HumanoidRootPart',5)
- if not hrp then print('No humanoid root part.') return end
- local ball;
- for __, obj in next, (workspace:GetChildren()) do
- if obj.Name:lower() == 'basketball' and obj.controller.Value == player.Name then
- return obj.shoot
- end
- end
- end
- local getHoop = function()
- local c = player.Character or player.CharacterAdded:wait()
- local hrp = c:WaitForChild('HumanoidRootPart',5)
- if not hrp then print('No humanoid root part.') return end
- local last, closest = math.huge;
- for __, hoop in next, (hoops) do
- local goal = hoop:FindFirstChild('Goal')
- if goal then
- local dist = (hrp.Position-goal.Position).magnitude
- if dist < last then
- last = dist
- closest = hoop
- end
- end
- end
- return closest
- end
- local Attack = function(shoot, hoop)
- if shoot and hoop then
- val:FireServer("shooting", true)
- shoot:FireServer(hoop, math.random(range_min,range_max), true)
- end
- end
- mouse.KeyDown:connect(function(key)
- if key == "f" then
- local shoot = getShoot()
- local hoop = getHoop()
- court = hoop.Parent
- local data = court:FindFirstChild('GameData')
- local teamball = data and data:FindFirstChild('TeamBall')
- local h1 = court:FindFirstChild('_Hoop1')
- local h2 = court:FindFirstChild('_Hoop2')
- if OnTeam and OnTeam.Value == 1 and h1 then
- Attack(shoot,h1)
- return
- elseif OnTeam and OnTeam.Value == 2 and h2 then
- Attack(shoot,h2)
- return
- end
- if teamball and teamball.Value == 1 and h1 then
- Attack(shoot,h1)
- return
- elseif teamball and teamball.Value == 2 and h2 then
- Attack(shoot,h2)
- return
- end
- Attack(shoot,hoop)
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement