LXVX

Mega Mansion Tycoon Script Pastebin *2023*

Feb 8th, 2023
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.27 KB | None | 0 0
  1. --[[
  2. tarvax Mega Mansion Simulator is licensed under Creative Commons Attribution 4.0 International
  3. Author: tarvax https://v3rmillion.net/member.php?action=profile&uid=591293
  4. ]]--
  5.  
  6. local VirtualUser=game:service'VirtualUser'
  7. game:service'Players'.LocalPlayer.Idled:connect(function()
  8. VirtualUser:CaptureController()
  9. VirtualUser:ClickButton2(Vector2.new())
  10. end)
  11.  
  12. local tycoons = game:GetService("Workspace")["Zednov's Tycoon Kit"].Tycoons;
  13. local players = game:GetService("Players");
  14. local player = players.LocalPlayer;
  15. local character = player.Character;
  16. local tycoon = nil;
  17. getgenv().run = false;
  18. wait(0.5);
  19. getgenv().run = true;
  20.  
  21. local get_by_path = function(root_obj,path_string)
  22. if(not root_obj) then
  23. wait(1);
  24. return nil;
  25. end
  26. for part in string.gmatch(path_string,"[^%.]+") do
  27. local found = nil;
  28. if(type(root_obj) == 'table' and root_obj[part] ~= nil) then
  29. found = root_obj[part];
  30. else
  31. found = root_obj:FindFirstChild(part);
  32. if(found) then
  33. else
  34. return nil;
  35. end
  36. end
  37. if(found) then root_obj = found; end
  38. end
  39. return root_obj;
  40. end
  41. while wait() and tycoon == nil and getgenv().run == true do
  42. for _,loop_tycoon in pairs(tycoons:GetChildren()) do
  43. if(loop_tycoon.ClassName == "Model" and loop_tycoon.Owner.Value == player) then
  44. tycoon = loop_tycoon;
  45. end
  46. end
  47. end
  48. if(tycoon == nil) then return; end
  49. while wait() and getgenv().run == true do
  50. local giver = get_by_path(tycoon,"Essentials.Giver");
  51. if(giver == nil) then
  52. giver = get_by_path(tycoon,"PurchasedObjects.Level2.level1finished.Giver");
  53. end
  54. if(giver == nil) then
  55. local models = get_by_path(game:GetService("Workspace"),"ClientApartmentObjects.Level3Start.phStart");
  56. if(models == nil) then continue; end
  57. for _,model in pairs(models:GetChildren()) do
  58. if(model.ClassName == "Model") then
  59. for _,part in pairs(model:GetChildren()) do
  60. if(get_by_path(part,"TouchInterest")) then
  61. giver = part;
  62. end
  63. end
  64. end
  65. end
  66. end
  67. if(giver == nil) then continue; end
  68. firetouchinterest(character.LeftFoot,giver,0);
  69. wait(0.1);
  70. firetouchinterest(character.LeftFoot,giver,1);
  71. wait(0.1);
  72. local cheapest = nil;
  73. local cheapest_price = nil;
  74. local levels = tycoon.Buttons:GetChildren();
  75. table.insert(levels,game:GetService("Workspace").ClientButtons);
  76. for _,level in pairs(levels) do
  77. for i,button in pairs(level:GetChildren()) do
  78. if(
  79. button:FindFirstChild("extra") ~= nil and
  80. get_by_path(button,"Head.TouchInterest") ~= nil and
  81. button.extra.Transparency <= 0
  82. ) then
  83. local price = nil;
  84. if(get_by_path(button,"Price") ~= nil) then
  85. price = button.Price.Value;
  86. elseif(get_by_path(button,"BillboardGui.Frame.ImageLabel.PriceText") ~= nil) then
  87. local price_string = get_by_path(button,"BillboardGui.Frame.ImageLabel.PriceText").Text
  88. local mult = price_string:sub(-1);
  89. if(mult == "K") then
  90. price = tonumber(price_string:sub(2,-2)) * 1000;
  91. elseif(mult == "M") then
  92. price = tonumber(price_string:sub(2,-2)) * 1000 * 1000;
  93. else
  94. price = tonumber(get_by_path(button,"BillboardGui.Frame.ImageLabel.PriceText").Text);
  95. end
  96. end
  97. if(price ~= nil) then
  98. if(cheapest == nil) then
  99. cheapest = button;
  100. cheapest_price = price;
  101. elseif(price < cheapest_price) then
  102. cheapest = button;
  103. cheapest_price = price;
  104. end
  105. end
  106. end
  107. end
  108. end
  109. if(
  110. get_by_path(cheapest,"Head") ~= nil and
  111. cheapest_price < player.leaderstats.Cash.Value
  112. ) then
  113. firetouchinterest(character.LeftFoot,cheapest.Head,0);
  114. wait(0.1);
  115. if(get_by_path(cheapest,"Head") ~= nil) then
  116. firetouchinterest(character.LeftFoot,cheapest.Head,1);
  117. wait(0.1);
  118. end
  119. player.PlayerGui.UI.Store.Visible = false;
  120. end
  121. end
Add Comment
Please, Sign In to add comment