Advertisement
casperspelar

War hammer

Nov 26th, 2014
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.38 KB | None | 0 0
  1. me = game.Players.xxsquidisrarexx
  2. char = me.Character
  3. Modelname = "Warhammah"
  4. Toolname = "Warhammar"
  5. Surfaces = {"FrontSurface", "BackSurface", "TopSurface", "BottomSurface", "LeftSurface", "RightSurface"}
  6. necko = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  7. selected = false
  8. effectOn = false
  9. Hurt = false
  10. Leghurt = false
  11. Deb = true
  12. LegDeb = true
  13. Able = true
  14. Resting = false
  15. RestingAnim = false
  16. AbleG = true
  17. Prop = {Damage = 42, Legdmg = 34, AS = 28, ShockDMG = 50, Rage = 7000000, RageIncome = 7000, MaxRage = 7000000}
  18. Prop.AS = Prop.AS/300
  19. Cam = workspace.CurrentCamera
  20.  
  21. ToolIcon = "http://www.roblox.com/asset/?id=49192762"
  22. MouseIc = "http://www.roblox.com/asset/?id=49192792"
  23. MouseDo = "http://www.roblox.com/asset/?id=49192819"
  24.  
  25. Add = {
  26. Sphere = function(P)
  27. local m = Instance.new("SpecialMesh",P)
  28. m.MeshType = "Sphere"
  29. return m
  30. end,
  31. BF = function(P)
  32. local bf = Instance.new("BodyForce",P)
  33. bf.force = Vector3.new(0, P:GetMass()*187, 0)
  34. return bf
  35. end,
  36. BP = function(P)
  37. local bp = Instance.new("BodyPosition",P)
  38. bp.maxForce = Vector3.new(math.huge, 0, math.huge)
  39. bp.P = 14000
  40. return bp
  41. end,
  42. BG = function(P)
  43. local bg = Instance.new("BodyGyro",P)
  44. bg.maxTorque = Vector3.new(math.huge, math.huge, math.huge)
  45. bg.P = 14000
  46. return bg
  47. end,
  48. Mesh = function(P, ID, x, y, z)
  49. local m = Instance.new("SpecialMesh")
  50. m.MeshId = ID
  51. m.Scale = Vector3.new(x, y, z)
  52. m.Parent = P
  53. return m
  54. end,
  55. Sound = function(P, ID, vol, pitch)
  56. local s = Instance.new("Sound")
  57. s.SoundId = ID
  58. s.Volume = vol
  59. s.Pitch = pitch
  60. s.Parent = P
  61. return s
  62. end
  63. }
  64.  
  65. function find(tab, arg)
  66. local ah = nil
  67. for i,v in pairs(tab) do
  68. if v == arg then
  69. ah = v
  70. end
  71. end
  72. return ah
  73. end
  74.  
  75. function getAllParts(from)
  76. local t = {}
  77. function getParts(where)
  78. for i, v in pairs(where:children()) do
  79. if v:IsA("BasePart") then
  80. if v.Parent ~= char and v.Parent.Parent ~= char then
  81. table.insert(t, v)
  82. end
  83. end
  84. getParts(v)
  85. end
  86. end
  87. getParts(workspace)
  88. return t
  89. end
  90.  
  91. function RayCast(pos1, pos2, maxDist, forward)
  92. local list = getAllParts(workspace)
  93. local pos0 = pos1
  94. for dist = 1, maxDist, forward do
  95. pos0 = (CFrame.new(pos1, pos2) * CFrame.new(0, 0, -dist)).p
  96. for _, v in pairs(list) do
  97. local pos3 = v.CFrame:pointToObjectSpace(pos0)
  98. local s = v.Size
  99. if pos3.x > -(s.x/2) and pos3.x < (s.x/2) and pos3.y > -(s.y/2) and pos3.y < (s.y/2) and pos3.z > -(s.z/2) and pos3.x < (s.z/2) and v.CanCollide and v:GetMass() > 14 then
  100. return pos0, v
  101. end
  102. end
  103. end
  104. return pos0, nil
  105. end
  106.  
  107. function Part(Parent, Anchor, Collide, Tran, Ref, Color, X, Y, Z, Break)
  108. local p = Instance.new("Part")
  109. p.formFactor = "Custom"
  110. p.Anchored = Anchor
  111. p.CanCollide = Collide
  112. p.Transparency = Tran
  113. p.Reflectance = Ref
  114. p.BrickColor = BrickColor.new(Color)
  115. for _, Surf in pairs(Surfaces) do
  116. p[Surf] = "Smooth"
  117. end
  118. p.Size = Vector3.new(X, Y, Z)
  119. if Break then
  120. p:BreakJoints()
  121. else p:MakeJoints() end
  122. p.Parent = Parent
  123. p.Locked = true
  124. return p
  125. end
  126.  
  127. function Weld(p0, p1, x, y, z, a, b, c)
  128. local w = Instance.new("Weld")
  129. w.Parent = p0
  130. w.Part0 = p0
  131. w.Part1 = p1
  132. w.C1 = CFrame.new(x,y,z) * CFrame.Angles(a,b,c)
  133. return w
  134. end
  135.  
  136. function ComputePos(pos1, pos2)
  137. local pos3 = Vector3.new(pos2.x, pos1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement