Advertisement
HenloMyDude

blocky mech package

Dec 28th, 2019
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.36 KB | None | 0 0
  1. plr = owner
  2. char = plr.Character
  3. ra = char["Right Arm"]
  4. la = char["Left Arm"]
  5. rl = char["Right Leg"]
  6. ll = char["Left Leg"]
  7. tors = char.Torso
  8. hed = char.Head
  9. root = char.HumanoidRootPart
  10. hum = char.Humanoid
  11. dancin = false
  12.  
  13. clerp = function(toclerp, cf, number)
  14. local joint = toclerp
  15. joint.C0 = joint.C0:Lerp(cf, number)
  16. end
  17.  
  18. clerp2 = function(toclerp, cf)
  19. local joint = toclerp
  20. joint.C0 = cf
  21. end
  22.  
  23. clerp3 = function(toclerp, cf, number)
  24. local joint = toclerp
  25. joint.C1 = joint.C1:Lerp(cf, number)
  26. end
  27.  
  28. Swait,swait = function(number)
  29. if number == 0 or number == nil then
  30. game:GetService("RunService").Heartbeat:Wait()
  31. else
  32. for i = 1,number do
  33. game:GetService("RunService").Heartbeat:Wait()
  34. end
  35. end
  36. end
  37.  
  38. ezweld = function(p, a, b, cf)
  39. local weld = Instance.new("Weld",p)
  40. weld.Part0 = a
  41. weld.Part1 = b
  42. weld.C0 = cf
  43. return weld
  44. end
  45.  
  46. NewSound = function(p, id, pit, vol, loop)
  47. local Sound = Instance.new("Sound",p)
  48. Sound.Pitch = pit
  49. Sound.Volume = vol
  50. Sound.SoundId = "rbxassetid://" ..id
  51. Sound.Looped = loop
  52. Sound:Play()
  53. return Sound
  54. end
  55.  
  56. IT = Instance.new
  57. Rad = math.rad
  58. Cos = math.cos
  59. Sin = math.sin
  60. BrickC = BrickColor.new
  61. C3 = Color3.new
  62. VT = Vector3.new
  63.  
  64. anim = "Idle"
  65. attack = false
  66. local RS = char.Torso["Right Shoulder"]
  67. local LS = char.Torso["Left Shoulder"]
  68. local RH = char.Torso["Right Hip"]
  69. local LH = char.Torso["Left Hip"]
  70. local neck = char.Torso["Neck"]
  71. local anim = "Idle"
  72. local animate = char.Animate
  73. local root = char.HumanoidRootPart
  74. local rootj = root.RootJoint
  75. local timepos = 0
  76. local sine = 0
  77. local RSnor = RS.C0
  78. local LSnor = LS.C0
  79. local RHnor = RH.C0
  80. local LHnor = LH.C0
  81. local RSnor2 = RS.C1
  82. local LSnor2 = LS.C1
  83. local RHnor2 = RH.C1
  84. local LHnor2 = LH.C1
  85. local rootjnor = rootj.C0
  86. local necknor = neck.C0
  87. local tors = char.Torso
  88. mouse = plr:GetMouse()
  89. hold = false
  90. Debris = game:GetService("Debris")
  91.  
  92. local dustp = Instance.new("Part", nil)
  93. dustp.Transparency = 1
  94. dustp.Size = Vector3.new(0.1, 0.1, 0.1)
  95. dustp.CanCollide = false
  96. dustp.Locked = true
  97. local dustj = ezweld(char, root, dustp, CFrame.new(0, -tors.Size.y - 0.5, 0))
  98. local dust = Instance.new("ParticleEmitter",dustp)
  99. dust.Rate = 3
  100. dust.Lifetime = NumberRange.new(0.35)
  101. dust.Texture = "rbxassetid://420061161"
  102. dust.Speed = NumberRange.new(2)
  103. dust.EmissionDirection = "Back"
  104. dust.Rotation = NumberRange.new(155)
  105. dust.RotSpeed = NumberRange.new(15)
  106. dust.Enabled = false
  107. dust.Size = NumberSequence.new(tors.Size.y - 1.5, tors.Size.y - 0.75)
  108. dust.Transparency = NumberSequence.new(0.25, 1)
  109. sped = 16
  110. hee = 15
  111. ae = false
  112. emrad = 0
  113.  
  114. function RayCast(Position, Direction, Range, Ignore)
  115. return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore)
  116. end
  117.  
  118. function addpart(p, size, trans, collide, anchor, color, bc)
  119. local part = Instance.new("Part", p)
  120. part.Size = size
  121. part.Transparency = trans
  122. part.CanCollide = collide
  123. part.Anchored = anchor
  124. if bc then
  125. part.BrickColor = BrickColor.new(color)
  126. else
  127. part.Color = color
  128. end
  129. return part
  130. end
  131.  
  132. function addmesh(p, scale, t, msh, txt)
  133. local mesh = Instance.new("SpecialMesh", p)
  134. mesh.Scale = scale
  135. mesh.MeshType = t
  136. if t == "FileMesh" then
  137. mesh.MeshId = "rbxassetid://" ..msh
  138. mesh.TextureId = "rbxassetid://" ..txt
  139. end
  140. end
  141.  
  142. sh = 0.25
  143.  
  144. body = Instance.new("Model", char)
  145. body.Name = "Body"
  146.  
  147. ra.Transparency = 1
  148. upr = addpart(body, Vector3.new(1.36, 1.582, 1.516), 0, false, false, Color3.new(1, 1, 1), false)
  149. upm = addmesh(upr, Vector3.new(1, 1, 1), "FileMesh", 4086240035, 4086231003)
  150. upw = ezweld(body, upr, ra, CFrame.new(0, -0.35, 0))
  151. lwr = addpart(body, Vector3.new(1.107, 1.384, 1.064), 0, false, false, Color3.new(1, 1, 1), false)
  152. lwm = addmesh(lwr, Vector3.new(1, 1, 1), "FileMesh", 4086240028, 4086231003)
  153. lww = ezweld(body, lwr, ra, CFrame.new(0.15, 0.425, 0))
  154. rhd = addpart(body, Vector3.new(0.659, 0.801, 0.627), 0, false, false, Color3.new(1, 1, 1), false)
  155. rhm = addmesh(rhd, Vector3.new(1, 1, 1), "FileMesh", 4086240025, 4086231003)
  156. rhw = ezweld(body, rhd, ra, CFrame.new(0.15, 1.05, 0))
  157.  
  158. la.Transparency = 1
  159. upl = addpart(body, Vector3.new(1.36, 1.582, 1.516), 0, false, false, Color3.new(1, 1, 1), false)
  160. upm = addmesh(upl, Vector3.new(1, 1, 1), "FileMesh", 4086240030, 4086227755)
  161. upw = ezweld(body, upl, la, CFrame.new(0, -0.35, 0))
  162. lwl = addpart(body, Vector3.new(1.107, 1.384, 1.064), 0, false, false, Color3.new(1, 1, 1), false)
  163. lwm = addmesh(lwl, Vector3.new(1, 1, 1), "FileMesh", 4086240052, 4086227755)
  164. lww = ezweld(body, lwl, la, CFrame.new(-0.15, 0.425, 0))
  165. lhd = addpart(body, Vector3.new(0.659, 0.801, 0.627), 0, false, false, Color3.new(1, 1, 1), false)
  166. lhm = addmesh(lhd, Vector3.new(1, 1, 1), "FileMesh", 4086240013, 4086227755)
  167. lhw = ezweld(body, lhd, la, CFrame.new(-0.15, 1.05, 0))
  168.  
  169. rl.Transparency = 1
  170. upr = addpart(body, Vector3.new(1.36, 1.582, 1.516), 0, false, false, Color3.new(1, 1, 1), false)
  171. upm = addmesh(upr, Vector3.new(1, 1, 1), "FileMesh", 4086240115, 4086232421)
  172. upw = ezweld(body, upr, rl, CFrame.new(0, -0.35 - sh, 0))
  173. lwr = addpart(body, Vector3.new(1.107, 1.384, 1.064), 0, false, false, Color3.new(1, 1, 1), false)
  174. lwm = addmesh(lwr, Vector3.new(1, 1, 1), "FileMesh", 4086240070, 4086232421)
  175. lww = ezweld(body, lwr, rl, CFrame.new(0, 0.535 - sh, -0.075))
  176. rft = addpart(body, Vector3.new(0.659, 0.801, 0.627), 0, false, false, Color3.new(1, 1, 1), false)
  177. rfm = addmesh(rft, Vector3.new(1, 1, 1), "FileMesh", 4086240077, 4086232421)
  178. rfw = ezweld(body, rft, rl, CFrame.new(0, 1.15 - sh, -0.075))
  179.  
  180. ll.Transparency = 1
  181. upl = addpart(body, Vector3.new(1.36, 1.582, 1.516), 0, false, false, Color3.new(1, 1, 1), false)
  182. upm = addmesh(upl, Vector3.new(1, 1, 1), "FileMesh", 4086240074, 4086229148)
  183. upw = ezweld(body, upl, ll, CFrame.new(0, -0.35 - sh, 0))
  184. lwl = addpart(body, Vector3.new(1.107, 1.384, 1.064), 0, false, false, Color3.new(1, 1, 1), false)
  185. lwm = addmesh(lwl, Vector3.new(1, 1, 1), "FileMesh", 4086240094, 4086229148)
  186. lww = ezweld(body, lwl, ll, CFrame.new(0, 0.535 - sh, -0.075))
  187. lft = addpart(body, Vector3.new(0.659, 0.801, 0.627), 0, false, false, Color3.new(1, 1, 1), false)
  188. lfm = addmesh(lft, Vector3.new(1, 1, 1), "FileMesh", 4086240057, 4086229148)
  189. lfw = ezweld(body, lft, ll, CFrame.new(0, 1.15 - sh, -0.075))
  190.  
  191. tors.Transparency = 1
  192. upt = addpart(body, Vector3.new(2.011, 0.598, 1.768), 0, false, false, Color3.new(1, 1, 1), false)
  193. upm = addmesh(upt, Vector3.new(1, 1, 1), "FileMesh", 4086240054, 4086234619)
  194. upw = ezweld(body, upt, tors, CFrame.new(0, -0.25, 0))
  195. lwt = addpart(body, Vector3.new(2.057, 1.485, 2.12), 0, false, false, Color3.new(1, 1, 1), false)
  196. lwm = addmesh(lwt, Vector3.new(1, 1, 1), "FileMesh", 4086240109, 4086234619)
  197. lww = ezweld(char, lwt, tors, CFrame.new(0, 0.75, 0))
  198.  
  199. hed.Transparency = 1
  200. hed:ClearAllChildren()
  201. hd = addpart(body, Vector3.new(1.194, 2.557, 2.074), 0, false, false, Color3.new(1, 1, 1), false)
  202. hdm = addmesh(hd, Vector3.new(1, 1, 1), "FileMesh", 4086240014, 4086236176)
  203. hdw = ezweld(body, hd, hed, CFrame.new(0, -0.425, 0.5))
  204.  
  205. for i,v in pairs (char:children()) do
  206. if v:IsA("Hat") or v:IsA("Accessory") or v:IsA("Shirt") or v:IsA("Pants") or v:IsA("ShirtGraphic") then
  207. v:remove()
  208. end
  209. if v:IsA("Part") then
  210. v.BrickColor = BrickColor.new("Cyan")
  211. end
  212. if v:IsA("BodyColors") then
  213. v:remove()
  214. end
  215. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement