troymikeyt

Untitled

Jun 15th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.03 KB | None | 0 0
  1.  
  2. local Rawr = {}
  3. local Api = {}
  4. local Log = {}
  5.  
  6. local function Service(name)
  7. return game:GetService(name)
  8. end
  9.  
  10. local function SecondsToClock(seconds)
  11. -- https://gist.github.com/jesseadams/791673
  12. local seconds = tonumber(seconds)
  13. if seconds <= 0 then
  14. return "00:00:00";
  15. else
  16. local hours = string.format("%02.f", math.floor(seconds/3600));
  17. local mins = string.format("%02.f", math.floor(seconds/60 - (hours*60)));
  18. local secs = string.format("%02.f", math.floor(seconds - hours*3600 - mins *60));
  19. return hours..":"..mins..":"..secs
  20. end
  21. end
  22.  
  23. function Log:Init()
  24. local Profile = game:GetService("ReplicatedStorage").Profiles[Api.GetPlayer().Name]
  25. local Vel = Profile.Stats.Vel
  26. local LastVel = Vel.Value
  27. Log.Earned = {
  28. Vel = 0,
  29. Items = {},
  30. }
  31. Profile.Inventory.ChildAdded:Connect(function(item)
  32. table.insert(Log.Earned.Items, item.Name)
  33. if(Api.GetSetting("auto_dismantle") == true)then
  34. Api.Dismantle(item.Name)
  35. end
  36. end)
  37. Vel.Changed:Connect(function()
  38. local earn = Vel.Value - LastVel
  39. LastVel = Vel.Value
  40. Log.Earned.Vel = Log.Earned.Vel + earn
  41. end)
  42. end
  43.  
  44. function Log.Save()
  45. Log.Earned.RunTime = SecondsToClock(tick()-Api.Start)
  46. Synapse:WriteFile(tick() .. "_log.dat", game:GetService("HttpService"):JSONEncode(Log.Earned))
  47. end
  48.  
  49. function Rawr:Check(...) --secret sauce
  50. local player = Api.GetPlayer()
  51. local character = Api.GetCharacter()
  52. local args = {...}
  53.  
  54. if(character and character.PrimaryPart and args[1]:lower()=="cframe")then
  55. --player.Character = Api.FakeCharacter
  56. player.Character.RobloxLocked = true
  57. wait(Api.GetSetting("rawr_bypass_speed"))
  58. character:SetPrimaryPartCFrame(args[2])
  59. wait(Api.GetSetting("rawr_bypass_speed"))
  60. --player.Character = character
  61. player.Character.RobloxLocked = false
  62. end
  63. end
  64.  
  65. function Api.GetPlayer()
  66. return game:GetService("Players").LocalPlayer
  67. end
  68.  
  69. function Api.Dismantle(name)
  70. game.ReplicatedStorage.Event:FireServer("Equipment", {
  71. "Dismantle",
  72. game:GetService("ReplicatedStorage").Profiles[Api.GetPlayer().Name].Inventory[name]
  73. })
  74. end
  75.  
  76. function Api.Replicate(object)
  77. local Model = Instance.new("Model")
  78. Model.Name = object.Name
  79. for index, child in pairs(object:GetChildren()) do
  80. local c = child:Clone()
  81. c.Parent = Model
  82. end
  83. if(object.PrimaryPart)then
  84. Model.PrimaryPart = Model[object.PrimaryPart.Name]
  85. end
  86. return Model
  87. end
  88.  
  89. function Api.GetCharacter()
  90. return Api.Character or Api.GetPlayer().Character
  91. end
  92.  
  93. function Api.GetEntity(model)
  94. return model:FindFirstChild("Entity")
  95. end
  96.  
  97. function Api.Settings(...)
  98. Api.Settings = {}
  99. for name, value in pairs(...) do
  100. Api.Settings[name] = value
  101. end
  102. end
  103.  
  104. function Api.GetSetting(name)
  105. return Api.Settings[name]
  106. end
  107.  
  108. function Api.IsValid(model)
  109. if(model.PrimaryPart and model:FindFirstChild("Entity") and model.Entity:FindFirstChild("Health") and model.Parent~=nil and model:FindFirstChild("Nameplate"))then
  110. return true
  111. end
  112. end
  113.  
  114. function Api.GetPlayerDistances(model)
  115. local localPlayer = Api.GetPlayer()
  116. local distances = {}
  117. for index, player in pairs(Service("Players"):GetChildren()) do
  118. if(player~=localPlayer and player.Character and player.Character:FindFirstChild("HumanoidRootPart") and model:FindFirstChild("HumanoidRootPart"))then
  119. distances[player.Name] = (model.HumanoidRootPart.Position - player.Character.HumanoidRootPart.Position).magnitude
  120. end
  121. end
  122. return distances
  123. end
  124.  
  125. function Api.CheckNear(monster)
  126. if(Api.GetSetting("avoid_players_nearby")["Enabled"] == true)then
  127. local max_distance = Api.GetSetting("avoid_players_nearby")["Distance"]
  128. local distances = Api.GetPlayerDistances(monster)
  129. for player, distance in pairs(distances)do
  130. if(distance <= max_distance)then
  131. return false
  132. end
  133. end
  134. end
  135. return true
  136. end
  137.  
  138. function Api.CheckBlacklist(monster)
  139. for index, blacklist in pairs(Api.Blacklist) do
  140. if(monster == blacklist)then
  141. return false
  142. end
  143. end
  144. return true
  145. end
  146.  
  147. function Api.GetMonsters()
  148. local targets = {}
  149. for index, monster in pairs(Service("Workspace").Mobs:GetChildren()) do
  150. local entity = monster:FindFirstChildOfClass("Folder")
  151. local filterApplied = false
  152. local distanceCheck = Api.CheckNear(monster)
  153. if(monster.PrimaryPart and Api.IsValid(monster) and distanceCheck and Api.CheckBlacklist(monster))then
  154. if(Api.GetSetting("monster_filter")["Enabled"] == true)then
  155. if(entity.Health.Value >= Api.GetSetting("monster_filter")["max_monster_health"] and entity.Exp.Value >= Api.GetSetting("monster_filter")["min_exp_earned"])then
  156. table.insert(targets, monster)
  157. end
  158. filterApplied = true
  159. elseif(Api.GetSetting("target_specific_enemy").Enabled == true)then
  160. if(Api.GetSetting("target_specific_enemy").Names[monster.Nameplate.SurfaceGui.TextLabel.Text] == true)then
  161. table.insert(targets, monster)
  162. end
  163. filterApplied = true
  164. end
  165. if(filterApplied == false)then
  166. table.insert(targets, monster)
  167. end
  168. end
  169. end
  170. return targets
  171. end
  172.  
  173. function Api:Connect()
  174. local player = Api.GetPlayer()
  175. local character = Api.GetCharacter()
  176. local setupCharacter = function(character)
  177. Api.FakeCharacter = Api.Replicate(character)
  178. end
  179.  
  180. setupCharacter(character)
  181. player.CharacterAdded:Connect(setupCharacter)
  182. end
  183.  
  184. function Api:SetKeys()
  185. game:GetService("UserInputService").InputBegan:connect(function(Key)
  186. if(Key.KeyCode == Api.GetSetting("stop_key"))then
  187. Api.Enabled = false
  188. elseif(Key.KeyCode == Api.GetSetting("pause_key"))then
  189. Api.Paused = true
  190. elseif(Key.KeyCode == Api.GetSetting("unpause_key"))then
  191. Api.Paused = false
  192. end
  193. end)
  194. end
  195.  
  196. function Api:Init()
  197. Api.Blacklist = {}
  198. Api.Start = tick()
  199. Api.Paused = false
  200. Api.CanClick = false
  201. Api.Enabled = true
  202. wait(Api.GetSetting("StartDelay"))
  203. spawn(function()
  204. while wait(Api.GetSetting("click_break_speed")) and Api.Enabled do
  205. if(Api.Paused == false and Api.CanClick == true)then
  206. if(mouse1click)then
  207. mouse1click()
  208. end
  209. else
  210. wait()
  211. end
  212. end
  213. end)
  214. while wait() and Api.Enabled do
  215. if(Api.Paused == false)then
  216. for index, monster in pairs(Api.GetMonsters()) do
  217. local distanceCheck = Api.CheckNear(monster)
  218. if(distanceCheck and Api.IsValid(monster) and Api.Enabled)then -- recheck
  219. Rawr:Check("CFrame", monster:GetPrimaryPartCFrame() * CFrame.new(0, 0, 3)) -- bypass
  220. wait(Api.GetSetting("swap_monster_speed"))
  221. local entity = Api.GetEntity(monster)
  222. local base = entity.Health.Value
  223. entity.Health.Changed:Connect(function()
  224. if(entity.Health.Value == base)then
  225. dontBreak = false
  226. end
  227. end)
  228. dontBreak = true
  229. local timer = 0
  230. while dontBreak and Api.Enabled do
  231. if(Api.Paused == false)then
  232. local thisTime = wait()
  233. wait(thisTime)
  234. timer = timer + thisTime
  235. if(timer >= Api.GetSetting("timeout")["time"])then
  236. warn('Timeout exceeded!')
  237. if(Api.GetSetting("timeout")["blacklist_monster_after_timeout"] == true)then
  238. table.insert(Api.Blacklist, monster)
  239. end
  240. break
  241. end
  242. if(Api.IsValid(monster) and entity.Health.Value > 0)then
  243. local character = Api.GetCharacter()
  244. if(character)then
  245. Api.CanClick = true
  246. character:SetPrimaryPartCFrame(monster:GetPrimaryPartCFrame() * CFrame.new(0, 0, 3))
  247. else
  248. character = Api.GetCharacter()
  249. if(character)then
  250. Rawr:Check("CFrame", monster:GetPrimaryPartCFrame() * CFrame.new(0, 0, 3)) -- bypass
  251. wait(Api.GetSetting("swap_monster_speed"))
  252. end
  253. end
  254. else
  255. Api.CanClick = false
  256. break
  257. end
  258. else
  259. wait()
  260. end
  261. end
  262. wait(Api.GetSetting("swap_monster_speed"))
  263. end
  264. end
  265. end
  266. end
  267. Log.Save()
  268. end
  269.  
  270. Api.Settings({
  271. ["start_delay"] = 2,
  272. ["stop_key"] = Enum.KeyCode.Escape,
  273. ["pause_key"] = Enum.KeyCode.LeftControl,
  274. ["unpause_key"] = Enum.KeyCode.RightControl,
  275. ["rawr_bypass_speed"] = 0.5, -- 0.65
  276. ["swap_monster_speed"] = 0.2, -- 0.7,
  277. ["click_break_speed"] = .01,
  278. ["auto_dismantle"] = false,
  279. ["timeout"] = {
  280. ["time"] = 15,
  281. ["blacklist_monster_after_timeout"] = true
  282. },
  283. ["monster_filter"] = {
  284. ["Enabled"] = false,
  285. ["max_monster_health"] = 0,
  286. ["min_exp_earned"] = 0,
  287. },
  288. ["avoid_players_nearby"] = {
  289. ["Enabled"] = true,
  290. ["Distance"] = 200
  291. },
  292. ["target_specific_enemy"] = {
  293. ["Enabled"] = false,
  294. ["Names"] = {
  295. ["Giant Ruins Hornet"] = false,
  296. ["Enraged Lingerer"] = true,
  297. ["Undead Berserker"] = true,
  298. ["Undead Warrior"] = true,
  299. ["Gargoyle Reaper"] = false,
  300. ["Mortis the Flaming Sear"] = false,
  301. }
  302. }
  303. })
  304.  
  305. Api:SetKeys()
  306. Api:Connect()
  307. Log:Init()
  308. Api:Init()
Advertisement
Add Comment
Please, Sign In to add comment