Advertisement
PowerSans124

Killerbot arm

Jul 18th, 2018
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Player = game:GetService("Players").LocalPlayer
  2. PlayerGui = Player.PlayerGui
  3. Cam = workspace.CurrentCamera
  4. Backpack = Player.Backpack
  5. Character = Player.Character
  6. Humanoid = Character.Humanoid
  7. Mouse = Player:GetMouse()
  8. RootPart = Character["HumanoidRootPart"]
  9. Torso = Character["Torso"]
  10. Head = Character["Head"]
  11. RightArm = Character["Right Arm"]
  12. LeftArm = Character["Left Arm"]
  13. RightLeg = Character["Right Leg"]
  14. LeftLeg = Character["Left Leg"]
  15. RootJoint = RootPart["RootJoint"]
  16. Neck = Torso["Neck"]
  17. RightShoulder = Torso["Right Shoulder"]
  18. LeftShoulder = Torso["Left Shoulder"]
  19. RightHip = Torso["Right Hip"]
  20. LeftHip = Torso["Left Hip"]
  21. local Weapon = Instance.new("Model")
  22. Weapon.Name = "Adds"
  23. Weapon.Parent = Character
  24.  
  25. function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR)
  26. local NEWPART = Instance.new("Part")
  27. NEWPART.formFactor = FORMFACTOR
  28. NEWPART.Reflectance = REFLECTANCE
  29. NEWPART.Transparency = TRANSPARENCY
  30. NEWPART.CanCollide = false
  31. NEWPART.Locked = true
  32. NEWPART.Anchored = true
  33. if ANCHOR == false then
  34. NEWPART.Anchored = false
  35. end
  36. NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
  37. NEWPART.Name = NAME
  38. NEWPART.Size = SIZE
  39. NEWPART.Position = Torso.Position
  40. NEWPART.Material = MATERIAL
  41. NEWPART:BreakJoints()
  42. NEWPART.Parent = PARENT
  43. return NEWPART
  44. end
  45.  
  46. local function weldBetween(a, b)
  47. local weldd = Instance.new("ManualWeld")
  48. weldd.Part0 = a
  49. weldd.Part1 = b
  50. weldd.C0 = CFrame.new()
  51. weldd.C1 = b.CFrame:inverse() * a.CFrame
  52. weldd.Parent = a
  53. return weldd
  54. end
  55.  
  56. function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
  57. local NEWWELD = Instance.new(TYPE)
  58. NEWWELD.Part0 = PART0
  59. NEWWELD.Part1 = PART1
  60. NEWWELD.C0 = C0
  61. NEWWELD.C1 = C1
  62. NEWWELD.Parent = PARENT
  63. return NEWWELD
  64. end
  65.  
  66. IT = Instance.new
  67. CF = CFrame.new
  68. VT = Vector3.new
  69. RAD = math.rad
  70. C3 = Color3.new
  71. UD2 = UDim2.new
  72. BRICKC = BrickColor.new
  73. ANGLES = CFrame.Angles
  74. EULER = CFrame.fromEulerAnglesXYZ
  75. COS = math.cos
  76. ACOS = math.acos
  77. SIN = math.sin
  78. ASIN = math.asin
  79. ABS = math.abs
  80. MRANDOM = math.random
  81. FLOOR = math.floor
  82.  
  83. function MakeForm(PART,TYPE)
  84. if TYPE == "Cyl" then
  85. local MSH = Instance.new("CylinderMesh",PART)
  86. elseif TYPE == "Ball" then
  87. local MSH = Instance.new("SpecialMesh",PART)
  88. MSH.MeshType = "Sphere"
  89. elseif TYPE == "Wedge" then
  90. local MSH = Instance.new("SpecialMesh",PART)
  91. MSH.MeshType = "Wedge"
  92. end
  93. end
  94.  
  95. local Part = CreatePart(3, Character, "Metal", 0, 0, "Mid gray", "Part", VT(0.4,0.4,0.4),false)
  96. for i = 1, 8 do
  97. local Piece = CreatePart(3, Character, "Metal", 0, 0, "Mid gray", "Eye", VT(0,0.35,0.41),false)
  98. CreateWeldOrSnapOrMotor("Weld", Handle, Part, Piece, CF(0, 0, 0) * ANGLES(RAD(0), RAD((360/8)*i), RAD(0)), CF(0, 0, 0))
  99. end
  100. RightArm.Transparency = 1
  101. local BasePart = CreatePart(3, Weapon, "Metal", 0, 0, "really black", "Part", VT(1,2,1),false)
  102. CreateWeldOrSnapOrMotor("Weld", RightArm, RightArm, BasePart, CF(0,0,0) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
  103. local Sphere = CreatePart(3, Weapon, "Metal", 0, 0, "Really red", "Part", VT(1.4,1.4,1.4),false)
  104. MakeForm(Sphere,"Ball")
  105. CreateWeldOrSnapOrMotor("Weld", BasePart, BasePart, Sphere, CF(0.2,0.8,0.1) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
  106. local LaserPart = CreatePart(3, Weapon, "Neon", 0, 0, "Really black", "Part", VT(0.3,0.3,0.1),false)
  107. MakeForm(LaserPart,"Ball")
  108. CreateWeldOrSnapOrMotor("Weld", Sphere, Sphere, LaserPart, CF(0,0,-0.65) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
  109. local Bump = CreatePart(3, Weapon, "Metal", 0, 0, "Really red", "Part", VT(0.3,0.3,0.2),false)
  110. MakeForm(Bump,"Ball")
  111. CreateWeldOrSnapOrMotor("Weld", Sphere, Sphere, Bump, CF(0,0,0.65) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
  112. local BottomLaser = CreatePart(3, Weapon, "Neon", 0, 0, "Lime green", "Part", VT(0.4,0,0.4),false)
  113. MakeForm(BottomLaser,"Cyl")
  114. CreateWeldOrSnapOrMotor("Weld", BasePart, BasePart, BottomLaser, CF(0,-1,0) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
  115. local Part1 = CreatePart(3, Weapon, "Neon", 0, 0, "Really black", "Part", VT(0,0.5,0.5),false)
  116. CreateWeldOrSnapOrMotor("Weld", BasePart, BasePart, Part1, CF(0,-0.76,-0.26) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
  117. local Part2 = CreatePart(3, Weapon, "Neon", 0, 0, "Really red", "Part", VT(0,0.5,0.5),false)
  118. CreateWeldOrSnapOrMotor("Weld", BasePart, Part1, Part2, CF(0,0.25,0) * ANGLES(RAD(0), RAD(0), RAD(-25)), CF(0, -0.25, 0))
  119. local Part3 = CreatePart(3, Weapon, "Neon", 0, 0, "Lime green", "Part", VT(0,0.5,0.5),false)
  120. CreateWeldOrSnapOrMotor("Weld", BasePart, Part1, Part3, CF(0,0.25,0) * ANGLES(RAD(0), RAD(0), RAD(-90)), CF(0, -0.26, 0))
  121. local Part4 = CreatePart(3, Weapon, "Neon", 0, 0, "Really black", "Part", VT(0,0.56,0.5),false)
  122. CreateWeldOrSnapOrMotor("Weld", BasePart, Part2, Part4, CF(0,0.25,0) * ANGLES(RAD(0), RAD(0), RAD(90)), CF(0, -0.26, 0))
  123. local Part5 = CreatePart(3, Weapon, "Neon", 0, 0, "Really red", "Part", VT(0,0.56,0.5),false)
  124. CreateWeldOrSnapOrMotor("Weld", BasePart, Part4, Part5, CF(0,0.25,0) * ANGLES(RAD(0), RAD(0), RAD(-125)), CF(0, -0.26, 0))
  125. local Part = CreatePart(3, Weapon, "Neon", 0, 0, "Really red", "Part", VT(0,0.25,0.5),false)
  126. CreateWeldOrSnapOrMotor("Weld", BasePart, Part4, Part, CF(0,0.25,0) * ANGLES(RAD(0), RAD(0), RAD(25)), CF(0, -0.26/2, 0))
  127. local Part = CreatePart(3, Weapon, "Neon", 0, 0, "Really black", "Part", VT(0,0.3,0.5),false)
  128. CreateWeldOrSnapOrMotor("Weld", BasePart, Part2, Part, CF(0,0.25,0) * ANGLES(RAD(0), RAD(0), RAD(-65)), CF(0, -0.31/2, 0))
  129. local Part = CreatePart(3, Weapon, "Neon", 0, 0, "Really black", "Part", VT(1.4,0,1.4),false)
  130. MakeForm(Part,"Cyl")
  131. CreateWeldOrSnapOrMotor("Weld", Sphere, Sphere, Part, CF(0.035,0,0) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
  132. local Part = CreatePart(3, Weapon, "Neon", 0, 0, "Really red", "Part", VT(1.4,0,1.4),false)
  133. MakeForm(Part,"Cyl")
  134. CreateWeldOrSnapOrMotor("Weld", Sphere, Sphere, Part, CF(0,-0.035,0) * ANGLES(RAD(0), RAD(0), RAD(90)), CF(0, 0, 0))
  135. local Sphere = CreatePart(3, Weapon, "Metal", 0, 0, "Lime green", "Part", VT(0.3,1.6,0.7),false)
  136. MakeForm(Sphere,"Ball")
  137. CreateWeldOrSnapOrMotor("Weld", BasePart, BasePart, Sphere, CF(0.45,0.5,0) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement