Advertisement
Guest User

Apocalypse Rising script ESP & AIMBOT

a guest
Jun 25th, 2017
11,391
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.39 KB | None | 0 0
  1. ENABLED = false
  2. PLAYER = game.Players.LocalPlayer
  3. MOUSE = PLAYER:GetMouse()
  4. CC = game.Workspace.CurrentCamera
  5. _G.FREE_FOR_ALL = true
  6. _G.BIND = 52
  7. _G.AIM_AT = 'Head'
  8. local player = game.Players.LocalPlayer
  9. local esp = false
  10. local track = false
  11.  
  12.  
  13.  
  14. function Create(base, team)
  15. local bb = Instance.new("BillboardGui",player.PlayerGui)
  16. bb.Adornee = base
  17. bb.ExtentsOffset = Vector3.new(0,1,0)
  18. bb.AlwaysOnTop = true
  19. bb.Size = UDim2.new(0,5,0,5)
  20. bb.StudsOffset = Vector3.new(0,1,0)
  21. bb.Name = "tracker"
  22. local frame = Instance.new("Frame",bb)
  23. frame.ZIndex = 10
  24. frame.BackgroundTransparency = 0.3
  25. frame.Size = UDim2.new(1,0,1,0)
  26. frame.Position = UDim2.new(0,0,0)
  27. frame.Transparency = 1
  28. local txtlbl = Instance.new("TextLabel",bb)
  29. txtlbl.ZIndex = 10
  30. txtlbl.Text = (string.upper(base.Parent.Name))
  31. txtlbl.BackgroundTransparency = 1
  32. txtlbl.Position = UDim2.new(0,0,0,-35)
  33. txtlbl.Size = UDim2.new(1,0,10,0)
  34. txtlbl.Font = "SourceSansBold"
  35. txtlbl.FontSize = "Size10"
  36. txtlbl.TextStrokeTransparency = 0.5
  37.  
  38. local txtlbl2 = Instance.new("TextLabel",bb)
  39. txtlbl2.ZIndex = 10
  40. txtlbl2.Text = (math.floor(base.Parent.Humanoid.Health*100)/100)
  41. txtlbl2.BackgroundTransparency = 1
  42. txtlbl2.Position = UDim2.new(0,0,0,-25)
  43. txtlbl2.Size = UDim2.new(1,0,10,0)
  44. txtlbl2.Font = "SourceSansBold"
  45. txtlbl2.FontSize = "Size10"
  46.  
  47. txtlbl2.TextStrokeTransparency = 0.5
  48. if team then
  49. txtlbl.TextColor3 = Color3.new(255,0,0)
  50. txtlbl2.TextColor3 = Color3.new(255,0,0)
  51. frame.BackgroundColor3 = Color3.new(255,0,0)
  52.  
  53. elseif base.Parent.Name == "whielist kid" or base.Parent.Name == "second whitelist kid here" then
  54. txtlbl.TextColor3 = Color3.new(0,255,0)
  55. txtlbl2.TextColor3 = Color3.new(0,255,0)
  56. frame.BackgroundColor3 = Color3.new(0,255,0)
  57. txtlbl.Text = "FRIEND"
  58. txtlbl.FontSize = "Size14"
  59. txtlbl2.FontSize = "Size14"
  60.  
  61.  
  62.  
  63. elseif base.Parent.Name == game.Players.LocalPlayer.Name then
  64. txtlbl2.Transparency = 1
  65. txtlbl.Transparency = 1
  66. frame.Transparency = 1
  67. else
  68. txtlbl.TextColor3 = Color3.new(255,0,0)
  69. txtlbl2.TextColor3 = Color3.new(255,0,0)
  70. frame.BackgroundColor3 = Color3.new(255,0,0)
  71.  
  72. end
  73. end
  74.  
  75.  
  76. function Find()
  77. Clear()
  78. track = true
  79. spawn(function()
  80. while wait() do
  81. if track then
  82. Clear()
  83. for _,v in pairs(game.Players:players()) do
  84.  
  85. if v.Character and v.Character.Head then
  86. Create(v.Character.Head, false)
  87. end
  88. end
  89. end
  90. end
  91. wait(1)
  92. end)
  93. end
  94. function Clear()
  95. for _,v in pairs(player.PlayerGui:children()) do
  96. if v.Name == "tracker" and v:isA("BillboardGui") then
  97. v:Destroy()
  98. end
  99. end
  100. end
  101. mouse=game.Players.LocalPlayer:GetMouse()
  102. mouse.keyDown:connect(function(key)
  103. if key == "v" then
  104. if not esp then
  105. Find()
  106. print("ESP ENABLED")
  107. esp = true
  108. else
  109. Clear()
  110. track = false
  111. print("ESP DISABLED")
  112. esp = false
  113. end
  114.  
  115.  
  116.  
  117.  
  118. end
  119.  
  120. end)
  121.  
  122.  
  123.  
  124.  
  125. --aimbot
  126.  
  127.  
  128. function GetNearestPlayerToMouse()
  129. local PLAYERS = {}
  130. local PLAYER_HOLD = {}
  131. local DISTANCES = {}
  132. for i, v in pairs(game.Players:GetPlayers()) do
  133. if v ~= PLAYER then
  134. table.insert(PLAYERS, v)
  135. end
  136. end
  137. for i, v in pairs(PLAYERS) do
  138. if _G.FREE_FOR_ALL == false then
  139. if v and (v.Character) ~= nil and v.TeamColor ~= PLAYER.TeamColor then
  140. local AIM = v.Character:FindFirstChild(_G.AIM_AT)
  141. if AIM ~= nil then
  142. local DISTANCE = (AIM.Position - game.Workspace.CurrentCamera.CoordinateFrame.p).magnitude
  143. local RAY = Ray.new(game.Workspace.CurrentCamera.CoordinateFrame.p, (MOUSE.Hit.p - CC.CoordinateFrame.p).unit * DISTANCE)
  144. local HIT,POS = game.Workspace:FindPartOnRay(RAY, game.Workspace)
  145. local DIFF = math.floor((POS - AIM.Position).magnitude)
  146. PLAYER_HOLD[v.Name .. i] = {}
  147. PLAYER_HOLD[v.Name .. i].dist = DISTANCE
  148. PLAYER_HOLD[v.Name .. i].plr = v
  149. PLAYER_HOLD[v.Name .. i].diff = DIFF
  150. table.insert(DISTANCES, DIFF)
  151. end
  152. end
  153. elseif _G.FREE_FOR_ALL == true then
  154. local AIM = v.Character:FindFirstChild(_G.AIM_AT)
  155. if AIM ~= nil then
  156. local DISTANCE = (AIM.Position - game.Workspace.CurrentCamera.CoordinateFrame.p).magnitude
  157. local RAY = Ray.new(game.Workspace.CurrentCamera.CoordinateFrame.p, (MOUSE.Hit.p - CC.CoordinateFrame.p).unit * DISTANCE)
  158. local HIT,POS = game.Workspace:FindPartOnRay(RAY, game.Workspace)
  159. local DIFF = math.floor((POS - AIM.Position).magnitude)
  160. PLAYER_HOLD[v.Name .. i] = {}
  161. PLAYER_HOLD[v.Name .. i].dist = DISTANCE
  162. PLAYER_HOLD[v.Name .. i].plr = v
  163. PLAYER_HOLD[v.Name .. i].diff = DIFF
  164. table.insert(DISTANCES, DIFF)
  165. end
  166. end
  167. end
  168.  
  169. if unpack(DISTANCES) == nil then
  170. return false
  171. end
  172.  
  173. local L_DISTANCE = math.floor(math.min(unpack(DISTANCES)))
  174. if L_DISTANCE > 20 then
  175. return false
  176. end
  177.  
  178. for i, v in pairs(PLAYER_HOLD) do
  179. if v.diff == L_DISTANCE then
  180. return v.plr
  181. end
  182. end
  183. return false
  184. end
  185.  
  186. local TRACK = false
  187.  
  188.  
  189. MOUSE.KeyDown:connect(function(KEY)
  190. KEY = KEY:lower():byte()
  191. if KEY == _G.BIND then
  192. ENABLED = true
  193. end
  194. end)
  195. MOUSE.KeyUp:connect(function(KEY)
  196. KEY = KEY:lower():byte()
  197. if KEY == _G.BIND then
  198. ENABLED = false
  199. end
  200. end)
  201.  
  202. game:GetService('RunService').RenderStepped:connect(function()
  203. if ENABLED then
  204. local TARGET = GetNearestPlayerToMouse()
  205. if TARGET.Name == "Whitelist kid here" or TARGET.Name == "second whitelist kid here" then
  206. else
  207.  
  208. if (TARGET ~= false) then
  209. local AIM = TARGET.Character:FindFirstChild(_G.AIM_AT)
  210. if AIM then
  211. CC.CoordinateFrame = CFrame.new(CC.CoordinateFrame.p, AIM.CFrame.p)
  212. end
  213. end
  214. end
  215. end
  216. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement