Advertisement
Guest User

fat

a guest
Oct 18th, 2019
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.16 KB | None | 0 0
  1. local Tool = script.Parent
  2. local Player = game.Players.LocalPlayer
  3.  
  4. local ContentProvider = game:GetService("ContentProvider")
  5. ContentProvider:Preload("rbxassetid://379973323")
  6.  
  7. repeat wait() until Player.Character
  8.  
  9. local Character = Player.Character
  10.  
  11. local mouse = Player:GetMouse()
  12.  
  13. print("Spooling up...")
  14.  
  15. local LArm = Character:WaitForChild("Left Arm")
  16. local RArm = Character:WaitForChild("Right Arm")
  17. local LLeg = Character:WaitForChild("Left Leg")
  18. local RLeg = Character:WaitForChild("Right Leg")
  19. local Torso = Character:WaitForChild("Torso")
  20.  
  21. local pulling = false
  22. local newZig = false
  23.  
  24. --local oPaperScale = Tool.Paper.Mesh.Scale.y
  25. --local oTobaccyScale = Tool.Tobaccy.Mesh.Scale.y
  26.  
  27. local ABS, HUGE, FLOOR, CEIL = math.abs, math.huge, math.floor, math.ceil
  28. local RAD, SIN, ATAN, COS = math.rad, math.sin, math.atan2, math.cos
  29. local VEC3 = Vector3.new
  30. local CF, CFANG = CFrame.new, CFrame.Angles
  31. local INSERT = table.insert
  32.  
  33. local Torso = Character:FindFirstChild("Torso")
  34. local rArm = Character:FindFirstChild("Right Arm")
  35. local lArm = Character:FindFirstChild("Left Arm")
  36.  
  37. local rShoulder = Torso:FindFirstChild("Right Shoulder")
  38. local lShoulder = Torso:FindFirstChild("Left Shoulder")
  39.  
  40. print("Found the shoulders")
  41.  
  42. local rShoulderStorage = rShoulder:Clone()
  43. local lShoulderStorage = lShoulder:Clone()
  44.  
  45. print("Cloned the shoulders.")
  46.  
  47. local lit = false
  48. local ready = false
  49. local hasZig = false
  50. local currentZig
  51. local currentWeld
  52. local Animating = false
  53. local numberLeft = 20
  54. local drawing = false
  55.  
  56. local heat = 0
  57. local size = 1000
  58. local minSize = 250
  59.  
  60. local Selected = false
  61.  
  62. local RS = game:GetService("RunService").RenderStepped
  63.  
  64. function TweenJoint(Joint, NewC0, NewC1, Alpha, Duration)
  65. coroutine.resume(coroutine.create(function()
  66. local TweenIndicator = nil --At the current moment, this is how the script determines whether the function is already tweening a joint
  67. local NewCode = math.random(-1e9, 1e9) --This creates a random code between -1000000000 and 1000000000
  68. if (not Joint:FindFirstChild("TweenCode")) then --If the joint isn't being tweened, then
  69. TweenIndicator = Instance.new("IntValue")
  70. TweenIndicator.Name = "TweenCode"
  71. TweenIndicator.Value = NewCode
  72. TweenIndicator.Parent = Joint
  73. else
  74. TweenIndicator = Joint.TweenCode
  75. TweenIndicator.Value = NewCode --If the joint is already being tweened, this will change the code, and the tween loop will stop
  76. end
  77. local MatrixCFrame = function(CFPos, CFTop, CFBack)
  78. local CFRight = CFTop:Cross(CFBack)
  79. return CF(
  80. CFPos.x, CFPos.y, CFPos.z,
  81. CFRight.x, CFTop.x, CFBack.x,
  82. CFRight.y, CFTop.y, CFBack.y,
  83. CFRight.z, CFTop.z, CFBack.z
  84. )
  85. end
  86. local LerpCF = function(StartCF, EndCF, Alpha)
  87. local StartTop = (StartCF * CFANG(RAD(90), 0, 0)).lookVector
  88. local StartBack = -StartCF.lookVector
  89. local EndTop = (EndCF * CFANG(RAD(90), 0, 0)).lookVector
  90. local EndBack = -EndCF.lookVector
  91. local StartPos = StartCF.p
  92. local EndPos = EndCF.p
  93. local NewCF = MatrixCFrame(
  94. StartPos:lerp(EndPos, Alpha),
  95. StartTop:lerp(EndTop, Alpha),
  96. StartBack:lerp(EndBack, Alpha)
  97. )
  98. return NewCF
  99. end
  100. local StartC0 = Joint.C0
  101. local StartC1 = Joint.C1
  102. local X = 0
  103. while true do
  104. local NewX = X + math.min(1.5 / math.max(Duration, 0), 90)
  105. X = (NewX > 90 and 90 or NewX)
  106. if TweenIndicator.Value ~= NewCode then break end --This makes sure that another tween wasn't called on the same joint
  107. if (not Selected) then break end --This stops the tween if the tool is deselected
  108. if NewC0 then Joint.C0 = LerpCF(StartC0, NewC0, Alpha(X)) end
  109. if NewC1 then Joint.C1 = LerpCF(StartC1, NewC1, Alpha(X)) end
  110. if X == 90 then break end
  111. RS:wait() --This makes the for loop step every 1/60th of a second
  112. end
  113. if TweenIndicator.Value == NewCode then --If this tween functions was the last one called on a joint then it will remove the code
  114. TweenIndicator:Destroy()
  115. end
  116. end))
  117. end
  118.  
  119. local Sine = function(X)
  120. return SIN(RAD(X))
  121. end
  122.  
  123. local Linear = function(X)
  124. return (X / 90)
  125. end
  126.  
  127. local GetPack = function(lWeld,packClone,defaultLArmC0,defaultLArmC1)
  128. TweenJoint(lWeld, defaultLArmC0 * CF(0,-0.05,0), defaultLArmC1 * CFANG(RAD(-8), RAD(25), RAD(-15)), Linear, 0.5 * 0.5)
  129.  
  130. local packWeld = Instance.new("Weld")
  131. packWeld.Name = "packWeld"
  132. packWeld.Part0 = packClone
  133. packWeld.Part1 = lArm
  134. packWeld.C0 = CF(0,-0.7,-0.9) * CFANG(RAD(75),RAD(-8),RAD(180))
  135. packWeld.C1 = CF(0,0,0) --* CFANG(RAD(180),RAD(80),RAD(0))
  136. packWeld.Parent = packClone
  137.  
  138. wait(0.5 * 0.5)
  139.  
  140. packClone.Parent = lArm
  141.  
  142. TweenJoint(lWeld, defaultLArmC0 * CF(0,-0.05,0), defaultLArmC1 * CFANG(RAD(-8), RAD(8), RAD(8)), Linear, 0.5 * 0.7)
  143.  
  144. ready = true
  145. end
  146.  
  147. Tool.Equipped:connect(function()
  148. Selected = true
  149. print("I'm selected.")
  150.  
  151. packClone = game.Lighting.Zigaretenzeug.Pack:Clone()
  152.  
  153. lWeld = Instance.new("Weld")
  154. lWeld.Name = "lWeld"
  155. lWeld.C0 = lShoulder.C0
  156. lWeld.C1 = lShoulder.C1
  157. lWeld.Part0 = Torso
  158. lWeld.Part1 = lArm
  159.  
  160. rWeld = Instance.new("Weld")
  161. rWeld.Name = "rWeld"
  162. rWeld.C0 = rShoulder.C0
  163. rWeld.C1 = rShoulder.C1
  164. rWeld.Part0 = Torso
  165. rWeld.Part1 = rArm
  166.  
  167. local defaultLArmC0 = lShoulder.C0
  168. local defaultLArmC1 = lShoulder.C1
  169.  
  170. local defaultRArmC0 = rShoulder.C0
  171. local defaultRArmC1 = rShoulder.C1
  172.  
  173. lShoulder:remove()
  174. rShoulder:remove()
  175.  
  176. lWeld.Parent = Torso
  177. rWeld.Parent = Torso
  178.  
  179. print("Weld cloned and parented.")
  180.  
  181. GetPack(lWeld,packClone,defaultLArmC0,defaultLArmC1)
  182.  
  183. mouse.Button1Down:connect(function()
  184. if not hasZig and ready and not pulling then
  185. pulling = true
  186. TweenJoint(lWeld, Tool.LeftValue.Value, CF(0,0,0), Linear, 0.5 * 0.7)
  187. TweenJoint(rWeld, Tool.RightValue.Value, CF(0,0,0), Linear, 0.5 * 0.7)
  188.  
  189. wait(0.5 * 0.72)
  190.  
  191. hasZig = true
  192. numberLeft = numberLeft - 1
  193. Tool.Name = "Izzurba - "..numberLeft.."/20"
  194. print("Zigareten left: "..numberLeft)
  195.  
  196. heat = 0
  197. size = 2000
  198. minSize = 500
  199.  
  200. local zigAnchor = game.Lighting.Zigaretenzeug.Zigareten.Paper:Clone()
  201. local anchorWeld = Instance.new("Weld")
  202. anchorWeld.Name = "anchorWeld"
  203. anchorWeld.Part0 = zigAnchor
  204. anchorWeld.Part1 = rArm
  205. anchorWeld.C0 = CF(-0.2,1,-0.2) * CFANG(RAD(0),RAD(0),RAD(0))
  206. anchorWeld.C1 = CF(0,0,0) * CFANG(RAD(0),RAD(180),RAD(0))
  207. anchorWeld.Parent = zigAnchor
  208. zigAnchor.Transparency = 1
  209. zigAnchor.Parent = rArm
  210.  
  211. local zigClone = game.Lighting.Zigaretenzeug.Zigareten:Clone()
  212. zigWeld = Instance.new("Weld")
  213. zigWeld.Name = "zigWeld"
  214. zigWeld.Part0 = zigClone.Paper
  215. zigWeld.Part1 = zigAnchor
  216. zigWeld.C0 = CF(0,0,0) * CFANG(RAD(-20),RAD(0),RAD(15))
  217. zigWeld.C1 = CF(0,0,0) * CFANG(RAD(0),RAD(0),RAD(0))
  218. zigWeld.Parent = zigClone
  219. zigClone.Parent = rArm
  220.  
  221. currentZig = zigClone
  222. currentWeld = zigWeld
  223.  
  224. local PaperOffsetAmount = zigClone.Paper.Mesh.Scale.y/size*(zigClone.Paper.Size.y/2)
  225. local PaperOriginalScale = zigClone.Paper.Mesh.Scale.y
  226.  
  227. local TobaccyOffsetAmount = zigClone.Tobaccy.Mesh.Scale.y/size*(zigClone.Tobaccy.Size.y/2)
  228. local TobaccyOriginalScale = zigClone.Tobaccy.Mesh.Scale.y
  229.  
  230. local CherryOffsetAmount = zigClone.Cherry.Mesh.Scale.y/size*(zigClone.Cherry.Size.y/2)
  231. local CherryOriginalScale = zigClone.Cherry.Mesh.Scale.y
  232.  
  233. TweenJoint(zigWeld, CF(0,0,-0.22) * CFANG(RAD(-12),RAD(0),RAD(60)), CF(0,0,0), Linear, 0.5 * 1)
  234.  
  235. TweenJoint(lWeld, Tool.LeftValue2.Value, CF(0,0,0), Linear, 0.5 * 1)
  236. TweenJoint(rWeld, Tool.RightValue2.Value, CF(0,0,0), Linear, 0.5 * 1)
  237.  
  238. wait(0.5 * 1)
  239.  
  240. packClone.Parent = nil
  241.  
  242. local lighterClone = game.Lighting.Zigaretenzeug.Lighter:Clone()
  243. lighterClone.Parent = lArm
  244.  
  245. local lighterWeld = Instance.new("Weld")
  246. lighterWeld.Name = "lighterWeld"
  247. lighterWeld.Part0 = lighterClone
  248. lighterWeld.Part1 = lArm
  249. lighterWeld.C0 = CF(-0.34,-0.53,-1.11) * CFANG(RAD(95),RAD(-8),RAD(180))
  250. lighterWeld.C1 = CF(0,0,0) --* CFANG(RAD(180),RAD(80),RAD(0))
  251. lighterWeld.Parent = lighterClone
  252.  
  253. lighterClone.Parent = lArm
  254.  
  255. TweenJoint(lWeld, Tool.LeftValue3.Value, CF(0,0,0), Linear, 0.5 * 1)
  256.  
  257. ---zigWeld.C0 = CF(0,-0.7,-0.9) * CFANG(RAD(75),RAD(-8),RAD(180)) REMEMBER THIS
  258.  
  259. wait(0.5 * 1.2)
  260.  
  261. lighterClone.Sound:Play()
  262. wait(0.1)
  263. lighterClone.GUI.Enabled = true
  264.  
  265. heat = 1
  266.  
  267. wait(0.5)
  268.  
  269. zigClone.Smack.ParticleEmitter.Enabled = true
  270. zigClone.Cherry.Transparency = 0.1
  271.  
  272. currentZig.Paper.Crackle:Play()
  273.  
  274. wait(0.7)
  275.  
  276. lighterClone.GUI.Enabled = false
  277.  
  278. wait(0.2)
  279.  
  280. TweenJoint(lWeld, Tool.LeftValue2.Value, CF(0,0,0), Linear, 0.5 * 1)
  281.  
  282. wait(0.5 * 1)
  283.  
  284. lighterClone:Remove()
  285.  
  286. local lShoulderStorageClone = lShoulderStorage:Clone()
  287. lShoulderStorageClone.Parent = Torso
  288. lWeld:Remove()
  289.  
  290. TweenJoint(rWeld, Tool.RightValue4.Value, CF(0,0,0), Linear, 0.5 * 1)
  291. TweenJoint(zigWeld, CF(0,0.5,-0.22) * CFANG(RAD(75),RAD(0),RAD(20)), CF(0,0,0) * CFANG(0,0,RAD(20)), Linear, 0.5 * 1)
  292.  
  293. pulling = false
  294.  
  295. heat = 0.3
  296.  
  297. delay(0,function()
  298. while hasZig and size > minSize and Selected do
  299. wait(0.1)
  300. size = size - (1*heat)
  301. zigClone.Paper.Mesh.Scale = Vector3.new(zigClone.Paper.Mesh.Scale.x, PaperOriginalScale*size/2000, zigClone.Paper.Mesh.Scale.z)
  302. zigClone.Paper.Mesh.Offset = Vector3.new(zigClone.Paper.Mesh.Offset.x, zigClone.Paper.Mesh.Offset.y + (PaperOffsetAmount*heat), zigClone.Paper.Mesh.Offset.z)
  303.  
  304. zigClone.Tobaccy.Mesh.Scale = Vector3.new(zigClone.Tobaccy.Mesh.Scale.x, TobaccyOriginalScale*size/2000, zigClone.Tobaccy.Mesh.Scale.z)
  305. zigClone.Tobaccy.Mesh.Offset = Vector3.new(zigClone.Tobaccy.Mesh.Offset.x, zigClone.Tobaccy.Mesh.Offset.y + (TobaccyOffsetAmount*heat), zigClone.Tobaccy.Mesh.Offset.z)
  306.  
  307. zigClone.Cherry.Mesh.Scale = Vector3.new(zigClone.Cherry.Mesh.Scale.x, CherryOriginalScale*size/2000, zigClone.Cherry.Mesh.Scale.z)
  308. zigClone.Cherry.Mesh.Offset = Vector3.new(zigClone.Cherry.Mesh.Offset.x, zigClone.Cherry.Mesh.Offset.y + (CherryOffsetAmount*heat), zigClone.Cherry.Mesh.Offset.z)
  309.  
  310. if size <= minSize then
  311. zigWeld:Remove()
  312. zigClone.Parent = workspace
  313. hasZig = false
  314. ready = false
  315. currentZig.Paper.Crackle:Stop()
  316. zigAnchor:Remove()
  317. TweenJoint(rWeld, Tool.RightValue4.Value, CF(0,0,0), Linear, 0.5 * 1)
  318. --[[local gyro = Instance.new("BodyGyro")
  319. gyro.Parent = zigClone.Paper]]
  320. local oldZig = zigClone
  321. delay(0,function()
  322. wait(30)
  323. if oldZig then
  324. oldZig.Fizzled.Value = true
  325. oldZig.Cherry.Material = "Slate"
  326. oldZig.Cherry.BrickColor = BrickColor.new("Fossil")
  327. oldZig.Smack.ParticleEmitter.Enabled = false
  328. end
  329. wait(60)
  330. oldZig:Remove()
  331. end)
  332. oldZig.Paper.Touched:connect(function(hit)
  333. if hit.Name == "Left Leg" or hit.Name == "Right Leg" then
  334. if oldZig.Fizzled.Value ~= true then
  335. oldZig.Fizzled.Value = true
  336. oldZig.Paper.Sound:Play()
  337. oldZig.Cherry.Material = "Slate"
  338. oldZig.Cherry.BrickColor = BrickColor.new("Fossil")
  339. oldZig.Smack.ParticleEmitter.Enabled = false
  340. end
  341. end
  342. end)
  343. wait(0.1)
  344. lWeld = Instance.new("Weld")
  345. lWeld.Name = "lWeld"
  346. lWeld.C0 = lShoulder.C0
  347. lWeld.C1 = lShoulder.C1
  348. lWeld.Part0 = Torso
  349. lWeld.Part1 = lArm
  350.  
  351. lShoulder:remove()
  352. lWeld.Parent = Torso
  353. GetPack(lWeld,packClone,defaultLArmC0,defaultLArmC1)
  354. end
  355.  
  356. if numberLeft <= 0 then
  357. Selected = false
  358. currentWeld:Remove()
  359. currentZig.Parent = workspace
  360. packClone.Parent = nil
  361. hasZig = false
  362. ready = false
  363. pulling = false
  364. drawing = false
  365. currentZig.Paper.Crackle:Stop()
  366. local oldZig = currentZig
  367. oldZig.Paper.CanCollide = true
  368. local lShoulderStorageClone = lShoulderStorage:Clone()
  369. lShoulderStorageClone.Parent = Torso
  370. lWeld:Remove()
  371. local rShoulderStorageClone = rShoulderStorage:Clone()
  372. rShoulderStorageClone.Parent = Torso
  373. rWeld:Remove()
  374. rArm:findFirstChild("Paper"):Remove()
  375. delay(0,function()
  376. wait(30)
  377. if oldZig then
  378. oldZig.Fizzled.Value = true
  379. oldZig.Cherry.Material = "Slate"
  380. oldZig.Cherry.BrickColor = BrickColor.new("Fossil")
  381. oldZig.Smack.ParticleEmitter.Enabled = false
  382. end
  383. wait(60)
  384. oldZig:Remove()
  385. end)
  386. oldZig.Paper.Touched:connect(function(hit)
  387. if hit.Name == "Left Leg" or hit.Name == "Right Leg" then
  388. if oldZig.Fizzled.Value ~= true then
  389. oldZig.Fizzled.Value = true
  390. oldZig.Paper.Sound:Play()
  391. oldZig.Cherry.Material = "Slate"
  392. oldZig.Cherry.BrickColor = BrickColor.new("Fossil")
  393. oldZig.Smack.ParticleEmitter.Enabled = false
  394. end
  395. end
  396. end)
  397. print("I'm gone!")
  398. Tool:Remove()
  399. end
  400.  
  401. end
  402. end)
  403.  
  404.  
  405. elseif hasZig and ready and not pulling and not drawing then
  406. drawing = true
  407. TweenJoint(rWeld, Tool.RightValue2.Value, CF(0,0,0), Linear, 0.5 * 1)
  408. TweenJoint(zigWeld, CF(0,0,-0.22) * CFANG(RAD(-12),RAD(0),RAD(60)), CF(0,0,0), Linear, 0.5 * 1)
  409. wait(0.5 * 1)
  410. --currentZig.Paper.Crackle:Play()
  411. if drawing then
  412. heat = 2.5
  413. currentZig.Paper.Crackle.PlaybackSpeed = 3
  414. currentZig.Paper.Crackle.Volume = 0.4
  415. end
  416. mouse.Button1Up:connect(function()
  417. if hasZig and ready and not pulling then
  418. drawing = false
  419. TweenJoint(rWeld, Tool.RightValue4.Value, CF(0,0,0), Linear, 0.5 * 1)
  420. TweenJoint(zigWeld, CF(0,0.5,-0.22) * CFANG(RAD(75),RAD(0),RAD(20)), CF(0,0,0) * CFANG(0,0,RAD(20)), Linear, 0.5 * 1)
  421. currentZig.Paper.Crackle.PlaybackSpeed = 1.7
  422. currentZig.Paper.Crackle.Volume = 0.1
  423. heat = 0.3
  424. end
  425. end)
  426. end
  427.  
  428. end)
  429.  
  430. end)
  431.  
  432. Tool.Unequipped:connect(function()
  433. Selected = false
  434. currentWeld:Remove()
  435. currentZig.Parent = workspace
  436. packClone.Parent = nil
  437. hasZig = false
  438. ready = false
  439. pulling = false
  440. drawing = false
  441. currentZig.Paper.Crackle:Stop()
  442. local oldZig = currentZig
  443. oldZig.Paper.CanCollide = true
  444. local lShoulderStorageClone = lShoulderStorage:Clone()
  445. lShoulderStorageClone.Parent = Torso
  446. lWeld:Remove()
  447. local rShoulderStorageClone = rShoulderStorage:Clone()
  448. rShoulderStorageClone.Parent = Torso
  449. rWeld:Remove()
  450. rArm:findFirstChild("Paper"):Remove()
  451. delay(0,function()
  452. wait(30)
  453. if oldZig then
  454. oldZig.Fizzled.Value = true
  455. oldZig.Cherry.Material = "Slate"
  456. oldZig.Cherry.BrickColor = BrickColor.new("Fossil")
  457. oldZig.Smack.ParticleEmitter.Enabled = false
  458. end
  459. wait(60)
  460. oldZig:Remove()
  461. end)
  462. oldZig.Paper.Touched:connect(function(hit)
  463. if hit.Name == "Left Leg" or hit.Name == "Right Leg" then
  464. if oldZig.Fizzled.Value ~= true then
  465. oldZig.Fizzled.Value = true
  466. oldZig.Paper.Sound:Play()
  467. oldZig.Cherry.Material = "Slate"
  468. oldZig.Cherry.BrickColor = BrickColor.new("Fossil")
  469. oldZig.Smack.ParticleEmitter.Enabled = false
  470. end
  471. end
  472. end)
  473. print("I'm unselected!")
  474. end)
  475.  
  476. local heat = 0
  477. local size = 100
  478. local minSize = 25
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement