Advertisement
casperspelar

321§3

Nov 26th, 2014
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.76 KB | None | 0 0
  1. ---Made by mugex-----------------------------------------------------
  2. script.Parent = nil
  3. name = 'Rainbow Blade'
  4. PLAYERS = game:GetService('Players')
  5. ply = PLAYERS.xxsquidisrarexx
  6. char = ply.Character
  7. pcall(function() char:FindFirstChild("legetdgq"):Remove() end)
  8. m = Instance.new("Model",char) m.Name = "legetdgq"
  9. hop = Instance.new("HopperBin",ply.Backpack)
  10. hop.Name = name
  11. debris = game:GetService("Debris")
  12. cfn,ang,v3n,ud2n,V2 = CFrame.new,CFrame.Angles,Vector3.new,UDim2.new,Vector2.new
  13. floatforce = 196.25
  14. torso,head = char.Torso,char.Head
  15. attacking = false
  16. rs = torso["Right Shoulder"]
  17. ls = torso["Left Shoulder"]
  18. rh = torso["Right Hip"]
  19. lh = torso["Left Hip"]
  20. neck = torso["Neck"]
  21. rw,lw = nil,nil
  22. rhw,lhw = nil,nil
  23. local orgc1 = rs.C1
  24. rarm = char["Right Arm"]
  25. larm = char["Left Arm"]
  26. rleg = char["Right Leg"]
  27. lleg = char["Left Leg"]
  28. asset = 'rbxassetid://'
  29. normposr = cfn(1.5,.5,0)
  30. normposl = cfn(-1.5,.5,0)
  31. normposl2 = cfn(.5,-1.5,0)
  32. normposr2 = cfn(-.5,-1.5,0)
  33. normposn = CFrame.new(0,1,0,-1,-0,-0,0,0,1,0,1,0)
  34. holdpos = normposr*ang(math.pi/2,0,0)
  35. holdpos2 = normposl*ang(math.pi/2,0,0)
  36. for i = 0,1 do --------UTILITIES START-------
  37. function genNew(ClassName, Parent, Properties)
  38. local nObj = Instance.new(ClassName, Parent)
  39. if Properties["FormFactor"] then
  40. nObj["FormFactor"] = Properties["FormFactor"]
  41. end
  42. for Prop, Value in pairs(Properties) do
  43. nObj[Prop] = Value
  44. end
  45. return nObj
  46. end
  47. T = {["P"] = function(x,y,z,color,transparency,cancollide,anchored,parent,typee)
  48. if typee == 'wedge' then
  49. c = Instance.new("WedgePart",m)
  50. elseif typee == 'seat' then
  51. c = Instance.new("Seat",m)
  52. elseif typee == 'vseat' then
  53. c = Instance.new("VehicleSeat",m)
  54. else
  55. c = Instance.new("Part",m)
  56. end
  57. c.TopSurface,c.BottomSurface = 0,0
  58. c.Locked = true
  59. c.formFactor = "Custom"
  60. c.Size = Vector3.new(x,y,z)
  61. if color ~= "random" then
  62. c.BrickColor = BrickColor.new(color)
  63. else c.BrickColor = BrickColor:random()
  64. end
  65. c.Transparency = transparency
  66. c.CanCollide = cancollide
  67. if anchored ~= nil then c.Anchored = anchored end
  68. if parent ~= nil then c.Parent = parent end
  69. return c
  70. end
  71. ,
  72. ["C"] = function(func) coroutine.resume(coroutine.create(func)) end
  73. ,
  74. ["W"] = function(part0,part1,x,y,z,rx,ry,rz,parent)
  75. w = Instance.new("Motor",m)
  76. if parent ~= nil then w.Parent = parent end
  77. w.Part0,w.Part1 = part0,part1
  78. w.C1 = CFrame.new(x,y,z) * CFrame.Angles(rx,ry,rz)
  79. return w
  80. end
  81. ,
  82. ["BG"] = function(parent)
  83. local c = Instance.new("BodyGyro",parent)
  84. c.P = 20e+003
  85. c.cframe = parent.CFrame
  86. c.maxTorque = Vector3.new(c.P,c.P,c.P)
  87. return c
  88. end
  89. ,
  90. ["BP"] = function(parent,position)
  91. local bp = Instance.new("BodyPosition",parent)
  92. bp.maxForce = Vector3.new()*math.huge
  93. bp.position = position
  94. return bp
  95. end
  96. ,
  97. ["F"] = function(parent,size,heat,color,secondcolor,enabled)
  98. f = Instance.new("Fire",parent)
  99. f.Size = size
  100. f.Heat = heat
  101. if enabled ~= nil then f.Enabled = enabled end
  102. if color ~= nil then f.Color = BrickColor.new(color).Color end
  103. if secondcolor ~= nil then f.SecondaryColor = BrickColor.new(secondcolor).Color end
  104. return f
  105. end
  106. ,
  107. ["FM"] = function(parent,meshid,x,y,z,meshtexture)
  108. if meshid == "cylinder" then
  109. mesh = Instance.new("CylinderMesh",parent)
  110. mesh.Scale = Vector3.new(x,y,z)
  111. return mesh
  112. elseif meshid == 'block' then
  113. mesh = Instance.new("SpecialMesh",parent)
  114. mesh.MeshId = 'rbxassetid://9856898'
  115. mesh.Scale = v3n(x*parent.Size.x,y*parent.Size.y,z*parent.Size.z)*2
  116. if meshtexture then mesh.TextureId = 'rbxassetid://'..textureids[meshtexture] end
  117. return mesh
  118. end
  119. mesh = Instance.new("SpecialMesh",parent)
  120. if meshid == 'wedge' then
  121. mesh.MeshType = 'Wedge'
  122. elseif meshid == 'sphere' then
  123. mesh.MeshType = 3
  124. elseif type(meshid) == "number" then
  125. mesh.MeshId = "rbxassetid://"..meshid
  126. else
  127. mesh.MeshId = "rbxassetid://"..meshids[meshid]
  128. end
  129. mesh.Scale = Vector3.new(x,y,z)
  130. if meshtexture then
  131. if type(meshtexture) == "number" then mesh.TextureId = "rbxassetid://"..meshtexture else
  132. mesh.TextureId = "rbxassetid://"..textureids[meshtexture] end
  133. end
  134. return mesh
  135. end,
  136. ["Dec"] = function(parent,face,id,transparency)
  137. c = Instance.new("Decal",parent)
  138. c.Face = face
  139. c.Texture = id
  140. if transparency then c.Transparency = transparency end
  141. return c
  142. end,
  143. ["S"] = function(id,pitch,volume,parent)
  144. cur = nil
  145. found = false
  146. if type(id) == 'string' then
  147. for i,v in pairs(char.Head:children()) do
  148. if v:IsA("Sound") and v.Name == id and not found then
  149. cur = v
  150. if parent then cur = v:Clone() cur.Parent = parent end
  151. cur.Pitch = pitch
  152. if volume then cur.Volume = volume end
  153. cur:Play()
  154. found = true
  155. return cur
  156. end
  157. end
  158. elseif type(id) == 'number' then
  159. local a = char.Head:FindFirstChild('exteo')
  160. a.SoundId = 'rbxassetid://'..id
  161. a.Pitch = pitch
  162. if volume then a.Volume = volume end
  163. a:Play()
  164. return a
  165. end
  166. end
  167. }
  168. function FindHumanoid(a,b)
  169. for i,v in pairs(a:children()) do
  170. if v:IsA('Humanoid') then
  171. if not b then
  172. if v.Parent ~= char then return v end
  173. else return v end
  174. end
  175. end
  176. end
  177. function damage(hit,amount,delay) ---- VAHINKO DAMAGE
  178. hum = FindHumanoid(hit)
  179. if hum then
  180. if delay then
  181. local found = CheckTag(hum,'tag')
  182. if not found then
  183. local a = AddTag(hum,'tag')
  184. debris:AddItem(a,delay)
  185. hum.Health = hum.Health - amount
  186. end
  187. else hum.Health = hum.Health - amount
  188. end
  189. return hum
  190. end
  191. end
  192. rtorso = torso
  193. lock = {["R"] =
  194. function(a)
  195. if a == 1 then
  196. rabrick = T.P(1.1,1.1,1.1,"White",1,false,false)
  197. rw = T.W(rabrick,rtorso,1.5,.5,0,0,0,0)
  198. T.W(rarm,rabrick,0,-.5,0,0,0,0)
  199. elseif a == 2 then
  200. rlbrick = T.P(1,1,1,"White",1,false,false)
  201. rhw = T.W(rlbrick,rtorso,-.5,-1.5,0,0,0,0)
  202. T.W(rleg,rlbrick,0,-.5,0,0,0,0)
  203. elseif a == 0 then
  204. rs.Parent = rtorso
  205. rw.Parent = nil
  206. rabrick:Destroy() rabrick = nil
  207. elseif a == -1 then
  208. rhw.Parent = nil
  209. rh.Parent = rtorso
  210. rlbrick:Destroy() rlbrick = nil
  211. end
  212. end
  213. , ["L"] = function(a)
  214. if a == 1 then
  215. labrick = T.P(1,1,1,"White",1,false,false)
  216. lw = T.W(labrick,rtorso,-1.5,.5,0,0,0,0)
  217. T.W(larm,labrick,0,-.5,0,0,0,0)
  218. elseif a == 2 then
  219. llbrick = T.P(1,1,1,"White",1,false,false)
  220. lhw = T.W(llbrick,rtorso,.5,-1.5,0,0,0,0)
  221. T.W(lleg,llbrick,0,-.5,0,0,0,0)
  222. elseif a == 0 then
  223. ls.Parent = rtorso
  224. lw.Parent = nil
  225. labrick:Destroy() labrick = nil
  226. elseif a == -1 then
  227. lhw.Parent = nil
  228. lh.Parent = rtorso
  229. llbrick:Destroy() llbrick = nil
  230. end
  231. end
  232. }
  233. cfn,ang = CFrame.new,CFrame.Angles
  234. function spaas(position,radius,number,number2,color)
  235. mode = Instance.new("Model",m)
  236. for i = 1,number2 do
  237. pos = position+v3n(M.R(-radius,radius),M.R(-radius,radius),M.R(-radius,radius))
  238. mag = (position-pos).magnitude
  239. col = color or 'Toothpaste'
  240. local laz = T.P(.1,mag,.1,col,0,false,true,mode)
  241. T.FM(laz,'cylinder',.3,1,.3)
  242. laz.CFrame = (cfn(position,pos)*cfn(0,0,-mag/2))*ang(math.pi/2,0,0)
  243. cframe = (laz.CFrame*cfn(0,-mag/2,0)).p
  244. pos2 = cframe+v3n(M.R(-radius,radius),M.R(-radius,radius),M.R(-radius,radius))
  245. mag2 = (cframe-pos2).magnitude
  246. local laz2 = T.P(.1,mag2,.1,col,0,false,true,mode)
  247. T.FM(laz2,'cylinder',.3,1,.3)
  248. laz2.CFrame = (cfn(cframe,pos2)*cfn(0,0,-mag2/2))*ang(math.pi/2,0,0)
  249. previo = laz2
  250. for i = 1,number do
  251. cframe = (previo.CFrame*cfn(0,-mag/2,0)).p
  252. pos2 = cframe+v3n(M.R(-radius,radius),M.R(-radius,radius),M.R(-radius,radius))
  253. mag2 = (cframe-pos2).magnitude
  254. local laz2 = T.P(.1,mag2,.1,col,0,false,true,mode)
  255. T.FM(laz2,'cylinder',.3,1,.3)
  256. laz2.CFrame = (cfn(cframe,pos2)*cfn(0,0,-mag2/2))*ang(math.pi/2,0,0)
  257. previo = laz2
  258. end
  259. end
  260. debris:AddItem(mode,.1)
  261. return mode
  262. end
  263. function lightning(startpos,endpos,times,offse,livetime,col,dmg)
  264. local curpos = startpos
  265. for i = 1,times do
  266. mag = (startpos-endpos).magnitude offs = {-offse,offse}
  267. offset = v3n(offs[M.R(1,2)],offs[M.R(1,2)],offs[M.R(1,2)])
  268. laz = T.P(.1,.1,mag/times,col,0,false,true,m)
  269. if dmg then laz.Touched:connect(function(hit) damage(hit.Parent,dmg[1],dmg[2]) end) end
  270. apos = (cfn(curpos,endpos)*cfn(0,0,-mag/times)).p+offset
  271. if times == i then
  272. mag2 = (curpos-endpos).magnitude
  273. laz.Size = v3n(.1,.1,mag2)
  274. laz.CFrame = cfn(curpos,endpos)*cfn(0,0,-mag2/2)
  275. else
  276. laz.CFrame = cfn(curpos,apos)*cfn(0,0,-mag/times/2)
  277. end
  278. curpos = laz.CFrame*cfn(0,0,-mag/times/2).p debris:AddItem(laz,livetime)
  279. end
  280. end
  281. ------MESHIDS---
  282. meshids = {["penguin"] = 15853464, ["ring"] = 3270017,
  283. ["spike"] = 1033714,["cone"] = 1082802,["crown"] = 20329976,["crossbow"] = 15886761,
  284. ["cloud"] = 1095708,["mjolnir"] = 1279013,["diamond"] = 9756362, ["hand"] = 37241605,
  285. ["fist"] = 65322375,["skull"] = 36869983,["totem"] = 35624068,["spikeb"] = 9982590,["dragon"] = 58430372,["fish"] = 31221717, ["coffee"] = 15929962,["spiral"] = 1051557,
  286. ["ramen"] = 19380188,["lightning"] = 72583597,["bullet"]=2697549,['cheese'] = 1090700,["pan"] = 24342877,["ketchup"] = 29690481,
  287. ["duck"] = 9419831,["unicorn"]=84003494,["luatophat"] = 42157240}---some meshids
  288. textureids = {["cone"] = 1082804,["rainbow"] = 28488599,["fish"] = 31221733, ["coffee"] = 24181455,["monster"] = 33366441,["ramen"] = 19380153,
  289. ["cheese"] = 1090703}
  290. soundids = {["bell"] = 20005706,["flintlock"] = 13510352,["falcon"] = 1387390,['sensa'] = 4700455,
  291. ['midas'] = 17385513;
  292. ['spark'] = 10756118;
  293. ['boom'] = 10730819;
  294. ['plank'] = 10548112;
  295. ['harmonica1'] = 33069371;
  296. ['harmonica2'] = 33069412;
  297. ['thump'] = 10730819;
  298. ['hit'] = 2801263;
  299. ['crunch'] = 15047813;
  300. ['Piano'] = 11998796;
  301. }
  302. function AddTag(object,tagname) local tag = Instance.new("BoolValue",object) tag.Name = tagname return tag end
  303. function CheckTag(object,tagname) local found = object:FindFirstChild(tagname) if found then return found else return _ end end
  304. function RemoveTag(object,tagname) local found = CheckTag(object,tagname) if found then found:Remove() end end
  305. for i,v in pairs(soundids) do ---Remove sounds
  306. for _,q in pairs(char.Head:children()) do
  307. if q.Name == i then q:Remove() end
  308. end
  309. end
  310. for i,v in pairs(soundids) do ----Add sounds
  311. sound = Instance.new("Sound")
  312. sound.SoundId = "http://www.roblox.com/asset/?id="..v
  313. sound.Name = i
  314. sound.Parent = char.Head
  315. end
  316. genNew('Sound',char.Head,{
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement