Advertisement
Waffle212

Untitled

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