Advertisement
Guest User

Untitled

a guest
Feb 28th, 2020
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.33 KB | None | 0 0
  1. RobloxianLife = {}
  2. RobloxianLife.GamepassId = nil
  3.  
  4. local runService = game:GetService("RunService")
  5.  
  6. local plr = game:GetService("Players").LocalPlayer
  7.  
  8. RobloxianLife.Initialize = function(slf, id)
  9. GamepassId = id
  10. end
  11.  
  12. local function GiveTool(...) return workspace.GiveTool:FireServer(...) end
  13.  
  14. local function BuyTool(...) return workspace.Buy:FireServer(...) end
  15.  
  16. local function Effect(...) return workspace.Effect:FireServer(...) end
  17.  
  18. local function SetRPName(name)
  19. workspace.GuiEvent:FireServer(name)
  20. end
  21.  
  22. RobloxianLife.SetLocalProperty = function(slf, obj, prop, val)
  23. local waitornot = false
  24.  
  25. if not GamepassId then
  26. return
  27. end
  28. if not obj:IsDescendantOf(plr.Character) then
  29. return
  30. end
  31. if not plr.Backpack:FindFirstChild("PompousTheCloud") and not plr.Character:FindFirstChild("PompousTheCloud") then
  32. pcall(GiveTool(GamepassId, "PompousTheCloud"))
  33. pcall(BuyTool(0, "PompousTheCloud"))
  34. plr.Backpack:WaitForChild("PompousTheCloud").Parent = plr.Character
  35.  
  36. plr.Character:WaitForChild("PompousTheCloud"):WaitForChild("ServerControl"):InvokeServer(
  37. "SetProperty",
  38. {["Value"] = 0, ["Object"] = plr.Character.PompousTheCloud.Handle.Mesh, ["Property"] = "MeshId"}
  39. )
  40. plr.Character:WaitForChild("PompousTheCloud"):WaitForChild("ServerControl"):InvokeServer(
  41. "SetProperty",
  42. {["Value"] = 1, ["Object"] = plr.Character.PompousTheCloud.Handle, ["Property"] = "Transparency"}
  43. )
  44. plr.Character:WaitForChild("PompousTheCloud"):WaitForChild("ServerControl"):InvokeServer(
  45. "SetProperty",
  46. {["Value"] = true, ["Object"] = plr.Character.PompousTheCloud.LocalScript, ["Property"] = "Disabled"}
  47. )
  48. plr.Character:WaitForChild("PompousTheCloud"):WaitForChild("ServerControl"):InvokeServer(
  49. "SetProperty",
  50. {["Value"] = false, ["Object"] = plr.Character.PompousTheCloud, ["Property"] = "RequiresHandle"}
  51. )
  52. waitornot = true
  53. elseif not plr.Character:FindFirstChild("PompousTheCloud") then
  54. plr.Backpack:WaitForChild("PompousTheCloud").Parent = plr.Character
  55. end
  56. if waitornot then
  57. runService.Heartbeat:Wait()
  58. end
  59.  
  60. coroutine.resume(
  61. coroutine.create(
  62. function()
  63. plr.Character:WaitForChild("PompousTheCloud"):WaitForChild("ServerControl"):InvokeServer(
  64. "SetProperty",
  65. {["Value"] = val, ["Object"] = obj, ["Property"] = prop}
  66. )
  67. end
  68. )
  69. )
  70. end
  71.  
  72. RobloxianLife.InstanceNew = function(slf, classname, props)
  73. local instance = nil
  74.  
  75. if classname == "Part" then
  76. SetRPName("#")
  77. plr.Character:WaitForChild("#")
  78. local part = plr.Character["#"]:WaitForChild("Head")
  79.  
  80. RobloxianLife:SetLocalProperty(part, "Name", "Part")
  81. RobloxianLife:SetLocalProperty(part, "Parent", part.Parent.Parent)
  82. runService.Heartbeat:Wait()
  83. RobloxianLife:SetLocalProperty(plr.Character.Head, "Transparency", 0)
  84. RobloxianLife:SetLocalProperty(plr.Character["#"], "Parent", game.Lighting)
  85. runService.Heartbeat:Wait()
  86.  
  87. instance = part
  88. elseif classname == "Weld" then
  89. GiveTool(GamepassId, "Stroller")
  90. local tool = plr.Backpack:WaitForChild("Stroller")
  91. plr.Character.Humanoid:EquipTool(tool)
  92. local weld = tool.Handle.Weld
  93.  
  94. RobloxianLife:SetLocalProperty(weld, "Parent", weld.Parent.Parent.Parent)
  95. RobloxianLife:SetLocalProperty(tool, "Parent", game.Lighting)
  96.  
  97. instance = weld
  98. elseif classname == "Weld" then
  99. GiveTool(GamepassId, "Stroller")
  100. local tool = plr.Backpack:WaitForChild("Stroller")
  101. plr.Character.Humanoid:EquipTool(tool)
  102. local weld = tool.Handle.Weld
  103.  
  104. RobloxianLife:SetLocalProperty(weld, "Parent", weld.Parent.Parent.Parent)
  105. RobloxianLife:SetLocalProperty(tool, "Parent", game.Lighting)
  106.  
  107. instance = weld
  108. elseif classname == "Sparkles" then
  109. Effect("Sparkles")
  110.  
  111. instance = plr.Character.HumanoidRootPart:WaitForChild("Sparkles")
  112. else
  113. error(string.format("Unsupported classname (%s).", classname))
  114. return
  115. end
  116.  
  117. runService.Heartbeat:Wait()
  118.  
  119. for i, v in pairs(instance:GetChildren()) do
  120. RobloxianLife:SetLocalProperty(v, "Parent", game.Lighting)
  121. end
  122.  
  123. runService.Heartbeat:Wait()
  124. local parent = workspace
  125.  
  126. for i, v in pairs(props) do
  127. if tostring(i) == "Parent" then
  128. parent = v
  129. else
  130. RobloxianLife:SetLocalProperty(instance, tostring(i), v)
  131. end
  132. end
  133.  
  134. runService.Heartbeat:Wait()
  135.  
  136. RobloxianLife:SetLocalProperty(instance, "Parent", parent)
  137.  
  138. return instance
  139. end
  140.  
  141. return RobloxianLife
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement