Skip to content

Instantly share code, notes, and snippets.

@Direnta
Created November 7, 2017 12:22
Show Gist options
  • Save Direnta/ac15c65a1a15cb8d823760ff352084c5 to your computer and use it in GitHub Desktop.
Save Direnta/ac15c65a1a15cb8d823760ff352084c5 to your computer and use it in GitHub Desktop.
Apocalypse Rising GUI
-- Objects
local ScreenGui = Instance.new("ScreenGui")
local Frame = Instance.new("Frame")
local aimbot = Instance.new("TextButton")
local hunger = Instance.new("TextButton")
local thirst = Instance.new("TextButton")
local stamina = Instance.new("TextButton")
local TextLabel = Instance.new("TextLabel")
-- Properties
ScreenGui.Parent = game.Players.LocalPlayer.PlayerGui
Frame.Parent = ScreenGui
Frame.Active = true
Frame.BackgroundColor3 = Color3.new(0.345098, 0.345098, 0.345098)
Frame.Draggable = true
Frame.Position = UDim2.new(0.0445736423, 0, 0.240863785, 0)
Frame.Size = UDim2.new(0, 245, 0, 101)
aimbot.Name = "aimbot"
aimbot.Parent = Frame
aimbot.BackgroundColor3 = Color3.new(1, 0.654902, 0.0980392)
aimbot.Position = UDim2.new(0.0258064512, 0, 0.132978722, 0)
aimbot.Size = UDim2.new(0, 109, 0, 16)
aimbot.Font = Enum.Font.Arcade
aimbot.FontSize = Enum.FontSize.Size14
aimbot.Text = "Aimbot"
aimbot.TextSize = 14
aimbot.MouseButton1Down:connect(function()
PLAYER = game.Players.LocalPlayer
MOUSE = PLAYER:GetMouse()
CC = game.Workspace.CurrentCamera
ENABLED = false
ESP_ENABLED = false
_G.FREE_FOR_ALL = true
_G.BIND = 50
_G.ESP_BIND = 52
_G.CHANGE_AIM = 'q'
_G.AIM_AT = 'Head'
wait(1)
function GetNearestPlayerToMouse()
local PLAYERS = {}
local PLAYER_HOLD = {}
local DISTANCES = {}
for i, v in pairs(game.Players:GetPlayers()) do
if v ~= PLAYER then
table.insert(PLAYERS, v)
end
end
for i, v in pairs(PLAYERS) do
if _G.FREE_FOR_ALL == false then
if v and (v.Character) ~= nil and v.TeamColor ~= PLAYER.TeamColor then
local AIM = v.Character:FindFirstChild(_G.AIM_AT)
if AIM ~= nil then
local DISTANCE = (AIM.Position - game.Workspace.CurrentCamera.CoordinateFrame.p).magnitude
local RAY = Ray.new(game.Workspace.CurrentCamera.CoordinateFrame.p, (MOUSE.Hit.p - CC.CoordinateFrame.p).unit * DISTANCE)
local HIT,POS = game.Workspace:FindPartOnRay(RAY, game.Workspace)
local DIFF = math.floor((POS - AIM.Position).magnitude)
PLAYER_HOLD[v.Name .. i] = {}
PLAYER_HOLD[v.Name .. i].dist = DISTANCE
PLAYER_HOLD[v.Name .. i].plr = v
PLAYER_HOLD[v.Name .. i].diff = DIFF
table.insert(DISTANCES, DIFF)
end
end
elseif _G.FREE_FOR_ALL == true then
local AIM = v.Character:FindFirstChild(_G.AIM_AT)
if AIM ~= nil then
local DISTANCE = (AIM.Position - game.Workspace.CurrentCamera.CoordinateFrame.p).magnitude
local RAY = Ray.new(game.Workspace.CurrentCamera.CoordinateFrame.p, (MOUSE.Hit.p - CC.CoordinateFrame.p).unit * DISTANCE)
local HIT,POS = game.Workspace:FindPartOnRay(RAY, game.Workspace)
local DIFF = math.floor((POS - AIM.Position).magnitude)
PLAYER_HOLD[v.Name .. i] = {}
PLAYER_HOLD[v.Name .. i].dist = DISTANCE
PLAYER_HOLD[v.Name .. i].plr = v
PLAYER_HOLD[v.Name .. i].diff = DIFF
table.insert(DISTANCES, DIFF)
end
end
end
if unpack(DISTANCES) == nil then
return false
end
local L_DISTANCE = math.floor(math.min(unpack(DISTANCES)))
if L_DISTANCE > 20 then
return false
end
for i, v in pairs(PLAYER_HOLD) do
if v.diff == L_DISTANCE then
return v.plr
end
end
return false
end
GUI_MAIN = Instance.new('ScreenGui', game.CoreGui)
GUI_TARGET = Instance.new('TextLabel', GUI_MAIN)
GUI_AIM_AT = Instance.new('TextLabel', GUI_MAIN)
GUI_MAIN.Name = 'AIMBOT'
GUI_TARGET.Size = UDim2.new(0,200,0,30)
GUI_TARGET.BackgroundTransparency = 0.5
GUI_TARGET.BackgroundColor = BrickColor.new('Fossil')
GUI_TARGET.BorderSizePixel = 0
GUI_TARGET.Position = UDim2.new(0.5,-100,0,0)
GUI_TARGET.Text = 'AIMBOT : OFF'
GUI_TARGET.TextColor3 = Color3.new(1,1,1)
GUI_TARGET.TextStrokeTransparency = 1
GUI_TARGET.TextWrapped = true
GUI_TARGET.FontSize = 'Size24'
GUI_TARGET.Font = 'SourceSansBold'
GUI_AIM_AT.Size = UDim2.new(0,200,0,20)
GUI_AIM_AT.BackgroundTransparency = 0.5
GUI_AIM_AT.BackgroundColor = BrickColor.new('Fossil')
GUI_AIM_AT.BorderSizePixel = 0
GUI_AIM_AT.Position = UDim2.new(0.5,-100,0,30)
GUI_AIM_AT.Text = 'AIMING : HEAD'
GUI_AIM_AT.TextColor3 = Color3.new(1,1,1)
GUI_AIM_AT.TextStrokeTransparency = 1
GUI_AIM_AT.TextWrapped = true
GUI_AIM_AT.FontSize = 'Size18'
GUI_AIM_AT.Font = 'SourceSansBold'
local TRACK = false
function CREATE(BASE, TEAM)
local ESP_MAIN = Instance.new('BillboardGui', PLAYER.PlayerGui)
local ESP_DOT = Instance.new('Frame', ESP_MAIN)
local ESP_NAME = Instance.new('TextLabel', ESP_MAIN)
ESP_MAIN.Name = 'ESP'
ESP_MAIN.Adornee = BASE
ESP_MAIN.AlwaysOnTop = true
ESP_MAIN.ExtentsOffset = Vector3.new(0, 1, 0)
ESP_MAIN.Size = UDim2.new(0, 5, 0, 5)
ESP_DOT.Name = 'DOT'
ESP_DOT.BackgroundColor = BrickColor.new('Bright red')
ESP_DOT.BackgroundTransparency = 0.3
ESP_DOT.BorderSizePixel = 0
ESP_DOT.Position = UDim2.new(-0.5, 0, -0.5, 0)
ESP_DOT.Size = UDim2.new(2, 0, 2, 0)
ESP_DOT.Visible = true
ESP_DOT.ZIndex = 10
ESP_NAME.Name = 'NAME'
ESP_NAME.BackgroundColor3 = Color3.new(255, 255, 255)
ESP_NAME.BackgroundTransparency = 1
ESP_NAME.BorderSizePixel = 0
ESP_NAME.Position = UDim2.new(0, 0, 0, -40)
ESP_NAME.Size = UDim2.new(1, 0, 10, 0)
ESP_NAME.Visible = true
ESP_NAME.ZIndex = 10
ESP_NAME.Font = 'ArialBold'
ESP_NAME.FontSize = 'Size14'
ESP_NAME.Text = BASE.Parent.Name:upper()
ESP_NAME.TextColor = BrickColor.new('Bright red')
end
function CLEAR()
for _,v in pairs(PLAYER.PlayerGui:children()) do
if v.Name == 'ESP' and v:IsA('BillboardGui') then
v:Destroy()
end
end
end
function FIND()
CLEAR()
TRACK = true
spawn(function()
while wait() do
if TRACK then
CLEAR()
for i,v in pairs(game.Players:GetChildren()) do
if v.Character and v.Character:FindFirstChild('Head') then
if _G.FREE_FOR_ALL == false then
if v.TeamColor ~= PLAYER.TeamColor then
if v.Character:FindFirstChild('Head') then
CREATE(v.Character.Head, true)
end
end
else
if v.Character:FindFirstChild('Head') then
CREATE(v.Character.Head, true)
end
end
end
end
end
end
wait(1)
end)
end
MOUSE.KeyDown:connect(function(KEY)
KEY = KEY:lower():byte()
if KEY == _G.BIND then
ENABLED = true
end
end)
MOUSE.KeyUp:connect(function(KEY)
KEY = KEY:lower():byte()
if KEY == _G.BIND then
ENABLED = false
end
end)
MOUSE.KeyDown:connect(function(KEY)
KEY = KEY:lower():byte()
if KEY == _G.ESP_BIND then
if ESP_ENABLED == false then
FIND()
ESP_ENABLED = true
print('ESP : ON')
elseif ESP_ENABLED == true then
wait()
CLEAR()
TRACK = false
ESP_ENABLED = true
print('ESP : OFF')
end
end
end)
MOUSE.KeyDown:connect(function(KEY)
if KEY == _G.CHANGE_AIM then
if _G.AIM_AT == 'Head' then
_G.AIM_AT = 'Torso'
GUI_AIM_AT.Text = 'AIMING : TORSO'
elseif _G.AIM_AT == 'Torso' then
_G.AIM_AT = 'Head'
GUI_AIM_AT.Text = 'AIMING : HEAD'
end
end
end)
game:GetService('RunService').RenderStepped:connect(function()
if ENABLED then
local TARGET = GetNearestPlayerToMouse()
if (TARGET ~= false) then
local AIM = TARGET.Character:FindFirstChild(_G.AIM_AT)
if AIM then
CC.CoordinateFrame = CFrame.new(CC.CoordinateFrame.p, AIM.CFrame.p)
end
GUI_TARGET.Text = 'AIMBOT : '.. TARGET.Name:sub(1, 5)
else
GUI_TARGET.Text = 'AIMBOT : OFF'
end
end
end)
repeat
wait()
if ESP_ENABLED == true then
FIND()
end
until ESP_ENABLED == false
wait()
_G.FREE_FOR_ALL = true
_G.BIND = 50 -- LEFT CTRL
_G.ESP_BIND = 52 -- LEFT ALT
end)
hunger.Name = "hunger"
hunger.Parent = Frame
hunger.BackgroundColor3 = Color3.new(1, 0, 0.45098)
hunger.Position = UDim2.new(0.522448957, 0, 0.128712878, 0)
hunger.Size = UDim2.new(0, 109, 0, 16)
hunger.Font = Enum.Font.Arcade
hunger.FontSize = Enum.FontSize.Size14
hunger.Text = "Refil Hunger"
hunger.TextSize = 14
hunger.MouseButton1Down:connect(function()
game.Players.LocalPlayer.playerstats.Hunger.Value = 100
end)
thirst.Name = "thirst"
thirst.Parent = Frame
thirst.BackgroundColor3 = Color3.new(0.188235, 1, 0.756863)
thirst.Position = UDim2.new(0.0258064512, 0, 0.425057948, 0)
thirst.Size = UDim2.new(0, 109, 0, 16)
thirst.Font = Enum.Font.Arcade
thirst.FontSize = Enum.FontSize.Size14
thirst.Text = "Refil Thirst"
thirst.TextSize = 14
thirst.MouseButton1Down:connect(function()
game.Players.LocalPlayer.playerstats.Thirst.Value = 100
end)
stamina.Name = "stamina"
stamina.Parent = Frame
stamina.BackgroundColor3 = Color3.new(1, 0.34902, 0.34902)
stamina.Position = UDim2.new(0.522185624, 0, 0.425057948, 0)
stamina.Size = UDim2.new(0, 109, 0, 16)
stamina.Font = Enum.Font.Arcade
stamina.FontSize = Enum.FontSize.Size14
stamina.Text = "Refil Stamina"
stamina.TextSize = 14
stamina.MouseButton1Down:connect(function()
game.Players.LocalPlayer.Backpack.GlobalFunctions.Stamina.Value = 100
end)
TextLabel.Parent = Frame
TextLabel.BackgroundColor3 = Color3.new(1, 1, 1)
TextLabel.BackgroundTransparency = 1
TextLabel.Position = UDim2.new(0.114285715, 0, 0.7227723, 0)
TextLabel.Size = UDim2.new(0, 189, 0, 13)
TextLabel.Font = Enum.Font.Cartoon
TextLabel.FontSize = Enum.FontSize.Size14
TextLabel.Text = "made by direnta"
TextLabel.TextSize = 14
@sukmoi
Copy link

sukmoi commented Aug 6, 2021

Looks good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment