Advertisement
CaliberMag

Untitled

May 31st, 2019
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.77 KB | None | 0 0
  1. getgenv().On = false
  2. Key = "J"
  3. Delay = 15
  4. LastSlot = "S20"
  5. Slots = {
  6. ["S01"] = false;
  7. ["S02"] = false;
  8. ["S03"] = false;
  9. ["S04"] = false;
  10. ["S05"] = false;
  11. ["S06"] = false;
  12. ["S07"] = false;
  13. ["S08"] = true;
  14. ["S09"] = true;
  15. ["S10"] = true;
  16. ["S11"] = true;
  17. ["S12"] = true;
  18. ["S13"] = true;
  19. ["S14"] = true;
  20. ["S15"] = true;
  21. ["S16"] = true;
  22. ["S17"] = true;
  23. ["S18"] = true;
  24. ["S19"] = true;
  25. ["S20"] = true;
  26. }
  27. ---------------------------------------------------------
  28. local plr = game:GetService'Players'.LocalPlayer
  29. spawn(function()
  30. function KillLost()
  31. for i,v in pairs(workspace.Guttermouth.GuttermouthRoom4.Monsters:GetChildren()) do
  32. if(v.Name=='PhantomKnightNPC' or v.Name == 'Phantom') and v:FindFirstChild'Humanoid' then
  33. v.Humanoid.Health = 0
  34. end
  35. end
  36. end
  37.  
  38. function Walk() --setclipboard(tostring(plr.Character:WaitForChild'HumanoidRootPart'.Position))
  39. for i = 1,Delay do
  40. wait(1)
  41. plr.Character:WaitForChild'Humanoid':MoveTo(Vector3.new(12531.5635, 251.514069, -2355.00903))
  42. end
  43. end
  44.  
  45. function OpenChest()
  46. workspace.Guttermouth.GuttermouthRoom4.ClaimRewards:InvokeServer(true)
  47. end
  48.  
  49. function EnterRoom()
  50. workspace.Guttermouth["Door_GuttermouthPhantom (Hidden Key)"].InteractEvent:FireServer(true)
  51. end
  52.  
  53. function ExitRoom()
  54. workspace.Guttermouth.GuttermouthRoom4.GutterExit.InteractEvent:FireServer(true)
  55. end
  56.  
  57. function SellItems()
  58. if plr.Inventory[LastSlot].Value ~= 0 then
  59. for i = 1,25 do
  60. wait(.03)
  61. for i,v in pairs(plr.Inventory:GetChildren()) do
  62. if Slots[v.Name] then
  63. game:GetService'ReplicatedStorage'.Events.SellShop:FireServer(v.Value, workspace.Shops.Sellers, 1)
  64. end
  65. end
  66. end
  67. end
  68. end
  69.  
  70. function TpSell()
  71. if plr.Inventory[LastSlot].Value ~= 0 then
  72. plr.Character:WaitForChild'HumanoidRootPart'.CFrame = CFrame.new(713.500122, 235.300568, -482.247925)
  73. wait(.15)
  74. plr.Character:WaitForChild'HumanoidRootPart'.CFrame = CFrame.new(12531.5635, 251.514069, -2355.00903)
  75. end
  76. end
  77.  
  78. function DeleteChest()
  79. if workspace:FindFirstChild('GuttermouthChest') then
  80. workspace.GuttermouthChest:Destroy()
  81. end
  82. end
  83. end)
  84.  
  85. ---------------------------------------------------------
  86.  
  87. spawn(function()
  88. game:GetService'UserInputService'.InputBegan:connect(function(key, gameProcessedEvent)
  89. if key.KeyCode == Enum.KeyCode[Key] then
  90. if getgenv().On then
  91. getgenv().On = false
  92. elseif not getgenv().On then
  93. getgenv().On = true
  94. end
  95. end
  96. end)
  97. end)
  98.  
  99. ---------------------------------------------------------
  100.  
  101. spawn(function()
  102. while wait() do
  103. if getgenv().On then
  104. wait(2)
  105. EnterRoom()
  106. wait(3)
  107. KillLost()
  108. wait(1)
  109. Walk()
  110. wait(1)
  111. OpenChest()
  112. OpenChest()
  113. wait(1)
  114. TpSell()
  115. SellItems()
  116. wait(2)
  117. DeleteChest()
  118. DeleteChest()
  119. ExitRoom()
  120. end
  121. end
  122. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement