hawoody

House v2

Apr 17th, 2018
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.23 KB | None | 0 0
  1. --Converted with ttyyuu12345's model to script plugin v4
  2. function sandbox(var,func)
  3. local env = getfenv(func)
  4. local newenv = setmetatable({},{
  5. __index = function(self,k)
  6. if k=="script" then
  7. return var
  8. else
  9. return env[k]
  10. end
  11. end,
  12. })
  13. setfenv(func,newenv)
  14. return func
  15. end
  16. cors = {}
  17. mas = Instance.new("Model",game:GetService("Lighting"))
  18. Tool0 = Instance.new("Tool")
  19. Part1 = Instance.new("Part")
  20. CylinderMesh2 = Instance.new("CylinderMesh")
  21. Part3 = Instance.new("Part")
  22. SpecialMesh4 = Instance.new("SpecialMesh")
  23. Sound5 = Instance.new("Sound")
  24. Weld6 = Instance.new("Weld")
  25. Animation7 = Instance.new("Animation")
  26. Script8 = Instance.new("Script")
  27. LocalScript9 = Instance.new("LocalScript")
  28. LocalScript10 = Instance.new("LocalScript")
  29. Tool0.Name = "Tea"
  30. Tool0.Parent = mas
  31. Tool0.TextureId = "http://www.roblox.com/Tea-item?id=55010979"
  32. Tool0.GripForward = Vector3.new(-0.976163507, 0, -0.217036337)
  33. Tool0.GripPos = Vector3.new(0.400000006, 0, 0)
  34. Tool0.GripRight = Vector3.new(0.217036366, 0, -0.976163626)
  35. Part1.Name = "MainPart"
  36. Part1.Parent = Tool0
  37. Part1.BrickColor = BrickColor.new("Reddish brown")
  38. Part1.Rotation = Vector3.new(180, 0, 180)
  39. Part1.RotVelocity = Vector3.new(0.00187477667, 0.0278346688, 0.00127747911)
  40. Part1.Velocity = Vector3.new(0.000896252517, -0.00335743325, -0.000743457815)
  41. Part1.FormFactor = Enum.FormFactor.Plate
  42. Part1.Size = Vector3.new(1, 0.400000006, 1)
  43. Part1.CFrame = CFrame.new(0.795256734, 0.672164083, -8.49998951, -1, -1.28894599e-05, 5.46475821e-05, -1.28894999e-05, 1, -7.29785484e-07, -5.46475821e-05, -7.30489887e-07, -1)
  44. Part1.Color = Color3.new(0.411765, 0.25098, 0.156863)
  45. Part1.Position = Vector3.new(0.795256734, 0.672164083, -8.49998951)
  46. Part1.Orientation = Vector3.new(0, 180, 0)
  47. Part1.Color = Color3.new(0.411765, 0.25098, 0.156863)
  48. CylinderMesh2.Parent = Part1
  49. CylinderMesh2.Scale = Vector3.new(0.600000024, 1, 1)
  50. CylinderMesh2.Scale = Vector3.new(0.600000024, 1, 1)
  51. Part3.Name = "Handle"
  52. Part3.Parent = Tool0
  53. Part3.BrickColor = BrickColor.new("Mid gray")
  54. Part3.RotVelocity = Vector3.new(0.00187477667, 0.0278346688, 0.00127747911)
  55. Part3.Velocity = Vector3.new(0.000988547574, -0.00322364434, -0.00379400002)
  56. Part3.FormFactor = Enum.FormFactor.Plate
  57. Part3.Size = Vector3.new(1, 1.20000005, 1)
  58. Part3.CFrame = CFrame.new(0.899994016, 0.600040972, -8.49998379, 1, -1.28894599e-05, -5.46475821e-05, 1.28894999e-05, 1, 7.29785484e-07, 5.46475821e-05, -7.30489887e-07, 1)
  59. Part3.BottomSurface = Enum.SurfaceType.Smooth
  60. Part3.TopSurface = Enum.SurfaceType.Smooth
  61. Part3.Color = Color3.new(0.803922, 0.803922, 0.803922)
  62. Part3.Position = Vector3.new(0.899994016, 0.600040972, -8.49998379)
  63. Part3.Color = Color3.new(0.803922, 0.803922, 0.803922)
  64. SpecialMesh4.Parent = Part3
  65. SpecialMesh4.MeshId = "http://www.roblox.com/asset/?id=32023686"
  66. SpecialMesh4.Scale = Vector3.new(1.20000005, 1.20000005, 1.20000005)
  67. SpecialMesh4.TextureId = "http://www.roblox.com/asset/?id=32473921"
  68. SpecialMesh4.MeshType = Enum.MeshType.FileMesh
  69. SpecialMesh4.Scale = Vector3.new(1.20000005, 1.20000005, 1.20000005)
  70. Sound5.Name = "DrinkSound"
  71. Sound5.Parent = Part3
  72. Sound5.SoundId = "http://www.roblox.com/asset/?id=10722059"
  73. Weld6.Parent = Part3
  74. Weld6.C0 = CFrame.new(-572.5, -56.7999992, -779.5, -1, 0, 0, 0, 1, 0, 0, 0, -1)
  75. Weld6.C1 = CFrame.new(572.395264, -56.8721237, 779.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  76. Weld6.Part0 = Part3
  77. Weld6.Part1 = Part1
  78. Animation7.Name = "drink"
  79. Animation7.Parent = Tool0
  80. Animation7.AnimationId = "http://www.roblox.com/asset/?id=70439232"
  81. Script8.Name = "SandwichScript"
  82. Script8.Parent = Tool0
  83. table.insert(cors,sandbox(Script8,function()
  84. local Tool = script.Parent;
  85.  
  86. enabled = true
  87.  
  88.  
  89.  
  90.  
  91. function onActivated()
  92. if not enabled then
  93. return
  94. end
  95.  
  96. enabled = false
  97. Tool.GripForward = Vector3.new(-0.976, 0, -0.217)
  98. Tool.GripPos = Vector3.new(0.3, 0, 0)
  99. Tool.GripRight = Vector3.new(1, 0, 0)
  100. Tool.GripUp = Vector3.new(0, 1, 0)
  101.  
  102.  
  103. Tool.Handle.DrinkSound:Play()
  104.  
  105. wait(2.1)
  106.  
  107. local h = Tool.Parent:FindFirstChild("Humanoid")
  108. if (h ~= nil) then
  109. if (h.Health + 5) then
  110. h.Health = h.Health + 5
  111. else
  112. h.Health = h.MaxHealth
  113. end
  114. end
  115.  
  116. Tool.GripForward = Vector3.new(-0.976, 0, -0.217)
  117. Tool.GripPos = Vector3.new(0.3, 0, 0)
  118. Tool.GripRight = Vector3.new(0.623, 0, -0.782)
  119. Tool.GripUp = Vector3.new(0,1,0)
  120.  
  121.  
  122. enabled = true
  123.  
  124. end
  125.  
  126. function onEquipped()
  127. Tool.Handle.OpenSound:play()
  128. end
  129.  
  130. script.Parent.Activated:connect(onActivated)
  131. script.Parent.Equipped:connect(onEquipped)
  132.  
  133. end))
  134. LocalScript9.Name = "AnimScript"
  135. LocalScript9.Parent = Tool0
  136. table.insert(cors,sandbox(LocalScript9,function()
  137. local Tool = script.Parent
  138. local humanoid = nil
  139. local drinker = nil
  140. local con = nil
  141. local enabled = false
  142.  
  143. function onEquipped(mouse)
  144.  
  145. humanoid = Tool.Parent:FindFirstChild("Humanoid")
  146. if humanoid ~= nil then
  147. drinker = humanoid:LoadAnimation(Tool.drink)
  148. end
  149. con = mouse.Button1Down:connect(function() onButton1Down(mouse) end)
  150.  
  151. end
  152.  
  153. function onUnequipped(mouse)
  154.  
  155. humanoid = nil
  156. if drinker ~= nil then
  157. drinker:remove()
  158. drinker = nil
  159. end
  160. if con ~= nil then
  161. con:disconnect()
  162. end
  163.  
  164. end
  165.  
  166. function onButton1Down(mouse)
  167.  
  168. if enabled then
  169. return
  170. end
  171.  
  172. enabled = true
  173.  
  174.  
  175. drinker:Play()
  176. wait(3)
  177.  
  178. enabled = false
  179.  
  180.  
  181. end
  182.  
  183. Tool.Equipped:connect(onEquipped)
  184. Tool.Unequipped:connect(onUnequipped)
  185.  
  186. end))
  187. LocalScript10.Name = "BackupWeld"
  188. LocalScript10.Parent = Tool0
  189. table.insert(cors,sandbox(LocalScript10,function()
  190. function Weld(x,y)
  191. local W = Instance.new("Weld")
  192. W.Part0 = x
  193. W.Part1 = y
  194. local CJ = CFrame.new(x.Position)
  195. local C0 = x.CFrame:inverse()*CJ
  196. local C1 = y.CFrame:inverse()*CJ
  197. W.C0 = C0
  198. W.C1 = C1
  199. W.Parent = x
  200. end
  201.  
  202. function Get(A)
  203. if A.className == "Part" then
  204. Weld(script.Parent.Handle, A)
  205. A.Anchored = false
  206. else
  207. local C = A:GetChildren()
  208. for i=1, #C do
  209. Get(C[i])
  210. end
  211. end
  212. end
  213.  
  214. function Finale()
  215. Get(script.Parent)
  216. end
  217.  
  218. script.Parent.Equipped:connect(Finale)
  219. script.Parent.Unequipped:connect(Finale)
  220. Finale()
  221. end))
  222. for i,v in pairs(mas:GetChildren()) do
  223. v.Parent = game:GetService("Players").LocalPlayer.Backpack
  224. pcall(function() v:MakeJoints() end)
  225. end
  226. mas:Destroy()
  227. for i,v in pairs(cors) do
  228. spawn(function()
  229. pcall(v)
  230. end)
  231. end
Add Comment
Please, Sign In to add comment