Advertisement
sawgamer1

Untitled

Jul 4th, 2018
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.28 KB | None | 0 0
  1.  
  2. player = game.Players.LocalPlayer
  3. chara = player.Character
  4. debby = game.Debris
  5. Mouse = player:GetMouse()
  6. rs = game:GetService("RunService").RenderStepped
  7.  
  8. --Outfit--
  9. New = function(Object, Parent, Name, Data)
  10. local Object = Instance.new(Object)
  11. for Index, Value in pairs(Data or {}) do
  12. Object[Index] = Value
  13. end
  14. Object.Parent = Parent
  15. Object.Name = Name
  16. return Object
  17. end
  18.  
  19. Can = New("Part",chara,"Can",{Size = Vector3.new(0.800000012, 1.20000005, 0.800000012),CFrame = CFrame.new(-30.8000011, 1.60000002, -33, 0.707107842, 0, -0.70710814, 0, 1, 0, 0.70710814, 0, 0.707107842),})
  20. CanMesh = New("SpecialMesh",Can,"CanMesh",{Scale = Vector3.new(1.20000005, 1.20000005, 1.20000005),MeshId = "http://www.roblox.com/asset/?id=10470609",TextureId = "rbxassetid://2037798412",MeshType = Enum.MeshType.FileMesh,})
  21. Weld = New("ManualWeld",Can,"Weld",{Part0 = Can,Part1 = chara["Right Arm"],C0 = CFrame.new(0, 0, 0, 0.707107842, 0, 0.70710814, 0, 1, 0, -0.70710814, 0, 0.707107842),C1 = CFrame.new(-0.300001144, -1, -0.100000024, 1, 0, 0, 0, 0, 1, -0, -1, -0),})
  22.  
  23. --Sounds--
  24. function LoadSnd(id,loop,vol,pit)
  25. local snd = New("Sound",chara,"Sound",{SoundId = "rbxassetid://"..id,Looped = loop,Volume = vol,Pitch = pit})
  26. return snd
  27. end
  28. DrinkSnd = LoadSnd(491214142,true,1,1)
  29. StartUpSnd = LoadSnd(10721950,false,1,1)
  30. SwingSnd = LoadSnd(158037267,false,1,1)
  31.  
  32. function CreateTrailObj(parent,color1,color2,ofsx,ofsz)
  33. local Att1 = New("Attachment",parent,"Att1",{Position = Vector3.new(ofsx,parent.Size.Y/2,ofsz)})
  34. local Att2 = New("Attachment",parent,"Att2",{Position = Vector3.new(ofsx,-(parent.Size.Y/2),ofsz)})
  35. local TEff = New("Trail",parent,"TrailEff",{Color = ColorSequence.new({ColorSequenceKeypoint.new(0,BrickColor.new(color1).Color),ColorSequenceKeypoint.new(1,BrickColor.new(color2).Color)}),Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,.5),NumberSequenceKeypoint.new(1,1)}),Attachment0 = Att1,Attachment1 = Att2,Enabled = false,Lifetime = .5,MinLength = .001})
  36. return TEff
  37. end
  38.  
  39. --Clerp Animations--
  40. TC = chara.HumanoidRootPart.RootJoint
  41. HC = chara.Torso.Neck
  42. RAC = chara.Torso["Right Shoulder"]
  43. LAC = chara.Torso["Left Shoulder"]
  44. RLC = chara.Torso["Right Hip"]
  45. LLC = chara.Torso["Left Hip"]
  46. TCF = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  47. HCF = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  48. RACF = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  49. LACF = CFrame.new(-1, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  50. RLCF = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  51. LLCF = CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  52. RWF = CFrame.new(-1.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  53. LWF = CFrame.new(1.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  54. RLWF = CFrame.new(-.5, 2, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  55. LLWF = CFrame.new(.5, 2, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  56. RW = Instance.new("Weld",HC.Parent)
  57. RW.Part1 = HC.Parent
  58. RW.Part0 = chara["Right Arm"]
  59. RW.C0 = RWF
  60.  
  61. function clerp(a,b,c)
  62. return a:lerp(b,c)
  63. end
  64.  
  65. --TC.C0 = TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90))
  66. --HC.C0 = HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-50))
  67. --RW.C0 = (RWF + Vector3.new(1,2,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90))
  68. --LW.C0 = LWF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(2))
  69.  
  70. RW.C0 = RWF
  71.  
  72. --Idle Clerp--
  73. IRWF = (RWF - Vector3.new(-.2,0,-.5)) * CFrame.fromEulerAnglesXYZ(math.rad(-90),math.rad(-20),0)
  74.  
  75. function res()
  76. RW.C0 = IRWF
  77. end
  78. res()
  79.  
  80. --Mouse Functions--
  81. dif = 0
  82. function onKeyDown(key)
  83. if key == "q" then
  84. if dif == 0 then
  85. CanMesh.TextureId = "http://www.roblox.com/asset/?id=2044175317"
  86. dif = 1
  87. elseif dif == 1 then
  88. CanMesh.TextureId = "http://www.roblox.com/asset/?id=11126634"
  89. dif = 2
  90. elseif dif == 2 then
  91. CanMesh.TextureId = "http://www.roblox.com/asset/?id=25323909"
  92. dif = 3
  93. elseif dif == 3 then
  94. CanMesh.TextureId = "http://www.roblox.com/asset/?id=24970071"
  95. dif = 4
  96. elseif dif == 4 then
  97. CanMesh.TextureId = "http://www.roblox.com/asset/?id=16574454"
  98. dif = 5
  99. elseif dif == 5 then
  100. CanMesh.TextureId = "http://www.roblox.com/asset/?id=24970256"
  101. dif = 6
  102. elseif dif == 6 then
  103. CanMesh.TextureId = "http://www.roblox.com/asset/?id=10549894"
  104. dif = 7
  105. elseif dif == 7 then
  106. CanMesh.TextureId = "http://www.roblox.com/asset/?id=15218018"
  107. dif = 8
  108. elseif dif == 8 then
  109. CanMesh.TextureId = "http://www.roblox.com/asset/?id=28121842"
  110. dif = 9
  111. elseif dif == 9 then
  112. CanMesh.TextureId = "http://www.roblox.com/asset/?id=24878483"
  113. dif = 10
  114. elseif dif == 10 then
  115. CanMesh.TextureId = "http://www.roblox.com/asset/?id=10470600"
  116. dif = 0
  117. end
  118. end
  119. end
  120. del = false
  121. normalwel = Weld.C0
  122. function onButton1Down()
  123. if del == false then
  124. del = true
  125. for i = 0,1,.2 do
  126. rs:wait()
  127. RW.C0 = clerp(IRWF,(RWF - Vector3.new(-.3,.1,-.7)) * CFrame.fromEulerAnglesXYZ(math.rad(-110),math.rad(-70),math.rad(20)),i)
  128. HC.C0 = clerp(HCF,HCF * CFrame.fromEulerAnglesXYZ(math.rad(-10),0,0),i)
  129. end
  130. Weld.C0 = CFrame.new(0, 0, 0, -0.122617364, -0.0738587826, 0.989701807, -0.81083709, 0.582491338, -0.0569874756, -0.572283864, -0.809474528, -0.13131094)
  131. DrinkSnd:Play()
  132. wait(2)
  133. DrinkSnd:Stop()
  134. Weld.C0 = normalwel
  135. for i = 0,1,.2 do
  136. rs:wait()
  137. RW.C0 = clerp(IRWF,(RWF - Vector3.new(-.3,.1,-.7)) * CFrame.fromEulerAnglesXYZ(math.rad(-110),math.rad(-70),math.rad(20)),1-i)
  138. HC.C0 = clerp(HCF,HCF * CFrame.fromEulerAnglesXYZ(math.rad(-10),0,0),1-i)
  139. end
  140. SwingSnd:Play()
  141. for i = 0,1,.25 do
  142. rs:wait()
  143. RW.C0 = clerp(IRWF,(RWF - Vector3.new(0,-1,0)) * CFrame.fromEulerAnglesXYZ(math.rad(-190),0,0),i)
  144. end
  145. local fcan = Can:Clone()
  146. fcan.Weld:Destroy()
  147. fcan.Parent = workspace
  148. fcan.Position = Can.Position
  149. local bfos = Instance.new("BodyVelocity",fcan)
  150. bfos.P = 1000
  151. bfos.MaxForce = Vector3.new(1000,1000,1000)
  152. bfos.Velocity = Vector3.new(0,10,0) + chara.Head.CFrame.lookVector*-30
  153. debby:AddItem(bfos,.1)
  154. coroutine.resume(coroutine.create(function()
  155. wait(10)
  156. for i = 0,1,.1 do
  157. wait(.1)
  158. fcan.Transparency = i
  159. end
  160. fcan:Destroy()
  161. end))
  162. Can.Transparency = 1
  163. wait(1)
  164. for i = 0,1,.2 do
  165. rs:wait()
  166. RW.C0 = clerp(RWF,(RWF - Vector3.new(0,-1,0)) * CFrame.fromEulerAnglesXYZ(math.rad(-190),0,0),1-i)
  167. end
  168. wait(1)
  169. StartUpSnd:Play()
  170. for i = 0,1,.1 do
  171. wait(.1)
  172. Can.Transparency = 1-i
  173. end
  174. for i = 0,1,.2 do
  175. rs:wait()
  176. RW.C0 = clerp(RWF,IRWF,i)
  177. end
  178. del = false
  179. end
  180. end
  181.  
  182. --Mouse Activation--
  183. if Mouse then
  184. Mouse.KeyDown:connect(onKeyDown)
  185. Mouse.Button1Down:connect(onButton1Down)
  186. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement