Advertisement
aarontje11002

my own script

Mar 20th, 2015
329
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.14 KB | None | 0 0
  1. Player = Game:GetService("Players").LocalPlayer
  2. Mouse = Player:GetMouse()
  3. Character = Player.Character
  4. RightArm = Character:WaitForChild("Right Arm")
  5.  
  6. function Part(Parent, Size, Color, Material, Transparency)
  7. local NewPart = Instance.new("Part", Parent)
  8. NewPart.FormFactor = 3
  9. NewPart.TopSurface = 0
  10. NewPart.BottomSurface = 0
  11. NewPart.Size = Size or Vector3.new(1, 1, 1)
  12. NewPart.BrickColor = BrickColor.new(Color or "Black")
  13. NewPart.Material = Material or "SmoothPlastic"
  14. NewPart.Transparency = Transparency or 0
  15. NewPart.CanCollide = false
  16. return NewPart
  17. end
  18.  
  19. function Wedge(Parent, Size, Color, Material, Transparency)
  20. local NewWedge = Instance.new("WedgePart", Parent)
  21. NewWedge.FormFactor = 3 --Custom formFactor, makes it resizeable to really small scales
  22. NewWedge.TopSurface = 0 --Smooth SurfaceType
  23. NewWedge.BottomSurface = 0
  24. NewWedge.Size = Size or Vector3.new(1, 1, 1)
  25. NewWedge.BrickColor = BrickColor.new(Color or "Black")
  26. NewWedge.Material = Material or "SmoothPlastic"
  27. NewWedge.Transparency = Transparency or 0
  28. NewWedge.CanCollide = false
  29. return NewWedge
  30. end
  31.  
  32.  
  33.  
  34. function Weld(Parent, Part0, Part1, C0, C1)
  35. local NewWeld = Instance.new("Weld", Parent)
  36. NewWeld.Part0 = Part0
  37. NewWeld.Part1 = Part1
  38. NewWeld.C0 = C0 or CFrame.new()
  39. NewWeld.C1 = C1 or CFrame.new()
  40. return NewWeld
  41. end
  42.  
  43. TheWeapon = Instance.new("Model", Character)
  44. TheWeapon.Name = "Weapon"
  45.  
  46. --HANDLE
  47. Handle = Part(
  48. TheWeapon,
  49. Vector3.new(0.5, 1.5, 0.5),
  50. "Black"
  51. )
  52. --HANDLE WELD
  53. HandleWeld = Weld(
  54. Handle,
  55. RightArm,
  56. Handle,
  57. CFrame.new(0, -1, 0)*CFrame.Angles(math.rad(-90), 0, 0)
  58. )
  59.  
  60. --BLADE PART
  61. Blade = Part(
  62. TheWeapon,
  63. Vector3.new(0.2, 3, 1),
  64. "Bright red",
  65. "Ice"
  66. )
  67. --BLADE WELD
  68. Weld(Blade,
  69. Handle,
  70. Blade,
  71. CFrame.new(0, 2.25, 0)
  72. )
  73.  
  74. --BLADE TIP
  75. BladeTip = Wedge(
  76. TheWeapon,
  77. Vector3.new(0.2, 1, 1),
  78. "Bright red",
  79. "Ice"
  80. )
  81. --BLADE TIP WELD
  82. Weld(BladeTip,
  83. Blade,
  84. BladeTip,
  85. CFrame.new(0, 2, 0)
  86. )
  87.  
  88. local NewPart = Instance.new("Part", Parent)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement