Axtem

Rage

Jun 11th, 2016
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.50 KB | None | 0 0
  1.  
  2.  
  3. ply = game.Players.LocalPlayer
  4. char = ply.Character
  5. torso = char.Torso
  6. shoulder = nil
  7. body = {}
  8. body.A = {["L"] = char["Left Arm"],["R"] = char["Right Arm"]}
  9. body.L = {["L"] = char["Left Leg"],["R"] = char["Right Leg"]}
  10. body.S = {["L"] = torso["Left Shoulder"],["R"] = torso["Right Shoulder"]}
  11. body.H = {["H"] = torso["Left Shoulder"],["H"] = torso["Right Shoulder"]}
  12. local normposR = body.S.R.C0
  13. local normposL = body.S.L.C0
  14. body.Head = char.Head
  15. rw,lw = Instance.new("Weld"),Instance.new("Weld")
  16. rhw,lhw = Instance.new("Weld"),Instance.new("Weld")
  17. list = {
  18. ["RS"] = rw,
  19. ["LS"]=lw,
  20. ["RH"]=rhw,
  21. ["LH"]=lhw
  22. }
  23. function lock(arm,a)
  24. if a == 1 then
  25. b,c = arm:sub(1,1),arm:sub(2,2)
  26. shoulder = body[c][b]
  27. we = list[arm]
  28. we.Parent = torso
  29. we.C0,we.C1 = shoulder.C0 ,shoulder.C1
  30. we.Part0,we.Part1 = shoulder.Part0 ,shoulder.Part1
  31. shoulder.Parent = nil
  32. elseif a == 0 then
  33. we.Parent = nil
  34. shoulder.Parent = torso
  35. end
  36. end
  37. m = Instance.new("Model",char)
  38. meshids = {["blast"] = 20329976, ["penguin"] = 15853464, ["ring"] = 3270017,
  39. ["spike"] = 1033714,["cone"] = 1082802,["crown"] = 20329976,["crossbow"] = 15886761,
  40. ["cloud"] = 1095708,["mjolnir"] = 1279013,["diamond"] = 9756362, ["hand"] = 37241605,
  41. ["fist"] = 65322375,["skull"] = 36869983,["totem"] = 35624068,["spikeb"] = 9982590,["dragon"] = 58430372,
  42. ["fish"] = 31221717, ["coffee"] = 15929962}---some meshids
  43. textureids = {["cone"] = 1082804,["rainbow"] = 28488599,["fish"] = 31221733, ["coffee"] = 24181455,
  44. ["monster"] = 33366441}
  45. ------TOOOOOLS------
  46. T = {["P"] = function(x,y,z,color,transparency,cancollide,anchored,parent)
  47. c = Instance.new("Part",m)
  48. c.TopSurface,c.BottomSurface = 0,0
  49. c.formFactor = "Custom"
  50. c.Size = Vector3.new(x,y,z)
  51. c.BrickColor = BrickColor.new(color)
  52. c.Transparency = transparency
  53. c.CanCollide = cancollide
  54. if anchored ~= nil then c.Anchored = anchored end
  55. if parent ~= nil then c.Parent = parent end
  56. return c
  57. end
  58. ,
  59. ["C"] = function(func) coroutine.resume(coroutine.create(func)) end
  60. ,
  61. ["W"] = function(part0,part1,x,y,z,rx,ry,rz)
  62. w = Instance.new("Weld",m)
  63. w.Part0,w.Part1 = part0,part1
  64. w.C1 = CFrame.new(x,y,z) * CFrame.Angles(rx,ry,rz)
  65. return w
  66. end
  67. ,
  68. ["BG"] = function(parent)
  69. local c = Instance.new("BodyGyro",parent)
  70. c.P = 20e+003
  71. c.cframe = parent.CFrame
  72. c.maxTorque = Vector3.new(c.P,c.P,c.P)
  73. return c
  74. end
  75. ,
  76. ["BP"] = function(parent,position)
  77. local bp = Instance.new("BodyPosition",parent)
  78. bp.maxForce = Vector3.new()*math.huge
  79. bp.position = position
  80. return bp
  81. end
  82. ,
  83. ["F"] = function(parent,size,heat,color,secondcolor)
  84. f = Instance.new("Fire",parent)
  85. f.Size = size
  86. f.Heat = heat
  87. if color ~= nil then f.Color = BrickColor.new(color).Color end
  88. if secondcolor ~= nil then f.SecondaryColor = BrickColor.new(secondcolor).Color end
  89. return f
  90. end
  91. ,
  92. ["Track"] = function(obj,s,t,lt)
  93. coroutine.resume(coroutine.create(function()
  94. while track do
  95. old = obj.Position
  96. wait()
  97. new = obj.Position
  98. mag = (old-new).magnitude
  99. dist = (old+new)/2
  100. ray = T.P(s,mag+.2,s,obj.Color,t,false,true)
  101. Instance.new("CylinderMesh",ray)
  102. ray.CFrame = CFrame.new(dist,old)*ang(math.pi/2,0,0)
  103. game:GetService("Debris"):AddItem(ray,lt)
  104. end
  105. end)) end,
  106. ["D"] = function(hit) if hit.Parent:findFirstChild("Humanoid") then h=hit.Parent.Humanoid h.Health = h.Health -dmg end end
  107. ,
  108. ["FM"] = function(parent,meshid,x,y,z,meshtexture)
  109. if meshid == "cylinder" then
  110. mesh = Instance.new("CylinderMesh",parent)
  111. mesh.Scale = Vector3.new(x,y,z)
  112. return mesh
  113. else
  114. mesh = Instance.new("SpecialMesh",parent)
  115. if meshid ~= "sphere" then
  116. if type(meshid) == "number" then mesh.MeshId = "rbxassetid://"..meshid else
  117. mesh.MeshId = "rbxassetid://"..meshids[meshid]
  118. end
  119. else mesh.MeshType = 3 end
  120. mesh.Scale = Vector3.new(x,y,z)
  121. if meshtexture ~= nil then
  122. if type(meshtexture) == "number" then mesh.TextureId = "rbxassetid://"..meshtexture else
  123. mesh.TextureId = "rbxassetid://"..textureids[meshtexture] end
  124. end
  125. return mesh
  126. end
  127. end
  128. }
  129. --------------------------------------------------
  130. ---MATH SHORTENINGS---
  131. M = {["R"] = function(a,b) return math.random(a,b) end,
  132. ["Cos"] = function(a) return math.cos(a) end,
  133. ["Sin"] = function(a) return math.sin(a) end,
  134. ["D"] = function(a) return math.rad(a) end
  135. }
  136. ---------------------------
  137. cfn,ang = CFrame.new,CFrame.Angles
  138. v3n = Vector3.new
  139. m = Instance.new("Model",char)
  140. function damage(hit,amount)
  141. for i,v in pairs(hit:GetChildren()) do
  142. if v:IsA("Humanoid") and v.Parent ~= char then
  143. v.Health = v.Health - amount
  144. amo = 0
  145. for i,o in pairs(v.Parent:GetChildren()) do
  146. if o:IsA("BillboardGui") and o.Name == "satuttava" then
  147. amo = amo+1
  148. end end
  149. local bbg = Instance.new("BillboardGui",v.Parent)
  150. bbg.Adornee = v.Torso
  151. bbg.Name = "satuttava"
  152. bbg.Size = UDim2.new(2,0,2,0)
  153. bbg.StudsOffset = Vector3.new(0,6+amo*2,0)
  154. box = Instance.new("TextLabel",bbg)
  155. box.Size = UDim2.new(1,0,1,0)
  156. box.BackgroundColor = BrickColor.new("White")
  157. box.Text = amount
  158. box.Position = UDim2.new(0,0,0,0)
  159. box.TextScaled = true
  160. game:GetService("Debris"):AddItem(bbg,.5)
  161. end
  162. end
  163. end
  164.  
  165. hop = Instance.new("HopperBin",ply.Backpack)
  166. holding = false
  167. function attack1(mouse)
  168. r = 20
  169. bp = T.BP(torso,torso.Position + v3n(0,20,0))
  170. bg = T.BG(torso)
  171. bg.cframe = mouse.hit
  172. while (bp.position-torso.Position).magnitude > 3 do wait() end
  173. holding=true
  174. while holding do
  175. for i = 1,360,60 do
  176. wait()
  177. local pos = torso.CFrame * cfn(M.Cos(M.D(i))*r,M.Sin(M.D(i))*r,-5)
  178.  
  179. local dragon = T.P(10,10,10,"White",.5,false,true)
  180. T.FM(dragon,"dragon",dragon.Size.x,dragon.Size.y,dragon.Size.z)
  181. dragon.CFrame = pos
  182. T.C(function()
  183. for i = 1,50,5 do
  184. wait()
  185. bg.cframe = mouse.hit
  186. dragon.CFrame = cfn(pos.p,mouse.hit.p) * cfn(0,0,-i)
  187. dragon.Transparency = i/50
  188. T.C(function()
  189. for i,v in pairs(Workspace:GetChildren()) do
  190. if v:IsA("Model") then
  191. local torso = v:FindFirstChild("Torso")
  192. if torso ~= nil then
  193. if (v.PrimaryPart.Position-dragon.Position).magnitude < 5 then damage(v,2) end
  194. end end
  195. end
  196. end)
  197. end
  198. dragon:Remove()
  199. end)
  200. end
  201. end
  202. bg:Remove() bp:Remove()
  203. end
  204. function spear(mouse)
  205. local portal = T.P(1,1,1,"Magenta",.5,false,true)
  206. local msh = T.FM(portal,"sphere",1,1,1)
  207. portal.CFrame = cfn(mouse.hit.p)
  208. local pos = cfn(portal.Position)
  209. local p = T.P(1,1,1,"White",0,false,true)
  210. p.CFrame = pos
  211. T.FM(p,"crown",5,1,5)
  212. T.C(function()
  213. while true do
  214. wait()
  215. p.CFrame = p.CFrame * ang(0,M.D(20),0)
  216. end
  217. end)
  218. for i = 1,10 do
  219. wait()
  220. msh.Scale = v3n(i,1,i)
  221. end
  222. local stick = T.P(.5,1,.5,"Nougat",0,true,true)
  223. stick.CFrame = pos
  224. T.FM(stick,"cylinder",1,1,1)
  225. stick.Touched:connect(function(hit) damage(hit.Parent,10) end)
  226. local tip = T.P(1,2,1,"Black",0,true,true)
  227. T.FM(tip,"spike",.5,2,.5)
  228. tip.CFrame = pos
  229. local fish = T.P(1,1,1,"White",0,false,true)
  230. fish.CFrame = pos
  231. T.FM(fish,"fish",1,1,1,"fish").VertexColor = v3n(.5,1,.5)
  232.  
  233. for i = 1,10 do
  234. wait()
  235. stick.Size = v3n(stick.Size.x,i,stick.Size.z)
  236. stick.CFrame = pos + v3n(0,stick.Size.y/2,0)
  237. tip.CFrame = stick.CFrame * cfn(0,stick.Size.y/2+.75,0)
  238. fish.CFrame = tip.CFrame * cfn(0,-1.5,0) * ang(M.D(85),0,0)
  239. end
  240. wait(1)
  241. for i = 10,1,-1 do
  242. wait()
  243. stick.Size = v3n(stick.Size.x,i,stick.Size.z)
  244. stick.CFrame = pos + v3n(0,stick.Size.y/2,0)
  245. tip.CFrame = stick.CFrame * cfn(0,stick.Size.y/2+.75,0)
  246. fish.CFrame = tip.CFrame * cfn(0,-1.5,0) * ang(M.D(85),0,0)
  247. end
  248. for i,v in pairs({stick,tip,fish}) do v:Remove() end
  249. for i = 10,1,-1 do
  250. wait()
  251. msh.Scale = v3n(i,1,i)
  252. end
  253. portal:Remove()
  254. p:Remove()
  255. end
  256. suit = nil
  257. function suitme()
  258. if suit == nil then
  259. for i,v in pairs(char:GetChildren()) do
  260. if v:IsA("Hat") then v:Remove() end
  261. end
  262. suit = Instance.new("Model",char)
  263. local head = T.P(1,1,1,"Black",0,false,false,suit)
  264. T.FM(head,"skull",1,1,1,"rainbow")
  265. T.W(head,body.Head,0,0,0,0,0,0)
  266. r = .2
  267. for i = 1,360,120 do
  268. T.W(T.FM(T.P(1,1,1,"Black",0,false,false,suit),"spike",.2,2,.2).Parent,head,M.Cos(M.D(i))*r,1.5,M.Sin(M.D(i))*r,0,0,0)
  269. end
  270. allowed = true
  271. for i = 1,360,60 do
  272. wait()
  273. p = T.P(1,1,1,"Magenta",.5,false,false,suit)
  274. T.FM(p,"penguin",.5,.5,.5)
  275. local wld = T.W(p,body.Head,M.Cos(M.D(i))*.7,2,M.Sin(M.D(i))*.7,0,0,0)
  276. T.C(function()
  277. while true do
  278. wait()
  279. if allowed == true then
  280. for o = .7,1,.05 do
  281. wait()
  282. wld.C1 = cfn(M.Cos(M.D(i))*o,2,M.Sin(M.D(i))*o)
  283. end
  284. for o = 1,.7,-.05 do
  285. wait()
  286. wld.C1 = cfn(M.Cos(M.D(i))*o,2,M.Sin(M.D(i))*o)
  287. end
  288. end
  289. end
  290. end)
  291. end
  292. local glove = T.P(2,.5,2,"White",0,false,false,suit)
  293. T.FM(glove,"cylinder",1,1,1)
  294. T.W(glove,body.A.R,0,-.7,0,0,0,0)
  295. local ball = T.P(2,2,2,"Bright red",0,false,false,suit)
  296. T.FM(ball,"sphere",1,1,1)
  297. T.W(ball,body.A.R,0,-1.5,0,0,0,0)
  298. lock("RS",1)
  299. rw.C0 = rw.C0 * ang(0,0,M.D(85))
  300. ball.Touched:connect(function(hit) damage(hit.Parent,20) end)
  301. else suit:Remove() lock("RS",0) suit = nil
  302. end
  303. end
  304. function punch(mouse)
  305. rw.C0 = normposR*ang(0,0,math.pi)
  306. fir = T.F(ball,5,1,"Deep blue","Cyan")
  307. bp = T.BP(torso,torso.Position + v3n(0,10,0))
  308. while (torso.Position-bp.position).magnitude > 3 do wait() end
  309. holding = true
  310. gyro = T.BG(torso)
  311. allowed = false
  312. while holding do
  313. wait()
  314. gyro.cframe = mouse.hit
  315. end
  316. gyro.cframe = cfn(torso.Position,mouse.hit.p)*ang(math.pi/2,0,0)
  317. bp.position = mouse.hit.p + v3n(0,5,0)
  318. while (torso.Position-bp.position).magnitude > 3 do wait() gyro.cframe = gyro.cframe * ang(0,M.D(100),0) end
  319. gyro:Remove() bp:Remove() fir:Remove()
  320. rw.C0 = normposR*ang(0,0,math.pi/2)
  321. allowed = true
  322. end
  323. hop.Selected:connect(function(mouse)
  324. mouse.Button1Up:connect(function() holding = false end)
  325. mouse.Button1Down:connect(function() if suit == nil then attack1(mouse) else punch(mouse) end end)
  326. mouse.KeyDown:connect(function(key)
  327. if key == "f" then spear(mouse)
  328. elseif key == "r" then suitme()
  329. end
  330. end)
  331. end)
Add Comment
Please, Sign In to add comment