Advertisement
lafur

Untitled

Nov 3rd, 2018
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --https://github.com/Mokiros/roblox-FE-compatibility
  2. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  3. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  4. local RealPlayer = Player
  5. do print("FE Compatibility code by Mokiros")local a=RealPlayer;script.Parent=a.Character;local b=Instance.new("RemoteEvent")b.Name="UserInput_Event"local function c()local d={_fakeEvent=true,Functions={},Connect=function(self,e)table.insert(self.Functions,e)end}d.connect=d.Connect;return d end;local f={Target=nil,Hit=CFrame.new(),KeyUp=c(),KeyDown=c(),Button1Up=c(),Button1Down=c(),Button2Up=c(),Button2Down=c()}local g={InputBegan=c(),InputEnded=c()}local CAS={Actions={},BindAction=function(self,h,i,j,...)CAS.Actions[h]=i and{Name=h,Function=i,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function k(self,l,...)local d=f[l]if d and d._fakeEvent then for m,e in pairs(d.Functions)do e(...)end end end;f.TrigEvent=k;g.TrigEvent=k;b.OnServerEvent:Connect(function(n,o)if n~=a then return end;f.Target=o.Target;f.Hit=o.Hit;if not o.isMouse then local p=o.UserInputState==Enum.UserInputState.Begin;if o.UserInputType==Enum.UserInputType.MouseButton1 then return f:TrigEvent(p and"Button1Down"or"Button1Up")end;if o.UserInputType==Enum.UserInputType.MouseButton2 then return f:TrigEvent(p and"Button2Down"or"Button2Up")end;for m,d in pairs(CAS.Actions)do for m,q in pairs(d.Keys)do if q==o.KeyCode then d.Function(d.Name,o.UserInputState,o)end end end;f:TrigEvent(p and"KeyDown"or"KeyUp",o.KeyCode.Name:lower())g:TrigEvent(p and"InputBegan"or"InputEnded",o,false)end end)b.Parent=NLS([==[local a=game:GetService("Players").LocalPlayer;local b=script:WaitForChild("UserInput_Event")local c=a:GetMouse()local d=game:GetService("UserInputService")local e=function(f,g)if g then return end;b:FireServer({KeyCode=f.KeyCode,UserInputType=f.UserInputType,UserInputState=f.UserInputState,Hit=c.Hit,Target=c.Target})end;d.InputBegan:Connect(e)d.InputEnded:Connect(e)local h,i;while wait(1/30)do if h~=c.Hit or i~=c.Target then h,i=c.Hit,c.Target;b:FireServer({isMouse=true,Target=i,Hit=h})end end]==],Player.Character)local r=game;local s={__index=function(self,q)local t=rawget(self,"_RealService")if t then return typeof(t[q])=="function"and function(m,...)return t[q](t,...)end or t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end}local function v(d,w)d._RealService=typeof(w)=="string"and r:GetService(w)or w;return setmetatable(d,s)end;local x={GetService=function(self,t)return rawget(self,t)or r:GetService(t)end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService"),RunService=v({_btrs={},RenderStepped=r:GetService("RunService").Heartbeat,BindToRenderStep=function(self,h,m,i)self._btrs[h]=self.Heartbeat:Connect(i)end,UnbindFromRenderStep=function(self,h)self._btrs[h]:Disconnect()end},"RunService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;v(x,game)game,owner=x,x.Players.LocalPlayer end ---Made by mugex-----------------------------------------------------
  6. script.Parent = nil
  7. name = 'Rainbow Blade'
  8. PLAYERS = game:GetService('Players')
  9. ply = PLAYERS.LocalPlayer
  10. char = ply.Character
  11. pcall(function() char:FindFirstChild("legetdgq"):Remove() end)
  12. m = Instance.new("Model",char) m.Name = "legetdgq"
  13. hop = Instance.new("HopperBin",ply.Backpack)
  14. hop.Name = name
  15. debris = game:GetService("Debris")
  16. cfn,ang,v3n,ud2n,V2 = CFrame.new,CFrame.Angles,Vector3.new,UDim2.new,Vector2.new
  17. floatforce = 196.25
  18. torso,head = char.Torso,char.Head
  19. attacking = false
  20. rs = torso["Right Shoulder"]
  21. ls = torso["Left Shoulder"]
  22. rh = torso["Right Hip"]
  23. lh = torso["Left Hip"]
  24. neck = torso["Neck"]
  25. rw,lw = nil,nil
  26. rhw,lhw = nil,nil
  27. local orgc1 = rs.C1
  28. rarm = char["Right Arm"]
  29. larm = char["Left Arm"]
  30. rleg = char["Right Leg"]
  31. lleg = char["Left Leg"]
  32. asset = 'rbxassetid://'
  33. normposr = cfn(1.5,.5,0)
  34. normposl = cfn(-1.5,.5,0)
  35. normposl2 = cfn(.5,-1.5,0)
  36. normposr2 = cfn(-.5,-1.5,0)
  37. normposn = CFrame.new(0,1,0,-1,-0,-0,0,0,1,0,1,0)
  38. holdpos = normposr*ang(math.pi/2,0,0)
  39. holdpos2 = normposl*ang(math.pi/2,0,0)
  40. for i = 0,1 do --------UTILITIES START-------
  41. function genNew(ClassName, Parent, Properties)
  42. local nObj = Instance.new(ClassName, Parent)
  43. if Properties["FormFactor"] then
  44. nObj["FormFactor"] = Properties["FormFactor"]
  45. end
  46. for Prop, Value in pairs(Properties) do
  47. nObj[Prop] = Value
  48. end
  49. return nObj
  50. end
  51. T = {["P"] = function(x,y,z,color,transparency,cancollide,anchored,parent,typee)
  52. if typee == 'wedge' then
  53. c = Instance.new("WedgePart",m)
  54. elseif typee == 'seat' then
  55. c = Instance.new("Seat",m)
  56. elseif typee == 'vseat' then
  57. c = Instance.new("VehicleSeat",m)
  58. else
  59. c = Instance.new("Part",m)
  60. end
  61. c.TopSurface,c.BottomSurface = 0,0
  62. c.Locked = true
  63. c.formFactor = "Custom"
  64. c.Size = Vector3.new(x,y,z)
  65. if color ~= "random" then
  66. c.BrickColor = BrickColor.new(color)
  67. else c.BrickColor = BrickColor:random()
  68. end
  69. c.Transparency = transparency
  70. c.CanCollide = cancollide
  71. if anchored ~= nil then c.Anchored = anchored end
  72. if parent ~= nil then c.Parent = parent end
  73. return c
  74. end
  75. ,
  76. ["C"] = function(func) coroutine.resume(coroutine.create(func)) end
  77. ,
  78. ["W"] = function(part0,part1,x,y,z,rx,ry,rz,parent)
  79. w = Instance.new("Motor",m)
  80. if parent ~= nil then w.Parent = parent end
  81. w.Part0,w.Part1 = part0,part1
  82. w.C1 = CFrame.new(x,y,z) * CFrame.Angles(rx,ry,rz)
  83. return w
  84. end
  85. ,
  86. ["BG"] = function(parent)
  87. local c = Instance.new("BodyGyro",parent)
  88. c.P = 20e+003
  89. c.cframe = parent.CFrame
  90. c.maxTorque = Vector3.new(c.P,c.P,c.P)
  91. return c
  92. end
  93. ,
  94. ["BP"] = function(parent,position)
  95. local bp = Instance.new("BodyPosition",parent)
  96. bp.maxForce = Vector3.new()*math.huge
  97. bp.position = position
  98. return bp
  99. end
  100. ,
  101. ["F"] = function(parent,size,heat,color,secondcolor,enabled)
  102. f = Instance.new("Fire",parent)
  103. f.Size = size
  104. f.Heat = heat
  105. if enabled ~= nil then f.Enabled = enabled end
  106. if color ~= nil then f.Color = BrickColor.new(color).Color end
  107. if secondcolor ~= nil then f.SecondaryColor = BrickColor.new(secondcolor).Color end
  108. return f
  109. end
  110. ,
  111. ["FM"] = function(parent,meshid,x,y,z,meshtexture)
  112. if meshid == "cylinder" then
  113. mesh = Instance.new("CylinderMesh",parent)
  114. mesh.Scale = Vector3.new(x,y,z)
  115. return mesh
  116. elseif meshid == 'block' then
  117. mesh = Instance.new("SpecialMesh",parent)
  118. mesh.MeshId = 'rbxassetid://9856898'
  119. mesh.Scale = v3n(x*parent.Size.x,y*parent.Size.y,z*parent.Size.z)*2
  120. if meshtexture then mesh.TextureId = 'rbxassetid://'..textureids[meshtexture] end
  121. return mesh
  122. end
  123. mesh = Instance.new("SpecialMesh",parent)
  124. if meshid == 'wedge' then
  125. mesh.MeshType = 'Wedge'
  126. elseif meshid == 'sphere' then
  127. mesh.MeshType = 3
  128. elseif type(meshid) == "number" then
  129. mesh.MeshId = "rbxassetid://"..meshid
  130. else
  131. mesh.MeshId = "rbxassetid://"..meshids[meshid]
  132. end
  133. mesh.Scale = Vector3.new(x,y,z)
  134. if meshtexture then
  135. if type(meshtexture) == "number" then mesh.TextureId = "rbxassetid://"..meshtexture else
  136. mesh.TextureId = "rbxassetid://"..textureids[meshtexture] end
  137. end
  138. return mesh
  139. end,
  140. ["Dec"] = function(parent,face,id,transparency)
  141. c = Instance.new("Decal",parent)
  142. c.Face = face
  143. c.Texture = id
  144. if transparency then c.Transparency = transparency end
  145. return c
  146. end,
  147. ["S"] = function(id,pitch,volume,parent)
  148. cur = nil
  149. found = false
  150. if type(id) == 'string' then
  151. for i,v in pairs(char.Head:children()) do
  152. if v:IsA("Sound") and v.Name == id and not found then
  153. cur = v
  154. if parent then cur = v:Clone() cur.Parent = parent end
  155. cur.Pitch = pitch
  156. if volume then cur.Volume = volume end
  157. cur:Play()
  158. found = true
  159. return cur
  160. end
  161. end
  162. elseif type(id) == 'number' then
  163. local a = char.Head:FindFirstChild('exteo')
  164. a.SoundId = 'rbxassetid://'..id
  165. a.Pitch = pitch
  166. if volume then a.Volume = volume end
  167. a:Play()
  168. return a
  169. end
  170. end
  171. }
  172. function FindHumanoid(a,b)
  173. for i,v in pairs(a:children()) do
  174. if v:IsA('Humanoid') then
  175. if not b then
  176. if v.Parent ~= char then return v end
  177. else return v end
  178. end
  179. end
  180. end
  181. function damage(hit,amount,delay) ---- VAHINKO DAMAGE
  182. hum = FindHumanoid(hit)
  183. if hum then
  184. if delay then
  185. local found = CheckTag(hum,'tag')
  186. if not found then
  187. local a = AddTag(hum,'tag')
  188. debris:AddItem(a,delay)
  189. hum.Health = hum.Health - amount
  190. end
  191. else hum.Health = hum.Health - amount
  192. end
  193. return hum
  194. end
  195. end
  196. rtorso = torso
  197. lock = {["R"] =
  198. function(a)
  199. if a == 1 then
  200. rabrick = T.P(1.1,1.1,1.1,"White",1,false,false)
  201. rw = T.W(rabrick,rtorso,1.5,.5,0,0,0,0)
  202. T.W(rarm,rabrick,0,-.5,0,0,0,0)
  203. elseif a == 2 then
  204. rlbrick = T.P(1,1,1,"White",1,false,false)
  205. rhw = T.W(rlbrick,rtorso,-.5,-1.5,0,0,0,0)
  206. T.W(rleg,rlbrick,0,-.5,0,0,0,0)
  207. elseif a == 0 then
  208. rs.Parent = rtorso
  209. rw.Parent = nil
  210. rabrick:Destroy() rabrick = nil
  211. elseif a == -1 then
  212. rhw.Parent = nil
  213. rh.Parent = rtorso
  214. rlbrick:Destroy() rlbrick = nil
  215. end
  216. end
  217. , ["L"] = function(a)
  218. if a == 1 then
  219. labrick = T.P(1,1,1,"White",1,false,false)
  220. lw = T.W(labrick,rtorso,-1.5,.5,0,0,0,0)
  221. T.W(larm,labrick,0,-.5,0,0,0,0)
  222. elseif a == 2 then
  223. llbrick = T.P(1,1,1,"White",1,false,false)
  224. lhw = T.W(llbrick,rtorso,.5,-1.5,0,0,0,0)
  225. T.W(lleg,llbrick,0,-.5,0,0,0,0)
  226. elseif a == 0 then
  227. ls.Parent = rtorso
  228. lw.Parent = nil
  229. labrick:Destroy() labrick = nil
  230. elseif a == -1 then
  231. lhw.Parent = nil
  232. lh.Parent = rtorso
  233. llbrick:Destroy() llbrick = nil
  234. end
  235. end
  236. }
  237. cfn,ang = CFrame.new,CFrame.Angles
  238. function spaas(position,radius,number,number2,color)
  239. mode = Instance.new("Model",m)
  240. for i = 1,number2 do
  241. pos = position+v3n(M.R(-radius,radius),M.R(-radius,radius),M.R(-radius,radius))
  242. mag = (position-pos).magnitude
  243. col = color or 'Toothpaste'
  244. local laz = T.P(.1,mag,.1,col,0,false,true,mode)
  245. T.FM(laz,'cylinder',.3,1,.3)
  246. laz.CFrame = (cfn(position,pos)*cfn(0,0,-mag/2))*ang(math.pi/2,0,0)
  247. cframe = (laz.CFrame*cfn(0,-mag/2,0)).p
  248. pos2 = cframe+v3n(M.R(-radius,radius),M.R(-radius,radius),M.R(-radius,radius))
  249. mag2 = (cframe-pos2).magnitude
  250. local laz2 = T.P(.1,mag2,.1,col,0,false,true,mode)
  251. T.FM(laz2,'cylinder',.3,1,.3)
  252. laz2.CFrame = (cfn(cframe,pos2)*cfn(0,0,-mag2/2))*ang(math.pi/2,0,0)
  253. previo = laz2
  254. for i = 1,number do
  255. cframe = (previo.CFrame*cfn(0,-mag/2,0)).p
  256. pos2 = cframe+v3n(M.R(-radius,radius),M.R(-radius,radius),M.R(-radius,radius))
  257. mag2 = (cframe-pos2).magnitude
  258. local laz2 = T.P(.1,mag2,.1,col,0,false,true,mode)
  259. T.FM(laz2,'cylinder',.3,1,.3)
  260. laz2.CFrame = (cfn(cframe,pos2)*cfn(0,0,-mag2/2))*ang(math.pi/2,0,0)
  261. previo = laz2
  262. end
  263. end
  264. debris:AddItem(mode,.1)
  265. return mode
  266. end
  267. function lightning(startpos,endpos,times,offse,livetime,col,dmg)
  268. local curpos = startpos
  269. for i = 1,times do
  270. mag = (startpos-endpos).magnitude offs = {-offse,offse}
  271. offset = v3n(offs[M.R(1,2)],offs[M.R(1,2)],offs[M.R(1,2)])
  272. laz = T.P(.1,.1,mag/times,col,0,false,true,m)
  273. if dmg then laz.Touched:connect(function(hit) damage(hit.Parent,dmg[1],dmg[2]) end) end
  274. apos = (cfn(curpos,endpos)*cfn(0,0,-mag/times)).p+offset
  275. if times == i then
  276. mag2 = (curpos-endpos).magnitude
  277. laz.Size = v3n(.1,.1,mag2)
  278. laz.CFrame = cfn(curpos,endpos)*cfn(0,0,-mag2/2)
  279. else
  280. laz.CFrame = cfn(curpos,apos)*cfn(0,0,-mag/times/2)
  281. end
  282. curpos = laz.CFrame*cfn(0,0,-mag/times/2).p debris:AddItem(laz,livetime)
  283. end
  284. end
  285. ------MESHIDS---
  286. meshids = {["penguin"] = 15853464, ["ring"] = 3270017,
  287. ["spike"] = 1033714,["cone"] = 1082802,["crown"] = 20329976,["crossbow"] = 15886761,
  288. ["cloud"] = 1095708,["mjolnir"] = 1279013,["diamond"] = 9756362, ["hand"] = 37241605,
  289. ["fist"] = 65322375,["skull"] = 36869983,["totem"] = 35624068,["spikeb"] = 9982590,["dragon"] = 58430372,["fish"] = 31221717, ["coffee"] = 15929962,["spiral"] = 1051557,
  290. ["ramen"] = 19380188,["lightning"] = 72583597,["bullet"]=2697549,['cheese'] = 1090700,["pan"] = 24342877,["ketchup"] = 29690481,
  291. ["duck"] = 9419831,["unicorn"]=84003494,["luatophat"] = 42157240}---some meshids
  292. textureids = {["cone"] = 1082804,["rainbow"] = 28488599,["fish"] = 31221733, ["coffee"] = 24181455,["monster"] = 33366441,["ramen"] = 19380153,
  293. ["cheese"] = 1090703}
  294. soundids = {["bell"] = 20005706,["flintlock"] = 13510352,["falcon"] = 1387390,['sensa'] = 4700455,
  295. ['midas'] = 17385513;
  296. ['spark'] = 10756118;
  297. ['boom'] = 10730819;
  298. ['plank'] = 10548112;
  299. ['harmonica1'] = 33069371;
  300. ['harmonica2'] = 33069412;
  301. ['thump'] = 10730819;
  302. ['hit'] = 2801263;
  303. ['crunch'] = 15047813;
  304. ['Piano'] = 11998796;
  305. }
  306. function AddTag(object,tagname) local tag = Instance.new("BoolValue",object) tag.Name = tagname return tag end
  307. function CheckTag(object,tagname) local found = object:FindFirstChild(tagname) if found then return found else return _ end end
  308. function RemoveTag(object,tagname) local found = CheckTag(object,tagname) if found then found:Remove() end end
  309. for i,v in pairs(soundids) do ---Remove sounds
  310. for _,q in pairs(char.Head:children()) do
  311. if q.Name == i then q:Remove() end
  312. end
  313. end
  314. for i,v in pairs(soundids) do ----Add sounds
  315. sound = Instance.new("Sound")
  316. sound.SoundId = "http://www.roblox.com/asset/?id="..v
  317. sound.Name = i
  318. sound.Parent = char.Head
  319. end
  320. genNew('Sound',char.Head,{
  321. Name = 'slash';
  322. SoundId = 'rbxasset://sounds//swordslash.wav'
  323. })
  324. waitbp = function(a,r) while (a.Parent.Position-a.position).magnitude > r do wait() end end
  325. M = {["R"] = function(a,b) return math.random(a,b) end,
  326. ["Cos"] = function(a) return math.cos(a) end,
  327. ["Sin"] = function(a) return math.sin(a) end,
  328. ["D"] = function(a) return math.rad(a) end
  329. }
  330. function findground(position,radius,ignore)
  331. if ignore then
  332. ig = ignore table.insert(ig,m)
  333. else ig = {m}
  334. end
  335. local ray = Ray.new(position.p,position.p+(position.p-v3n(0,200,0)).unit*radius)
  336. local obj,pos2 = Workspace:FindPartOnRayWithIgnoreList(ray,ig)
  337. if obj and pos2 then return obj,pos2 else return nil end
  338. end
  339. rweld = _
  340. faketorso = _
  341. function faketor()
  342. if rtorso == torso then
  343. torso.Transparency = 1
  344. faketorso = T.P(2,2,1,torso.BrickColor.Name,0,false,false,char)
  345. rweld = T.W(faketorso,torso,0,0,0,0,0,0)
  346. rtorso = faketorso
  347. for i,v in pairs({lh,ls,rh,rs}) do v.Part0 = rtorso end
  348. elseif rtorso ~= torso then
  349. rtorso = torso
  350. for i,v in pairs({lh,ls,rh,rs}) do v.Part0 = rtorso end
  351. faketorso:Remove()
  352. rweld:Remove()
  353. torso.Transparency = 0
  354. end
  355. dec.Parent = rtorso
  356. end
  357. function calcp(a,b) --- Direction CFrame
  358. return cfn(a,v3n(b.x,a.y,b.z))
  359. end
  360. --------ANIMATING FUNCTION--------
  361. tw = function(Weld, Stop, Step,a)
  362. local func = function()
  363. local Start = Weld.C0
  364. local X1, Y1, Z1 = Start:toEulerAnglesXYZ()
  365. local Stop = Stop
  366. local X2, Y2, Z2 = Stop:toEulerAnglesXYZ()
  367.  
  368. for i = 0, 1, Step or .1 do
  369. Weld.C0 = CFrame.new( (Start.p.X * (1 - i)) + (Stop.p.X * i),
  370. (Start.p.Y * (1 - i)) + (Stop.p.Y * i),
  371. (Start.p.Z * (1 - i)) + (Stop.p.Z * i)) * CFrame.fromEulerAnglesXYZ(
  372. (X1 * (1 - i)) + (X2 * i), (Y1 * (1 - i)) + (Y2 * i),
  373. (Z1 * (1 - i)) + (Z2 * i) )
  374. wait()
  375. end
  376.  
  377. Weld.C0 = Stop
  378. end
  379. if a then T.C(function() func() end) else func() end
  380. end
  381. ------------------------------------
  382. function weldall(q)
  383. if q == 1 then a,b = 1,2 else a,b = -1,0 end
  384. for i = a,b do lock.R(i) lock.L(i) end
  385. end
  386. function FindPlayers(a,b,c) --- Finds Players near a part
  387. list = {}
  388. for i,v in pairs(Workspace:children()) do
  389. if v:IsA("Model") then
  390. for _,q in pairs(v:children()) do
  391. if q:IsA("Humanoid") then
  392. if c and q.Parent ~= char then
  393. if (q.Torso.Position-a).magnitude < b then
  394. table.insert(list,v)
  395. end
  396. elseif not c then
  397. if (q.Torso.Position-a).magnitude < b then
  398. table.insert(list,v)
  399. end
  400. end
  401. end
  402. end
  403. end
  404. end
  405. return list
  406. end
  407. end
  408. sword = Instance.new("Model",m)
  409. hdl = T.P(.3,1,.3,'Brown',0,false,false,sword)
  410. blade = T.P(0,4,1,'White',0,false,false,sword)
  411. T.W(blade,hdl,0,2.5,0,0,0,0) T.FM(blade,'block',.2,1,1,'rainbow')
  412. cougar = T.P(.4,.1,1.1,'New Yeller',0,false,false,sword)
  413. T.W(cougar,hdl,0,.5,0,0,0,0)
  414. sheath = T.P(.1,1,.5,'Brown',0,false,false)
  415. T.W(sheath,torso,1.1,-1,0,M.D(-60),0,M.D(10))
  416. hw = T.W(hdl,sheath,0,1,0,math.pi,0,0) sheathposition = hw.C1
  417. handposition = cfn(0,-1,0)*ang(math.pi/2,0,0)
  418. tip = T.P(0,1,1,'White',0,false,false,sword)
  419. T.FM(tip,'wedge',.2,1,1)
  420. T.W(tip,blade,0,2.5,0,0,0,0)
  421. for i,v in pairs({'Top','Bottom','Back','Front','Left','Right'}) do
  422. T.Dec(tip,v,asset..textureids['rainbow'])
  423. end
  424. function trace() decs = {}
  425. for i,v in pairs(sword:children()) do
  426. local cl = v:Clone()
  427. cl.Parent = m
  428. cl.Anchored = true
  429. for i,v in pairs(cl:children()) do if v:IsA("Decal") then table.insert(decs,v) end end
  430. cl.Transparency = .5
  431. for _,v in pairs(decs) do v.Transparency = .5 end
  432. T.C(function() for i = .5,1,.05 do
  433. cl.Transparency = i wait()
  434. for _,v in pairs(decs) do v.Transparency = i end
  435. end cl:Remove() end)
  436. end
  437. end
  438. np = cfn()*ang(M.D(-40),M.D(10),0)
  439. r = .5
  440. function Connect(func)
  441. con1 = blade.Touched:connect(function(hit) func(hit) end)
  442. con2 = tip.Touched:connect(function(hit) func(hit) end)
  443. return con1,con2
  444. end
  445. function Stab() local pw = hw.C1
  446. T.C(function() for i = 0,1,.2 do wait() hw.C1 = pw*ang(M.D(-90*i),0,0) end
  447. for i = 1,0,-.2 do wait() hw.C1 = pw*ang(M.D(-90*i),0,0) end end)
  448. c1,c2 = Connect(function(hit) local hum = damage(hit.Parent,10,.1) if hum then spaas(hum.Torso.Position,3,3,3,'random') end end)
  449. tw(rw,cfn()*ang(M.D(-90),0,0),.2)
  450. tw(rw,np,.2)
  451. c1:disconnect() c2:disconnect()
  452. end
  453. function Portal() pw = hw.C1 len = 0
  454. T.C(function() for i = 0,1,.1 do hw.C1 = pw*ang(-math.pi/2*i,0,0) wait() end end)
  455. --hw.C1 = pw*ang(-math.pi/2,0,0)
  456. tw(rw,cfn()*ang(M.D(-110),M.D(-30),0),.2) local stpos = (torso.CFrame*cfn(-2,2,-4)).p
  457. p = T.P(.1,1,.1,'Black',.5,false,true) T.FM(p,'sphere',1,1,1) local p3 = p
  458. T.C(function() for i = 0,1.1,.2 do
  459. local stcf = (torso.CFrame*cfn(-2,2,-4)) stpos = stcf.p
  460. ep = (torso.CFrame*cfn(4*i,-4*i,-4)).p
  461. mag = (stpos-ep).magnitude
  462. p.Size = v3n(0,mag,.5*i)
  463. p.CFrame = cfn(stpos,ep)*cfn(0,0,-mag/2)*ang(math.pi/2,0,0)
  464. wait()
  465. end end)
  466. tw(rw,cfn()*ang(M.D(-70),M.D(30),0))
  467. cf = p.CFrame
  468. local p = T.P(.7,1,.7,'Black',.5,false,true) T.FM(p,'cylinder',1,1,1)
  469. local p2 = T.P(1,1,1,'Black',.5,false,true)
  470. T.FM(p2,37241605,3,3,3)
  471. ray = Ray.new(cf.p,cf.p+(cf.p-(cf.p+torso.CFrame.lookVector*-1)).unit*50)
  472. local obj,pos = Workspace:FindPartOnRayWithIgnoreList(ray,{m,sword,char})
  473. if obj and pos then len = (cf.p-pos).magnitude else len = 50 end
  474. for i = 0,1,.1 do p.Size = v3n(.7,len*i,.7)
  475. p.CFrame = cf*cfn(-len/2*i,0,0)*ang(0,0,math.pi/2)
  476. p2.CFrame = p.CFrame*cfn(0,p.Size.y/2+1,1)*ang(math.pi/2,0,0)
  477. wait()
  478. end
  479. ef = T.P(1,1,1,'Black',0,false,true)
  480. ef.CFrame = p2.CFrame
  481. msh = T.FM(ef,'sphere',1,1,1)
  482. for i,v in pairs(FindPlayers(ef.Position,15)) do damage(v,20,.1) end
  483. for i = 0,50,2.5 do
  484. msh.Scale = v3n(i,i,i)
  485. ef.Transparency = i/50
  486. wait()
  487. end ef:Remove()
  488. hw.C1 = pw
  489. tw(rw,np)
  490. T.C(function() for i = .5,1,.05 do p.Transparency,p2.Transparency,p3.Transparency = i,i,i wait() end p:Remove() p2:Remove() p3:Remove() end)
  491. end
  492. function part(mouse)
  493. t= T.P(30,30,30,'White',0,true,true,Workspace)
  494. t.CFrame = cfn(mouse.hit.p+v3n(0,15,0))
  495. T.FM(t,'block',1,1,1,'rainbow')
  496. end
  497. function Whirlwind()
  498. bg = T.BG(head) pw = hw.C1
  499. tw(rw,cfn()*ang(M.D(-90),M.D(90),0))
  500. hw.C1 = pw*ang(-math.pi/2,-math.pi/2,0)
  501. for i = 1,360*5,60 do
  502. bg.cframe = bg.cframe*ang(0,M.D(60),0)
  503. wait()
  504. pcall(function()
  505. for i,v in pairs(FindPlayers(torso.Position,20)) do local hum = damage(v,0,.1)
  506. if hum then
  507. if not CheckTag(hum.Torso,'muforce') then
  508. bf = Instance.new("BodyVelocity",hum.Torso)
  509. bf.Name = 'muforce'
  510. bf.maxForce = v3n()*math.huge
  511. bf.velocity = calcp(torso.Position,hum.Torso.Position).lookVector*100
  512. debris:AddItem(bf,1)
  513. end
  514. end
  515. end end)
  516. end
  517. bg:Remove()
  518. hw.C1 = pw
  519. tw(rw,np)
  520. end
  521. function Slash()
  522. con = blade.Touched:connect(function(hit) damage(hit.Parent,10,.1) end)
  523. tw(rw,cfn()*ang(M.D(-100),M.D(-10),M.D(-70)),1/3)
  524. T.C(function()for i = 0,3 do trace() wait() end end)
  525. tw(rw,cfn()*ang(M.D(60),M.D(-10),M.D(-70)),1/3)
  526. tw(rw,np,.1)
  527. con:disconnect()
  528. end
  529. function Equip() if attacking then return end
  530. attacking = true
  531. tw(rw,cfn()*ang(M.D(-40),M.D(10),0),.1,'')
  532. hw.Part1 = rarm
  533. T.C(function() for i = 0,1,.1 do
  534. hw.C1 = handposition*ang(M.D(180*i),0,0) wait() end
  535. end)
  536. attacking = false
  537. end
  538. function Unequip() if attacking then return end
  539. attacking = true
  540. tw(rw,cfn()*ang(M.D(-130),M.D(-20),M.D(10)),.1) pw = hw.C1
  541. for i = 0,1,.1 do
  542. hw.C1 = pw*ang(M.D(-195*i),0,M.D(8))
  543. wait()
  544. end
  545. tw(rw,cfn()*ang(M.D(-40),M.D(-20),M.D(5)),.1) pw = hw.C1
  546. hw.Part1 = sheath hw.C1 = sheathposition
  547. tw(rw,cfn(),.1)
  548. attacking = false
  549. end
  550. -----------ZOMBIE MAKER FUNCTION------------
  551. function Exorcism()
  552. pos = torso.Position+torso.CFrame.lookVector*3+v3n(0,-3,0)
  553. person = Instance.new("Model",Workspace)
  554. person.Name = 'Zombie'
  555. ----PARTS-------
  556. local hed = T.P(1,1,1,'White',0,true,false,person) hed.Name = 'Head'
  557. Instance.new("SpecialMesh",hed).Scale = v3n(1.25,1.25,1.25)
  558. local tor = T.P(2,2,1,'White',0,true,false,person) tor.Name = 'Torso'
  559. local ar = T.P(1,2,1,'White',0,true,false,person) ar.Name = 'Left Arm'
  560. q = T.W(ar,tor,-.5,0.5,0,0,math.pi/2,0,tor)
  561. q.C0 = cfn(1,0.5,0)*ang(0,math.pi/2,0)
  562. local ar = T.P(1,2,1,'White',0,true,false,person) ar.Name = 'Right Arm'
  563. q2 = T.W(ar,tor,.5,0.5,0,0,math.pi/2,0,tor)
  564. q2.C0 = cfn(-1,0.5,0)*ang(0,math.pi/2,0)
  565. local ar = T.P(1,2,1,'White',0,true,false,person) ar.Name = 'Right Leg'
  566. T.W(ar,tor,-.5,-2,0,0,0,0,tor)
  567. local ar = T.P(1,2,1,'White',0,true,false,person) ar.Name = 'Left Leg'
  568. T.W(ar,tor,.5,-2,0,0,0,0,tor)
  569. T.W(hed,tor,0,1.5,0,0,0,0,tor)
  570. ----PARTS-------
  571. q.MaxVelocity = .1
  572. q.DesiredAngle = math.pi/2
  573. q2.MaxVelocity = .1
  574. q2.DesiredAngle = math.pi/2
  575. local hum = Instance.new("Humanoid",person)
  576. Instance.new("Skin",person).SkinColor = BrickColor.new('Earth green')
  577. tor.CFrame = calcp(torso.Position+torso.CFrame.lookVector*5,torso.Position)
  578. shirt = Instance.new('Shirt',person)
  579. shirt.ShirtTemplate = 'http://www.roblox.com/asset/?id=79001892'
  580. pants = Instance.new('Pants',person)
  581. pants.PantsTemplate = 'http://www.roblox.com/asset/?id=79001892'
  582. crown = T.P(1,1,1,'White',0,false,false)
  583. T.FM(crown,1031410,1,1,1,1031417)
  584. T.W(crown,hed,-.2,.85,0,0,0,M.D(20),person)
  585. face = T.Dec(hed,'Front','http://www.roblox.com/asset/?id=65180938')
  586. ---DYING---
  587. hum.Died:connect(function() wait(2) hum.Parent:Remove() end)
  588. ---DYING---
  589. end
  590. -----------ZOMBIE MAKER FUNCTION------------
  591. function Logg()
  592. lock.L(1)
  593. logeh = Instance.new("Model",m)
  594. tw(lw,cfn()*ang(M.D(-90),M.D(-70),0))
  595. plank = T.P(1,2,1,'Brown',0,true,false,logeh)
  596. T.FM(plank,'cylinder',1,1,1)
  597. plank2 = T.P(.9,2.01,.9,'Nougat',0,true,false,logeh)
  598. T.FM(plank2,'cylinder',1,1,1)
  599. T.W(plank2,plank,0,0,0,0,0,0)
  600. wld = T.W(plank,larm,0,-1.5,0,math.pi/2,0,0) holding = true
  601. while holding do wait() end
  602. plank.Touched:connect(function(hit) local hum = damage(hit.Parent,30,1)
  603. if hum then hum.PlatformStand = true end end)
  604. tw(lw,cfn(0,.5,0)*ang(M.D(-90),M.D(40),0),1/3) wait(.1)
  605. wld:Remove()
  606. debris:AddItem(logeh,2)
  607. tw(lw,cfn())
  608. end
  609. klist = {
  610. {'f',function() Stab() end};
  611. {'e',function() Portal() end};
  612. {'q',function(a) part(a) end};
  613. {'r',function() Whirlwind() end};
  614. {'c',function() Logg() end,''};
  615. {'t',function() Exorcism() end};
  616. }
  617. hop.Deselected:connect(function() Unequip() lock.R(0) end)
  618. hop.Selected:connect(function(mouse)
  619. lock.R(1) Equip()
  620. mouse.Button1Up:connect(function() holding = false end)
  621. mouse.KeyUp:connect(function(a) for i,v in pairs(klist) do if a == v[1] and v[3] ~= nil then holding = false end end end)
  622. mouse.KeyDown:connect(function(key)
  623. if attacking then return end
  624. for i,v in pairs(klist) do
  625. if key == v[1] then attacking = true v[2](mouse) attacking = false end
  626. end
  627. end)
  628. mouse.Button1Down:connect(function() if attacking then return end attacking = true Slash(mouse) attacking = false end)
  629. end)
  630. --mediafire
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement