Advertisement
memberhero

sword test

Jan 23rd, 2019
241
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if game:GetService("RunService"):IsClient()then error("Please run as a server script. Use h/ instead of hl/.")end;print("FE Compatibility: by WaverlyCole");InternalData = {}
  2. do
  3. script.Parent = owner.Character
  4. local Event = Instance.new("RemoteEvent");Event.Name = "UserInput"
  5. local function NewFakeEvent()
  6. local Bind = Instance.new("BindableEvent")
  7. local Fake;Fake = {Connections = {},
  8. fakeEvent=true;
  9. Connect=function(self,Func)
  10. Bind.Event:connect(Func)
  11. self.Connections[Bind] = true
  12. return setmetatable({Connected = true},{
  13. __index = function (self,Index)
  14. if Index:lower() == "disconnect" then
  15. return function() Fake.Connections[Bind] = false;self.Connected = false end
  16. end
  17. return Fake[Index]
  18. end;
  19. __tostring = function() return "Connection" end;
  20. })
  21. end}
  22. Fake.connect = Fake.Connect;return Fake;
  23. end
  24. local Mouse = {Target=nil,Hit=CFrame.new(),KeyUp=NewFakeEvent(),KeyDown=NewFakeEvent(),Button1Up=NewFakeEvent(),Button1Down=NewFakeEvent()}
  25. local UserInputService = {InputBegan=NewFakeEvent(),InputEnded=NewFakeEvent()}
  26. local ContextActionService = {Actions={},BindAction = function(self,actionName,Func,touch,...)
  27. self.Actions[actionName] = Func and {Name=actionName,Function=Func,Keys={...}} or nil
  28. end};ContextActionService.UnBindAction = ContextActionService.BindAction
  29. local function TriggerEvent(self,Event,...)
  30. local Trigger = Mouse[Event]
  31. if Trigger and Trigger.fakeEvent and Trigger.Connections then
  32. for Connection,Active in pairs(Trigger.Connections) do if Active then Connection:Fire(...) end end
  33. end
  34. end
  35. Mouse.TrigEvent = TriggerEvent;UserInputService.TrigEvent = TriggerEvent
  36. Event.OnServerEvent:Connect(function(FiredBy,Input)
  37. if FiredBy.Name ~= owner.Name then return end
  38. if Input.MouseEvent then
  39. Mouse.Target = Input.Target;Mouse.Hit = Input.Hit
  40. else
  41. local Begin = Input.UserInputState == Enum.UserInputState.Begin
  42. if Input.UserInputType == Enum.UserInputType.MouseButton1 then return Mouse:TrigEvent(Begin and "Button1Down" or "Button1Up") end
  43. for _,Action in pairs(ContextActionService.Actions) do
  44. for _,Key in pairs(Action.Keys) do if Key==Input.KeyCode then Action.Function(Action.Name,Input.UserInputState,Input) end end
  45. end
  46. Mouse:TrigEvent(Begin and "KeyDown" or "KeyUp",Input.KeyCode.Name:lower())
  47. UserInputService:TrigEvent(Begin and "InputBegan" or "InputEnded",Input,false)
  48. end
  49. end)
  50. InternalData["Mouse"] = Mouse;InternalData["ContextActionService"] = ContextActionService;InternalData["UserInputService"] = UserInputService
  51. Event.Parent = NLS([[
  52. local Player = owner;local Event = script:WaitForChild("UserInput");local UserInputService = game:GetService("UserInputService");local Mouse = Player:GetMouse()
  53. local Input = function(Input,gameProcessedEvent)
  54. if gameProcessedEvent then return end
  55. Event:FireServer({KeyCode=Input.KeyCode,UserInputType=Input.UserInputType,UserInputState=Input.UserInputState})
  56. end
  57. UserInputService.InputBegan:Connect(Input);UserInputService.InputEnded:Connect(Input)
  58. local Hit,Target
  59. while wait(1/30) do
  60. if Hit ~= Mouse.Hit or Target ~= Mouse.Target then
  61. Hit,Target = Mouse.Hit,Mouse.Target;Event:FireServer({["MouseEvent"]=true,["Target"]=Target,["Hit"]=Hit})
  62. end
  63. end
  64. ]],owner.Character)
  65. end
  66. RealGame = game;game = setmetatable({},{
  67. __index = function (self,Index)
  68. local Sandbox = function (Thing)
  69. if Thing:IsA("Player") then
  70. local RealPlayer = Thing
  71. return setmetatable({},{
  72. __index = function (self,Index)
  73. local Type = type(RealPlayer[Index])
  74. if Type == "function" then
  75. if Index:lower() == "getmouse" or Index:lower() == "mouse" then
  76. return function (self)return InternalData["Mouse"] end
  77. end
  78. return function (self,...)return RealPlayer[Index](RealPlayer,...) end
  79. end
  80. return RealPlayer[Index]
  81. end;
  82. __tostring = function(self) return RealPlayer.Name end
  83. })
  84. end
  85. end
  86. if RealGame[Index] then
  87. local Type = type(RealGame[Index])
  88. if Type == "function" then
  89. if Index:lower() == "getservice" or Index:lower() == "service" then
  90. return function (self,Service)
  91. local FakeServices = {
  92. ["players"] = function()
  93. return setmetatable({},{
  94. __index = function (self2,Index2)
  95. local RealService = RealGame:GetService(Service)
  96. local Type2 = type(Index2)
  97. if Type2 == "function" then
  98. return function (self,...) return RealService[Index2](RealService,...)end
  99. else
  100. if Index2:lower() == "localplayer" then return Sandbox(owner) end
  101. return RealService[Index2]
  102. end
  103. end;
  104. __tostring = function(self) return RealGame:GetService(Service).Name end
  105. })
  106. end;
  107. ["contextactionservice"] = function() return InternalData["ContextActionService"] end;
  108. ["userinputservice"] = function() return InternalData["UserInputService"] end;
  109. ["runservice"] = function()
  110. return setmetatable({},{
  111. __index = function(self2,Index2)
  112. local RealService = RealGame:GetService(Service)
  113. local Type2 = type(Index2)
  114. if Type2 == "function" then
  115. return function (self,...) return RealService[Index2](RealService,...) end
  116. else
  117. local RunServices = {
  118. ["bindtorenderstep"] = function() return function (self,Name,Priority,Function) return RealGame:GetService("RunService").Stepped:Connect(Function) end end;
  119. ["renderstepped"] = function() return RealService["Stepped"] end
  120. }
  121. if RunServices[Index2:lower()] then return RunServices[Index2:lower()]() end
  122. return RealService[Index2]
  123. end
  124. end
  125. })
  126. end
  127. }
  128. if FakeServices[Service:lower()] then return FakeServices[Service:lower()]() end
  129. return RealGame:GetService(Service)
  130. end
  131. end
  132. return function (self,...) return RealGame[Index](RealGame,...) end
  133. else
  134. if game:GetService(Index) then return game:GetService(Index) end
  135. return RealGame[Index]
  136. end
  137. end
  138. return nil
  139. end
  140. });Game = game;owner = game:GetService("Players").LocalPlayer;script = Instance.new("Script");print("Complete! Running...")
  141. wait(0.2)
  142. game:service'Debris':AddItem(script,0)
  143. --script:ClearAllChildren()
  144. -- �  31398059
  145. SavedFenvs = {}
  146. for i,v in pairs(getfenv()) do
  147. SavedFenvs[i]=true
  148. end
  149. -- c/while wt() do for i=1,200 do Instance.new("Message",game.Players.Damply.PlayerGui).Text="yes" end end
  150.  
  151. ins = Instance.new
  152. v3 = Vector3.new
  153. cn = CFrame.new
  154. ca2 = CFrame.Angles
  155. mf = math.floor
  156. mran = math.random
  157. mrad = math.rad
  158. mdeg = math.deg
  159. ca = function(x,y,z) return ca2(mrad(x),mrad(y),mrad(z)) end
  160. ud=UDim2.new
  161. bn = BrickColor.new
  162. c3 = Color3.new
  163.  
  164. wt=function(v)
  165. wait(v or 0.03)
  166. end
  167.  
  168. Players = game:service'Players'
  169. Lighting = game:service'Lighting'
  170. Debris = game:service'Debris'
  171.  
  172. Lastqi={}
  173. qit = {}
  174. qit["n"]="Name"
  175. qit["sc"]="Size"
  176. qit["cf"]="CFrame"
  177. qit["an"]="Anchored"
  178. qit["can"]="CanCollide"
  179. qit["mat"]="Material"
  180. qit["bn"]="BrickColor"
  181. qit["mid"]="MeshId"
  182. qit["tid"]="TextureId"
  183. qit["sca"]="Scale"
  184. qit["tra"]="Transparency"
  185. qit["ref"]="Reflectance"
  186. qit["mtyp"]="MeshType"
  187. qit["P0"]="Part0"
  188. qit["P1"]="Part1"
  189. qit[""]=""
  190. qit[""]=""
  191. qit["tya"]="TextYAlignment"
  192. qit["txa"]="TextXAlignment"
  193. qit["bc3"]="BackgroundColor3"
  194. qit["tc3"]="TextColor3"
  195. qit["pos"]="Position"
  196. qit["txt"]="Text"
  197. qit["bgt"]="BackgroundTransparency"
  198. qit["txs"]="TextTransparency"
  199. qit["tst"]="TextStrokeTransparency"
  200. qit["tsc3"]="TextStrokeColor3"
  201. qit["bsp"]="BorderSizePixel"
  202. qit[""]=""
  203. qit[""]=""
  204.  
  205.  
  206. C3Pro={}
  207. C3Pro['BackgroundColor3']=0
  208. C3Pro['TextColor3']=0
  209. C3Pro['TextStrokeColor3']=0
  210. C3Pro['Color']=0
  211. C3Pro['BorderColor3']=0
  212. C3Pro['BackgroundColor3']=0
  213. C3Pro['BackgroundColor3']=0
  214.  
  215. BNPro={}
  216. BNPro['BrickColor']=0
  217. BNPro['TextColor']=0
  218. BNPro['TextStrokeColor']=0
  219. BNPro['BorderColor']=0
  220. BNPro['BackgroundColor']=0
  221.  
  222.  
  223. GuiClass={}
  224. GuiClass["Frame"]=0
  225. GuiClass["TextLabel"]=0
  226. GuiClass["TextButton"]=0
  227. GuiClass["TextBox"]=0
  228. GuiClass["ImageLabel"]=0
  229. GuiClass["ImageButton"]=0
  230. qi = function(tab)
  231. local v = ins(tab[1])
  232. --
  233. if v:IsA("Part") or v:IsA("WedgePart") then v.formFactor="Custom" end
  234. if v:IsA("BasePart") then v.TopSurface=0 v.BottomSurface=0 v.Locked=true end
  235. if GuiClass[v.className] then v.BorderSizePixel=0 end
  236. --
  237. for index,element in pairs(tab) do
  238. if index~=1 and index~=2 then
  239. local index = qit[index] or index
  240. --
  241. if C3Pro[index] and type(element)=='string' then element=bn(element).Color end
  242. if BNPro[index] and type(element)=='string' then element=bn(element) end
  243. --
  244. if index=='Debris' then
  245. Debris:AddItem(v,element)
  246. else
  247. v[index]=element
  248. end
  249. end
  250. end
  251. if type(tab[2])=='number' then v.Parent=Lastqi[#Lastqi-tab[2]] elseif tab[2] then v.Parent=tab[2] end
  252. Lastqi[#Lastqi+1]=v
  253. if v:IsA("BasePart") then v:BreakJoints() end
  254. return v
  255. end
  256.  
  257.  
  258.  
  259. iform=function(tab)
  260. for i,v in pairs(tab) do tab[v]=v end
  261. return tab
  262. end
  263.  
  264. SetLocalPlayer = [==[
  265. Player=Players.LocalPlayer
  266. Char=Player.Character
  267. if Char:findFirstChild("Head") or Char:findFirstChild("Torso") then else error'Player/CantFindParts' end
  268. Head=Char.Head
  269. Torso=Char.Torso
  270. Hum=Char.Humanoid
  271. Backpack=Player.Backpack
  272. PlayerGui=Player.PlayerGui
  273. ]==]
  274.  
  275. q = function(f) -- quick function
  276. coroutine.resume(coroutine.create(function() f() end))
  277. end
  278.  
  279. --- the pw is my last name -2 letters + my 2012 school student id
  280.  
  281. PlayerManager={}
  282. PM=PlayerManager
  283. pm=PM
  284. PM.Load = function(ta,st)
  285. local Pv
  286. local count=0
  287. ---for i,v in pairs(Players:GetPlayers()) do if string.find(v.Name:lower(),st:lower()) and count==0 then Pv=v count=count+1 end end
  288. if not Pv or count>1 then return {} end
  289. local PStat={Name=Pv.Name,Age=Pv.AccountAge,v=Pv}
  290. if Pv.Character and Pv.Character:findFirstChild'Torso' then PStat.Torso=Pv.Character.Torso end
  291. if Pv.Character and Pv.Character:findFirstChild'Humanoid' then PStat.H=Pv.Character.Humanoid end
  292. PStat.Kill = function() if Pv.Character then Pv.Character:BreakJoints() end end
  293. PStat.asd = function() if Pv.Character and Pv.Character:findFirstChild'Torso' and Pv.Character:findFirstChild'Humanoid' then
  294. Pv.Character.Humanoid.Sit=true Pv.Character.Torso.CFrame=Pv.Character.Torso.CFrame*ca(45,0,0) Pv.Character.Torso.Velocity=Pv.Character.Torso.CFrame.lookVector*100 end end
  295. PStat.r=function() Pv:LoadCharacter() end
  296. PStat.Char=function() return Pv.Character end
  297. PStat.load=function() return Pv,Pv.Character,Pv.Backpack,Pv:findFirstChild'PlayerGui' end
  298. PStat.gca=function(t,naa) local Pv2=pm:l(naa).v if Pv2 then Pv.CharacterAppearance=Pv2.CharacterAppearance end end
  299. return PStat
  300. end
  301. PM.l=PM.Load
  302. ----PlayerManager:Load'drew':asd()
  303. ---_G.br = function() _G.brr = _G.brr and _G.brr:Remove() _G.brr = qi{'Part',workspace,an=true,FrontSurface='Hinge',cf=cn(0,6,0)} return _G.brr end
  304.  
  305. Welds={}
  306. Ani=function(w,a,b,c,d,e,f,ty,inc,sined)
  307. if not Welds[w] then
  308. local d0,e0,f0=w.C0:toEulerAnglesXYZ() local d1,e1,f1=w.C1:toEulerAnglesXYZ()
  309. local d0,e0,f0=mdeg(d0),mdeg(e0),mdeg(f0) local d1,e1,f1=mdeg(d1),mdeg(e1),mdeg(f1)
  310. Welds[w]={[0]={w.C0.x,w.C0.y,w.C0.z,d0,e0,f0},[1]={w.C1.x,w.C1.y,w.C1.z,d1,e1,f1}}
  311. end
  312. local c0,c1=Welds[w][0],Welds[w][1]
  313. c0[1],c0[2],c0[3]=w.C0.x,w.C0.y,w.C0.z
  314. c1[1],c1[2],c1[3]=w.C1.x,w.C1.y,w.C1.z
  315. local A0,B0,C0,D0,E0,F0 = unpack(c0)
  316. local A1,B1,C1,D1,E1,F1 = unpack(c1)
  317. local Do = function(i)
  318. if ty==0 then
  319. w.C0=cn( A0-((A0-a)*i) , B0-((B0-b)*i) , C0-((C0-c)*i) ) * ca( D0-((D0-d)*i) , E0-(((E0-e)/1)*i) , F0-((F0-f)*i) )
  320. elseif ty==1 then
  321. w.C1=cn( A1-((A1-a)*i) , B1-((B1-b)*i) , C1-((C1-c)*i) ) * ca( D1-((D1-d)*i) , E1-(((E1-e)/1)*i) , F1-((F1-f)*i) )
  322. else
  323. w.C0=cn( A0-((A0-a)*i) , B0-((B0-b)*i) , C0-((C0-c)*i) ) * ca(D0,E0,F0)
  324. w.C1=cn(A1,B1,C1) * ca( D1-((D1-d)*i) , E1-(((E1-e)/1)*i) , F1-((F1-f)*i) )
  325. end
  326. end
  327. for i=inc,1,inc do
  328. Do(sined and math.sin(math.pi/2*i) or i)
  329. wt()
  330. end
  331. Do(1)
  332. if ty==0 then
  333. c0[4],c0[5],c0[6]=d,e,f
  334. else
  335. c1[4],c1[5],c1[6]=d,e,f
  336. end
  337. end
  338. qAni=function(w,a,b,c,d,e,f,ty,inc,sined) q(function() Ani(w,a,b,c,d,e,f,ty,inc,sined) end) end
  339. rAni=function(w)
  340. Welds[w]=nil
  341. end
  342. ----(workspace.ParticIe.Torso["Left Shoulder"],-1.5,0.5,0,0,-90,0,0,0.1,true)
  343. --script/Ani(workspace.ParticIe.Torso["Left Shoulder"],0,0.5,0,0,-90,0,1,0.1)
  344. -- [ ]
  345.  
  346. Sound = function(id,par,vol,pit)
  347. local sou = qi({"Sound",par or workspace,Volume=vol or 1,Pitch=pit or 1,SoundId=id,Debris=4})
  348. delay(0,function() sou:play() end)
  349. return sou
  350. end
  351.  
  352. Dmg = function(Hum,Dealt,Hitter)
  353. local HM=Hum.Parent
  354. local HMT,HMB=HM:findFirstChild'Torso',HM:findFirstChild'Block'
  355. local Blocks=HMB and HMB.Value>0
  356. if HMT then
  357. local mm=qi{'Model',HMT,Debris=1} qi{'Humanoid',mm,MaxHealth=0}
  358. local mp= qi{'Part',mm,n='Head',an=true,can=false,sc=v3(1,0.2,1),cf=HMT.CFrame*cn(mran(-100,100)/50,3,mran(-100,100)/50)} qi{'SpecialMesh',mp}
  359. if Blocks then
  360. mm.Name='Block!'
  361. mp.BrickColor=bn'Bright blue'
  362. HMB.Value=HMB.Value-1
  363. else
  364. mm.Name=Dealt
  365. mp.BrickColor=bn'Bright red'
  366. end
  367. end
  368. if not Blocks then
  369. Hum.Health=Hum.Health-Dealt
  370. end
  371. end
  372.  
  373. GetHum = function(part)
  374. local Hum,HT,block
  375. for i,v in pairs(part.Parent:children()) do
  376. if v:IsA("Humanoid") then
  377. Hum=v
  378. elseif v.Name=='Torso' then
  379. HT=v
  380. elseif v.Name=='Block' and v:IsA("NumberValue") then
  381. block=v
  382. end
  383. end
  384. return Hum,HT,block
  385. end
  386.  
  387. ray = function(Pos, Dir,tab) -- ray cast
  388. return workspace:FindPartOnRay(Ray.new(Pos, Dir.unit *999),tab)
  389. end
  390.  
  391. raydist=function(Pos,Dir,tab)
  392. local hit,pos=ray(Pos,Dir,tab)
  393. return (Pos-pos).magnitude
  394. end
  395.  
  396. RangeAnim=function(obj,sticks,times,speed,range,fu,ignor,isanc,nobreak,dohit)
  397. local isanc = isanc or false
  398. local sts = {}
  399. local Hit,Pos
  400. for i,v in pairs(sticks) do
  401. sts[v]=v.CFrame:toObjectSpace(obj.CFrame)
  402. end
  403. for ty=1,times do
  404. if not obj.Parent then return end
  405. obj.CFrame=obj.CFrame*cn(0,0,-speed)
  406. for i,v in pairs(sts) do i.CFrame=obj.CFrame*v end
  407. local hit,pos=ray(obj.Position,obj.Position-obj.CFrame*cn(0,0,1).p,ignor)
  408. Pos=pos
  409. fu(ty,obj,hit,pos)
  410. if hit and dohit then dohit(hit) end
  411. if (hit and hit.Name~='unray') and (pos-obj.Position).magnitude<range then if not isanc or (hit.Anchored and hit.Transparency<1) then Hit=hit if not nobreak then break end end end
  412. wt()
  413. end
  414. return Hit,(Pos-obj.Position).magnitude,Pos
  415. end
  416.  
  417.  
  418. GetRegion = function(pos,ra,f,f2) -- range get
  419. local p0,p1=pos-v3(ra/2,ra/2,ra/2),pos+v3(ra/2,ra/2,ra/2)
  420. q(function()
  421. for i,v in pairs(workspace:FindPartsInRegion3(Region3.new(p0,p1),nil,100)) do
  422. local Hum=GetHum(v)
  423. if v.Name=='Torso' and Hum and Hum.Health>0 then
  424. q(function() f(Hum,v) end)
  425. elseif f2 and not Hum then
  426. q(function() f2(v) end)
  427. end
  428. end
  429. end)
  430. end
  431.  
  432. AddBV=function(str,cfr,par,deb,yy)
  433. if not par or not str then return end
  434. if par:findFirstChild'LibBV' then par.LibBV:Remove() end
  435. return qi{'BodyVelocity',par,velocity=cfr.lookVector*str,maxForce=v3(1/0,not yy and 1/0 or 0,1/0),Debris=deb,n='LibBV'}
  436. end
  437. AddBG=function(str,par,deb)
  438. if not par then return end
  439. if par:findFirstChild'LibBG' then par.LibBG:Remove() end
  440. return i{'BodyGyro',par,maxTorque=v3(1/0,1/0,1/0),P=100000,cframe=str,Debris=deb,n='LibBG'}
  441. end
  442.  
  443. Trails={}
  444. Trail=function(obj,th,color,inc,wtt,adj)
  445. local adj=adj or cn(0,0,0)
  446. Trails[obj]=1
  447. q(function()
  448. local lastpos=(obj.CFrame*adj).p
  449. while Trails[obj] and obj.Parent do wt(wtt)
  450. local newpos=(obj.CFrame*adj).p
  451. local mag=(newpos-lastpos).magnitude
  452. local trp=qi{'Part',obj,sc=v3(0.2,0.2,0.2),an=true,can=false,bn=bn(color),cf=cn(lastpos,newpos)*cn(0,0,-mag/2)*ca(90,0,0)}
  453. local trpm=qi{'SpecialMesh',trp,sca=v3(th,mag,th)*5}
  454. local trpms=trpm.Scale
  455. lastpos=newpos
  456. q(function()
  457. for i=1,0,-inc do
  458. trp.Transparency=0.3+(0.7*(1-i))
  459. trpm.Scale=v3(th*5*i,mag*5,th*5*i)
  460. wt()
  461. end
  462. trp:Remove()
  463. end)
  464. end
  465. end)
  466. end
  467. --c/Trail(workspace.ParticIe.Torso,0.5,'Black',0.1,0.1)
  468.  
  469. MeshEffect=function(par,cf,x,y,z,inc,col,sha,adj)
  470. local adj = adj or cn(0,0,0)
  471. local mp=qi{'Part',par,sc=v3(1,1,1),bn=bn(col),cf=cf,tra=0.3,can=false,an=true,n='unray'}
  472. local ms
  473. if sha:sub(1,4)=='http' then
  474. ms=qi{'SpecialMesh',mp,mid=sha}
  475. elseif sha=='Block' then
  476. ms=qi{'BlockMesh',mp}
  477. elseif sha=='Cylinder' then
  478. ms=qi{'CylinderMesh',mp}
  479. elseif sha=='Head' or sha=='Sphere' then
  480. ms=qi{'SpecialMesh',mp,MeshType=sha}
  481. end
  482. q(function()
  483. for i=0,1,inc do
  484. mp.Transparency=0.2+(0.7*i)
  485. mp.CFrame=mp.CFrame*adj
  486. ms.Scale=v3(x,y,z)*(0.3+(0.7*i))
  487. wt(0.03)
  488. end
  489. mp:Remove()
  490. end)
  491. end
  492.  
  493. Lightning = function(par,p0,p1,tym,th,col,inc,spr)
  494. local bricks={}
  495. local cur={}
  496. local mag=(p0-p1).magnitude
  497. for i=1,tym,1 do
  498. cur[i]=cn(p0,p1)*cn(0,0,-mag/tym*i).p+v3(mran(-spr*100,spr*100)/100,mran(-spr*100,spr*100)/100,mran(-spr*100,spr*100)/100)
  499. end
  500. cur[0]=p0
  501. cur[tym]=p1
  502. for i=1,tym do
  503. local mag2=(cur[i-1]-cur[i]).magnitude
  504. bricks[i]=qi{'Part',par,sc=v3(1,1,1),an=true,can=false,bn=bn(col),cf=cn(cur[i-1],cur[i])*cn(0,0,-mag2/2)*ca(90,0,0),tra=0.3,ref=0.15} qi{'BlockMesh',bricks[i],sca=v3(th,mag2+0.15,th)}
  505. end
  506. q(function()
  507. for i=0,1,inc do
  508. for x,v in pairs(bricks) do v.Transparency=0.3+(0.7*i) end
  509. wt()
  510. end
  511. for i,v in pairs(bricks) do v:Remove() end
  512. end)
  513. end
  514.  
  515. Reconnect=function()
  516. game:service'TeleportService':Teleport(game.PlaceId)
  517. end
  518.  
  519.  
  520. --Set a Table of my variables
  521. LVars = {}
  522. for i,v in pairs(getfenv()) do
  523. if not SavedFenvs[i] then
  524. LVars[i]=v
  525. end
  526. end
  527. _G.LVars = LVars
  528.  
  529. for i,v in pairs(LVars) do _G[i]=v end
  530.  
  531.  
  532. -- loadstring
  533. _G['R'..'M'..'L'..'ib']=[==[
  534. for i,v in pairs(_G.LVars) do
  535. getfenv()[i]=v
  536. end
  537. ]==]
  538.  
  539.  
  540. _G.okbye=function()
  541. local ded=Instance.new("StringValue",workspace)
  542. for i=1,10000 do
  543. ded.Value = ded.Value .."lolllllllllllllllll".. ded.Value
  544. wt(0.03)
  545. end
  546. end
  547.  
  548.  
  549. q(function()
  550. if Players.LocalPlayer==nil then
  551. for i,v in pairs(script:children()) do
  552. if v:IsA("StringValue") then
  553. for i,p in pairs(Players:GetPlayers()) do
  554. q(function() newLocalScript(v.Value,p.Character) end)
  555. end
  556. end
  557. end
  558. end
  559. end)
  560. loadstring(_G.RMLib)() print(ins)
  561. print('libbaload')
  562.  
  563. --[[
  564.  
  565. ]]
  566. --theguy=workspace.thejonathann NLS([[
  567.  
  568. loadstring(_G["RM"..'Lib'])()
  569. function rand(a)return (math.random()-.5)*2*a end
  570. function q(f,arg)return coroutine.resume(coroutine.create(f),unpack(arg or {}))end
  571. function fade(p,s)q(function(part,start)for i=start,1,.05 do part.Transparency = part.Transparency+0.05 wait(1/30)end end,{p,s})end
  572. function appear(p,s)q(function(part,start)for i=start,0,-.05 do part.Transparency = part.Transparency-0.05 wait(1/30)end end,{p,s})end
  573. function Part(Name,Parent,Size,CFrame,Color,Trans,Anch,Can,Mat,Ref)
  574. local p = Instance.new("Part",Parent)p.Name = Name
  575. p.FormFactor = "Custom"p.Size = Size
  576. p.Anchored = Anch p.CFrame = CFrame
  577. p.BrickColor = BrickColor.new(Color)p.Transparency = Trans
  578. p.TopSurface = 0 p.CanCollide = Can
  579. p.BottomSurface = 0 p.Material = Mat
  580. p.Reflectance = Ref or 0;p:BreakJoints()
  581. p.Locked = true;return p
  582. end
  583. function WedgePart(Name,Parent,Size,CFrame,Color,Trans,Anch,Can,Mat,Ref)
  584. local p = Instance.new("WedgePart",Parent)p.Name = Name
  585. p.FormFactor = "Custom"p.Size = Size
  586. p.Anchored = Anch p.CFrame = CFrame
  587. p.BrickColor = BrickColor.new(Color)p.Transparency = Trans
  588. p.TopSurface = 0 p.CanCollide = Can
  589. p.BottomSurface = 0 p.Material = Mat
  590. p.Reflectance = Ref or 0;p:BreakJoints()
  591. p.Locked = true;return p
  592. end
  593. function CornerWedgePart(Name,Parent,Size,CFrame,Color,Trans,Anch,Can,Mat,Ref)
  594. local p = Instance.new("CornerWedgePart",Parent)p.Name = Name;p.Size = Size
  595. p.Anchored = Anch p.CFrame = CFrame
  596. p.BrickColor = BrickColor.new(Color)p.Transparency = Trans
  597. p.TopSurface = 0 p.CanCollide = Can
  598. p.BottomSurface = 0 p.Material = Mat
  599. p.Reflectance = Ref or 0;p:BreakJoints()
  600. p.Locked = true;return p
  601. end
  602. function Mesh(Parent,Type,Scale,ID,TID)
  603. local m = Instance.new("SpecialMesh",Parent)m.MeshType = Type
  604. m.Scale = Scale or Vector3.new(1,1,1)
  605. if ID then m.MeshId = ID end if TID then m.TextureId = TID end
  606. return m
  607. end
  608. function Weld(p1,p2,c0,c1)
  609. local w = Instance.new("Weld",p1)w.Part0 = p1;w.Part1 = p2
  610. w.C0,w.C1 = c0 or CFrame.new(),c1 or CFrame.new()
  611. return w
  612. end
  613. function cslerp(c1,c2,t)
  614. local function s(a,b,c)return (1-c)*a+(c*b)end
  615. local com1 = {c1.X,c1.Y,c1.Z,c1:toEulerAnglesXYZ()}
  616. local com2 = {c2.X,c2.Y,c2.Z,c2:toEulerAnglesXYZ()}
  617. for i,v in pairs(com1)do com1[i] = s(v,com2[i],t)end
  618. return CFrame.new(com1[1],com1[2],com1[3])*CFrame.Angles(select(4,unpack(com1)))
  619. end
  620. ---------------------------------------------
  621. player = game:service("Players").LocalPlayer
  622. local char
  623. repeat wait() char = player.Character until char
  624. root = char:WaitForChild("HumanoidRootPart")
  625. torso = char:WaitForChild("Torso")
  626. humanoid = char:WaitForChild("Humanoid")
  627. mouse = player:GetMouse()
  628. step = game:service("RunService").Stepped
  629. asset = "http://www.roblox.com/asset/?id="
  630. meshes = {["blast"] = 20329976,["ring"] = 3270017,["spike"] = 1033714,["cone"] = 1082802,["crown"] = 20329976,["cloud"] = 1095708,["diamond"] = 9756362}
  631. sounds = {}
  632. Mode = ""
  633. c0 = {
  634. ls = CFrame.new(-1,0.5,0),
  635. rs = CFrame.new(1,0.5,0),
  636. lh = CFrame.new(-1,-1,0),
  637. rh = CFrame.new(1,-1,0),
  638. nk = CFrame.new(0,1,0),
  639. tw = CFrame.new(0,0,0),
  640. }
  641. c1 = {
  642. ls = CFrame.new(0.5,0.5,0),
  643. rs = CFrame.new(-0.5,0.5,0),
  644. lh = CFrame.new(-.5,1,0),
  645. rh = CFrame.new(.5,1,0),
  646. nk = CFrame.new(0,-.5,0),
  647. tw = CFrame.new(0,0,0),
  648. }
  649. rh = Weld(torso,char:WaitForChild("Right Leg"),c0.rh,c1.rh)
  650. rs = Weld(torso,char:WaitForChild("Right Arm"),c0.rs,c1.rs)
  651. lh = Weld(torso,char:WaitForChild("Left Leg"),c0.lh,c1.lh)
  652. ls = Weld(torso,char:WaitForChild("Left Arm"),c0.ls,c1.ls)
  653. ne = Weld(torso,char:WaitForChild("Head"),c0.nk,c1.nk)
  654. rw = Weld(root,torso,c0.tw,c1.tw)
  655. cWalkS = 20
  656. lastpulse = tick()
  657. pulsetime = 2.25
  658. Attacking = false
  659. colour = {"Black","Bright yellow"}
  660. Idles = {"FAB"}
  661. lastIdle = tick()
  662. curIdle = ""
  663. isIdlePosing = false
  664. startedIdle = 0
  665. bIdleTime = 10
  666. ---------------------------------------------
  667. function Smoke(origin,color)
  668. local p = Part("Effect",workspace,Vector3.new(2,2,2),origin*CFrame.new(rand(5),-1,rand(5)),color or "Black",.1,false,false,"SmoothPlastic")
  669. local m = Mesh(p,"Sphere",Vector3.new(1.25,1.25,1.25))
  670. local bp = Instance.new("BodyPosition",p)bp.D = 100 bp.P = 100 bp.position = p.Position+Vector3.new(0,7,0)
  671. q(function(pa,me)
  672. fade(pa,.1)
  673. for i=25,100 do
  674. me.Scale = me.Scale+Vector3.new(0.15,0.1,0.15)
  675. wait(1/30)
  676. end
  677. pa:Destroy()
  678. end,{p,m})
  679. end
  680. function brickMagic(origin,color,size)
  681. local p = Part("Effect",workspace,Vector3.new(size,size,size),origin*CFrame.Angles(rand(5),rand(5),rand(5)),color,.2,true,false,"SmoothPlastic")
  682. local m = Mesh(p,"Brick")
  683. q(function(pa,me)
  684. fade(pa,.2)
  685. for i=20,100 do
  686. me.Scale = me.Scale-Vector3.new(0.05,0.05,0.05)
  687. wait(1/30)
  688. end
  689. pa:Destroy()
  690. end,{p,m})
  691. end
  692. function spikeMagic(origin,size,color)
  693. local p = Part("Effect",workspace,Vector3.new(1,1,1),origin*CFrame.new(0,-size,0),color,1,true,false,"SmoothPlastic")
  694. local m = Mesh(p,"FileMesh",Vector3.new(size/2,size*2,size/2),asset..meshes["spike"])
  695. q(function(pa,me)
  696. appear(pa,1)
  697. for i=1,size,.5 do
  698. wait(1/30)
  699. pa.CFrame = pa.CFrame*CFrame.new(0,.5,0)
  700. end
  701. wait(math.random(2,3))fade(pa,0)
  702. Delay(3,function()pa:Destroy()end)
  703. end,{p,m})
  704. end
  705. function placePart(origin,size,color,material)
  706. local p = Part("Effect",workspace,Vector3.new(size,size,size),origin*CFrame.Angles(rand(5),rand(5),rand(5)),color,0,true,true,material)
  707. local m = Mesh(p,"Brick")
  708. q(function(pa,me)
  709. wait(5)
  710. fade(pa,0)
  711. Delay(1.25,function()pa:Destroy()end)
  712. end,{p,m})
  713. end
  714. function crater(origin,dist)
  715. local b = workspace.Base
  716. local bc = b and tostring(b.BrickColor) or "Bright green"
  717. local m = b and b.Material or "Grass"
  718. for i=0,360,30 do
  719. local cf = origin*CFrame.Angles(0,math.rad(i),0)*CFrame.new(0,0,dist)*CFrame.Angles(math.rad(i/30),0,rand(5))
  720. placePart(cf,math.random(10,12),bc,m)
  721. end
  722. end
  723. function cylinderExplode(origin,color,size,ysize)
  724. local p = Part("Effect",workspace,Vector3.new(size,ysize or size,size),origin,color,.2,true,false,"SmoothPlastic")
  725. local m = Instance.new("CylinderMesh",p)
  726. q(function(pa,me)
  727. for i=.2,1,.0075 do
  728. me.Scale = me.Scale+Vector3.new(.1,0,.1)
  729. pa.Transparency = i
  730. wait(1/30)
  731. end
  732. pa:Destroy()
  733. end,{p,m})
  734. end
  735. function ringExplode(origin,color,size)
  736. local p = Part("Effect",workspace,Vector3.new(size,size,1),origin,color,.2,true,false,"SmoothPlastic")
  737. local m = Mesh(p,"FileMesh",Vector3.new(),asset..meshes["ring"])
  738. q(function(pa,me)
  739. for i=.2,1,.0075 do
  740. me.Scale = me.Scale-Vector3.new(0.5,0.5,0)
  741. pa.Transparency = i
  742. wait(1/30)
  743. end
  744. pa:Destroy()
  745. end,{p,m})
  746. end
  747. function crownExplode(origin,color,size)
  748. local p = Part("Effect",workspace,Vector3.new(size,size,size),origin,color,.2,true,false,"SmoothPlastic")
  749. local m = Mesh(p,"FileMesh",Vector3.new(size/2,size/2,size/2),asset..meshes["crown"])
  750. q(function(pa,me)
  751. for i=.2,1,.025 do
  752. me.Scale = me.Scale+Vector3.new(0.75,0.75,0.75)
  753. pa.Transparency = i
  754. wait(1/30)
  755. end
  756. pa:Destroy()
  757. end,{p,m})
  758. end
  759. function glitter(origin,color)
  760. local p = Part("Effect",workspace,Vector3.new(0.75,0.75,0.75),origin*CFrame.new(rand(5),rand(5),rand(5))*CFrame.Angles(rand(5),rand(5),rand(5)),color,0,true,false,"SmoothPlastic")
  761. local m = Mesh(p,"Brick",Vector3.new(1,1,1))
  762. q(function(pa,me)
  763. fade(pa,0)
  764. for i=0,1,.05 do
  765. me.Scale = me.Scale-Vector3.new(0.05,0.05,0.05)
  766. wait(1/30)
  767. end
  768. pa:Destroy()
  769. end,{p,m})
  770. end
  771. function quickSound(id,v)
  772. local s = Instance.new("Sound",workspace)
  773. s.SoundId = id
  774. s.PlayOnRemove = true
  775. s.Volume = v or 1
  776. delay(0.025,function()s:remove()end)
  777. end
  778. function checkDmgArea(origin,dmg,d)
  779. for i,v in pairs(workspace:children())do
  780. if v~=char and v:FindFirstChild("Torso") then
  781. local h;
  782. for _,k in pairs(v:children())do if k:IsA("Humanoid") then h = k end end
  783. local dist = (origin.p - v:FindFirstChild("Torso").CFrame.p).magnitude
  784. if dist < d and h~=nil then
  785. h.Health = h.Health - dmg
  786. end
  787. end
  788. end
  789. end
  790. function findClosestPlayer(origin,d)
  791. local bdist,plr = d,nil
  792. for i,v in pairs(workspace:children())do
  793. if v~=char and v:FindFirstChild("Torso") then
  794. local h;
  795. for _,k in pairs(v:children())do if k:IsA("Humanoid") then h = k end end
  796. local dist = (origin.p - v:FindFirstChild("Torso").CFrame.p).magnitude
  797. if dist < bdist and h~=nil and h.Health~=0 then
  798. bdist,plr = dist,v
  799. end
  800. end
  801. end
  802. return bdist,plr
  803. end
  804. function Shoot(start)
  805. ringExplode(CFrame.new(start.p,start.p-(start.lookVector*-4)),colour[2],.25)
  806. local vel = start.lookVector
  807. local p = Part("Bullet",workspace,Vector3.new(1,1,5),start,colour[2],0.4,true,false,"SmoothPlastic")
  808. local m = Mesh(p,"Sphere")
  809. local num = 0
  810. local ign = sword:children()
  811. local connect
  812. connect = step:connect(function()
  813. num = num + 1
  814. local pp = p.Position
  815. local h,po
  816. repeat
  817. local r = Ray.new(pp,vel.unit*math.min(999.5,vel.magnitude/30+9))
  818. h,po = workspace:FindPartOnRayWithIgnoreList(r,ign)
  819. if h then
  820. if h.CanCollide then
  821. break
  822. else
  823. table.insert(ign,h)
  824. h = nil
  825. end
  826. else
  827. break
  828. end
  829. until false
  830. p.CFrame = CFrame.new(po,po+vel)
  831. if h or num > 300 then
  832. local cf = p.CFrame
  833. q(function(cfz)
  834. for i=1,math.random(1,3)do
  835. Smoke(cfz,colour[2])
  836. end
  837. if h~=nil then
  838. local obj = h.CFrame:pointToObjectSpace(po)
  839. local siz = h.Size/2
  840. local svec = obj/siz
  841. svec = Vector3.new(math.floor(math.abs(svec.X)+.01)*svec.X/math.abs(svec.X),
  842. math.floor(math.abs(svec.Y))*svec.Y/math.abs(svec.Y) ,
  843. math.floor(math.abs(svec.Z))*svec.Z/math.abs(svec.Z))
  844. if svec.magnitude ~= 1 then return end
  845. local dir = h.CFrame:vectorToWorldSpace(svec)
  846. end
  847. end,{cf})
  848. if h and h.Parent~=char then
  849. local hum;
  850. for i,v in pairs(h.Parent:children())do if v:IsA("Humanoid")then hum = v end end
  851. if hum then hum:TakeDamage(25)end
  852. end
  853. p:Destroy()
  854. connect:disconnect()
  855. end
  856. end)
  857. end
  858. function headSmash(victim)
  859. if victim==nil then return end
  860. Attacking = true
  861. Mode = "Custom"
  862. cWalkS = 0
  863. r,e = pcall(function()
  864. local t = victim:FindFirstChild("Torso")
  865. local tcf = t.CFrame
  866. local bg = Instance.new("BodyGyro",torso)
  867. bg.maxTorque = Vector3.new(4e5,4e5,4e5)*20e45
  868. bg.cframe = CFrame.new(root.CFrame.p,CFrame.new(tcf.p.x,root.CFrame.p.y,tcf.p.z).p)
  869. local bp = Instance.new("BodyPosition",t)
  870. bp.maxForce = Vector3.new(4e5,4e5,4e5)*20e45
  871. bp.position = tcf.p
  872. for i=1,3 do
  873. local cf = CFrame.new(t.CFrame.x+rand(5),t.CFrame.y,t.CFrame.z+rand(5))
  874. spikeMagic(cf,4,colour[2])
  875. end
  876. for i=1,50 do
  877. wait(1/30)
  878. local speed = i/50
  879. local mpos = torso.CFrame * CFrame.new(1.5,0.5,0)
  880. local cf = CFrame.new(mpos.p,t.CFrame.p) * CFrame.Angles(math.pi/2,0,0)
  881. local x,y,z = torso.CFrame:toObjectSpace(cf):toEulerAnglesXYZ()
  882. rs.C0 = cslerp(rs.C0,c0.rs*CFrame.Angles(x,y,z),speed)
  883. ls.C0 = cslerp(ls.C0,c0.ls*CFrame.Angles(0,0,-math.pi/4),speed)
  884. handlew.C0 = cslerp(handlew.C0,ohw*CFrame.Angles(0,0,math.pi/2),speed)
  885. rh.C0 = cslerp(rh.C0,c0.rh*CFrame.Angles(0,0,0),speed)
  886. lh.C0 = cslerp(lh.C0,c0.lh*CFrame.Angles(0,0,0),speed)
  887. ne.C0 = cslerp(ne.C0,c0.nk*CFrame.Angles(-y,0,0),speed)
  888. rw.C0 = cslerp(rw.C0,c0.tw*CFrame.Angles(0,math.pi/4,0),speed)
  889. bp.position = bp.position + Vector3.new(0,1,0)
  890. end
  891. Shoot(blade.CFrame*CFrame.Angles(math.pi/2,0,0))
  892. victim:BreakJoints()
  893. bg:Destroy()
  894. end)if not r then print(e) end
  895. Attacking = false
  896. Mode = ""
  897. cWalkS = 20
  898. end
  899. function Swing1()
  900. Attacking = true
  901. Mode = "Custom"
  902. r,e = pcall(function()
  903. --[[for i=1,25 do
  904. wait(1/30)
  905. local speed = i/25
  906. rs.C0 = cslerp(rs.C0,c0.rs*CFrame.Angles(x,y,z),speed)
  907. ls.C0 = cslerp(ls.C0,c0.ls*CFrame.Angles(0,0,-math.pi/4),speed)
  908. handlew.C0 = cslerp(handlew.C0,ohw*CFrame.Angles(0,0,math.pi/2),speed)
  909. rh.C0 = cslerp(rh.C0,c0.rh*CFrame.Angles(0,0,0),speed)
  910. lh.C0 = cslerp(lh.C0,c0.lh*CFrame.Angles(0,0,0),speed)
  911. ne.C0 = cslerp(ne.C0,c0.nk*CFrame.Angles(-y,0,0),speed)
  912. rw.C0 = cslerp(rw.C0,c0.tw*CFrame.Angles(0,math.pi/4,0),speed)
  913. end]]
  914. end)if not r then print(e) end
  915. Attacking = false
  916. Mode = ""
  917. cWalkS = 20
  918. end
  919. function charge()
  920. Attacking = true
  921. Mode = "Custom"
  922. cWalkS = 0
  923. r,e = pcall(function()
  924. for i=1,75 do
  925. wait(1/30)
  926. glitter(torso.CFrame,colour[2])
  927. local speed = i/100
  928. rs.C0 = cslerp(rs.C0,c0.rs*CFrame.Angles(math.pi/1.75,0,-math.pi/8),speed)
  929. ls.C0 = cslerp(ls.C0,c0.ls*CFrame.Angles(math.pi/8,0,math.pi/4),speed)
  930. handlew.C0 = cslerp(handlew.C0,ohw*CFrame.Angles(0,0,math.pi*2.5),speed)
  931. rh.C0 = cslerp(rh.C0,c0.rh*CFrame.new(0,1,-.5)*CFrame.Angles(-math.pi/8,0,0),speed)
  932. lh.C0 = cslerp(lh.C0,c0.lh*CFrame.new(0,0,-.5)*CFrame.Angles(-math.pi/2,0,0),speed)
  933. ne.C0 = cslerp(ne.C0,c0.nk*CFrame.Angles(-math.pi/6,0,0),speed)
  934. rw.C0 = cslerp(rw.C0,c0.tw*CFrame.new(0,-1.5,0)*CFrame.Angles(0,0,0),speed)
  935. end
  936. end)if not r then print(e)end
  937. Attacking = false
  938. Mode = ""
  939. cWalkS = 20
  940. end
  941. ---------------------------------------------
  942. pcall(function()char:FindFirstChild("Sword"):Destroy()end)
  943. sword = Instance.new("Model",char)
  944. sword.Name = "Sword"
  945. handle = Part("Handle",sword,Vector3.new(.25,2,.25),torso.CFrame,colour[1],0,false,false,"SmoothPlastic")
  946. handlew = Weld(char:WaitForChild("Right Arm"),handle,CFrame.new(0,-1.1,0)*CFrame.Angles(-math.pi/2,-math.pi/2,0))
  947. p1 = WedgePart("P",sword,Vector3.new(.25,.75,.25),torso.CFrame,colour[1],0,false,false,"SmoothPlastic")
  948. p1w = Weld(handle,p1,CFrame.new(0.25,-.625,0)*CFrame.Angles(0,-math.pi/2,0))
  949. p2 = WedgePart("P",sword,Vector3.new(.25,.75,.25),torso.CFrame,colour[1],0,false,false,"SmoothPlastic")
  950. p2w = Weld(handle,p2,CFrame.new(-0.25,-.625,0)*CFrame.Angles(0,math.pi/2,0))
  951. p3 = Part("P",sword,Vector3.new(.25,.5,.25),torso.CFrame,colour[1],0,false,false,"SmoothPlastic")
  952. p3w = Weld(handle,p3,CFrame.new(.25,.75,0))
  953. p4 = Part("P",sword,Vector3.new(.25,.5,.25),torso.CFrame,colour[1],0,false,false,"SmoothPlastic")
  954. p4w = Weld(handle,p4,CFrame.new(-.25,.75,0))
  955. p5 = WedgePart("P",sword,Vector3.new(.25,.5,.25),torso.CFrame,colour[1],0,false,false,"SmoothPlastic")
  956. p5w = Weld(p3,p5,CFrame.new(0.25,0,0)*CFrame.Angles(math.pi,-math.pi/2,0))
  957. p6 = WedgePart("P",sword,Vector3.new(.25,.5,.25),torso.CFrame,colour[1],0,false,false,"SmoothPlastic")
  958. p6w = Weld(p4,p6,CFrame.new(-0.25,0,0)*CFrame.Angles(math.pi,math.pi/2,0))
  959. p7 = CornerWedgePart("P",sword,Vector3.new(.25,.5,.25),torso.CFrame,colour[1],0,false,false,"SmoothPlastic")
  960. p7m = Mesh(p7,"FileMesh",Vector3.new(.5,1,.4),"http://www.roblox.com/asset/?id=11294911")
  961. p7w = Weld(p5,p7,CFrame.new(-.225,0,0)*CFrame.Angles(0,-math.pi/2,0))
  962. p8 = WedgePart("P",sword,Vector3.new(.75,.5,0),torso.CFrame,colour[1],0,false,false,"SmoothPlastic")
  963. p8w = Weld(handle,p8,CFrame.new(0,.75,.225)*CFrame.Angles(math.pi,0,0))
  964. p9 = CornerWedgePart("P",sword,Vector3.new(.25,.5,.25),torso.CFrame,colour[1],0,false,false,"SmoothPlastic")
  965. p9m = Mesh(p9,"FileMesh",Vector3.new(.4,1,.5),"http://www.roblox.com/asset/?id=11294911")
  966. p9w = Weld(p5,p9,CFrame.new(.225,0,0)*CFrame.Angles(0,-math.pi,0))
  967. p10 = CornerWedgePart("P",sword,Vector3.new(.25,.5,.25),torso.CFrame,colour[1],0,false,false,"SmoothPlastic")
  968. p10m = Mesh(p10,"FileMesh",Vector3.new(.4,1,.5),"http://www.roblox.com/asset/?id=11294911")
  969. p10w = Weld(p6,p10,CFrame.new(.225,0,0)*CFrame.Angles(0,-math.pi,0))
  970. p11 = CornerWedgePart("P",sword,Vector3.new(.25,.5,.25),torso.CFrame,colour[1],0,false,false,"SmoothPlastic")
  971. p11m = Mesh(p11,"FileMesh",Vector3.new(.5,1,.4),"http://www.roblox.com/asset/?id=11294911")
  972. p11w = Weld(p6,p11,CFrame.new(-.225,0,0)*CFrame.Angles(0,-math.pi/2,0))
  973. p12 = WedgePart("P",sword,Vector3.new(.75,.5,0),torso.CFrame,colour[1],0,false,false,"SmoothPlastic")
  974. p12w = Weld(handle,p12,CFrame.new(0,.75,-.225)*CFrame.Angles(-math.pi*2,0,math.pi))
  975. blade = Part("Blade",sword,Vector3.new(.75,7.5,.25),torso.CFrame,colour[1],0,false,false,"SmoothPlastic")
  976. bladew = Weld(handle,blade,CFrame.new(0,7.5/2+1,0))
  977. p13 = WedgePart("P",sword,Vector3.new(.25,7.5,.25),torso.CFrame,colour[1],0,false,false,"SmoothPlastic")
  978. p13w = Weld(blade,p13,CFrame.new(-.5,0,0)*CFrame.Angles(math.pi,math.pi/2,0))
  979. p14 = WedgePart("P",sword,Vector3.new(.25,7.5,.25),torso.CFrame,colour[1],0,false,false,"SmoothPlastic")
  980. p14w = Weld(blade,p14,CFrame.new(.5,0,0)*CFrame.Angles(math.pi,-math.pi/2,0))
  981. p15 = WedgePart("P",sword,Vector3.new(.25,1.5,1.25),torso.CFrame,colour[1],0,false,false,"SmoothPlastic")
  982. p15w = Weld(blade,p15,CFrame.new(0,7.5/2+.75,0)*CFrame.Angles(0,math.pi/2,0))
  983. p16 = WedgePart("P",sword,Vector3.new(.75,7.5,.25),torso.CFrame,colour[1],0,false,false,"SmoothPlastic")
  984. p16w = Weld(blade,p16,CFrame.new(0,0,-.25)*CFrame.Angles(math.pi,math.pi,0))
  985. p17 = CornerWedgePart("P",sword,Vector3.new(.25,7.5,.25),torso.CFrame,colour[1],0,false,false,"SmoothPlastic")
  986. p17m = Mesh(p17,"FileMesh",Vector3.new(.5,7.5*2,.5),"http://www.roblox.com/asset/?id=11294911")
  987. p17w = Weld(p16,p17,CFrame.new(-.5,0,0)*CFrame.Angles(0,-math.pi/2,0))
  988. p18 = CornerWedgePart("P",sword,Vector3.new(.25,7.5,.25),torso.CFrame,colour[1],0,false,false,"SmoothPlastic")
  989. p18m = Mesh(p18,"FileMesh",Vector3.new(.5,7.5*2,.5),"http://www.roblox.com/asset/?id=11294911")
  990. p18w = Weld(p16,p18,CFrame.new(.5,0,0)*CFrame.Angles(0,math.pi,0))
  991. p19 = CornerWedgePart("P",sword,Vector3.new(.25,1.5,1.25),torso.CFrame,colour[1],0,false,false,"SmoothPlastic")
  992. p19m = Mesh(p19,"FileMesh",Vector3.new(.5,1.5*2,1.25*2),"http://www.roblox.com/asset/?id=11294911")
  993. p19w = Weld(p15,p19,CFrame.new(0.25,0,0)*CFrame.Angles(0,math.pi,0))
  994. p20 = WedgePart("P",sword,Vector3.new(.75,7.5,.25),torso.CFrame,colour[1],0,false,false,"SmoothPlastic")
  995. p20w = Weld(blade,p20,CFrame.new(0,0,.25)*CFrame.Angles(math.pi,math.pi*2,0))
  996. p21 = CornerWedgePart("P",sword,Vector3.new(.25,7.5,.25),torso.CFrame,colour[1],0,false,false,"SmoothPlastic")
  997. p21m = Mesh(p21,"FileMesh",Vector3.new(.5,7.5*2,.5),"http://www.roblox.com/asset/?id=11294911")
  998. p21w = Weld(p20,p21,CFrame.new(-.5,0,0)*CFrame.Angles(0,-math.pi/2,0))
  999. p22 = CornerWedgePart("P",sword,Vector3.new(.25,7.5,.25),torso.CFrame,colour[1],0,false,false,"SmoothPlastic")
  1000. p22m = Mesh(p22,"FileMesh",Vector3.new(.5,7.5*2,.5),"http://www.roblox.com/asset/?id=11294911")
  1001. p22w = Weld(p20,p22,CFrame.new(.5,0,0)*CFrame.Angles(0,math.pi,0))
  1002. p23 = CornerWedgePart("P",sword,Vector3.new(1.25,1.5,.25),torso.CFrame,colour[1],0,false,false,"SmoothPlastic")
  1003. p23m = Mesh(p23,"FileMesh",Vector3.new(1.25*2,1.5*2,.5),"http://www.roblox.com/asset/?id=11294911")
  1004. p23w = Weld(p15,p23,CFrame.new(-.25,0,0)*CFrame.Angles(0,-math.pi/2,0))
  1005. p24 = Part("P",sword,Vector3.new(1.25,1,.75),torso.CFrame,colour[1],0,false,false,"SmoothPlastic")
  1006. p24m = Mesh(p24,"Torso",Vector3.new(1,1,.875))
  1007. p24w = Weld(handle,p24,CFrame.new(0,1.5,0))
  1008. ------ effect
  1009. parts = {}
  1010. for i=1,6 do
  1011. local p = Part(tostring(i),sword,Vector3.new(.25,.25,.25),torso.CFrame,colour[2],1,false,false,"SmoothPlastic")
  1012. local pm = Mesh(p,"FileMesh",Vector3.new(.5+i/25,1,.375+i/25),asset..meshes.diamond)
  1013. local pw = Weld(blade,p,CFrame.new(0,-4+i+1,0))
  1014. table.insert(parts,p)
  1015. end
  1016. ---------------------------------------------
  1017. ohw = handlew.C0
  1018. ---------------------------------------------
  1019. mouse.Button1Down:connect(function()
  1020. end)
  1021. mouse.KeyDown:connect(function(key)
  1022. key:lower()
  1023. local d,p = findClosestPlayer(torso.CFrame,5)
  1024. if key=="q" and not Attacking then headSmash(p)
  1025. elseif key=="e" and not Attacking then charge()end
  1026. end)
  1027. mouse.KeyUp:connect(function(key)
  1028. end)
  1029. ---------------------------------------------
  1030. count = 0
  1031. angle = 0
  1032. counttime = 70
  1033. countspeed = 1
  1034. speed = .3
  1035. perc = 0
  1036. increment = 1/#parts
  1037. step:connect(function()
  1038. count = (count%counttime)+countspeed
  1039. angle = math.pi*math.sin((math.pi*2)/counttime*count)
  1040. perc = (perc%1)+0.02
  1041. rootVel = Vector3.new(root.Velocity.x,0,root.Velocity.z)
  1042. -----------------------------
  1043. for i,v in pairs(parts)do v.Transparency = math.sin(math.pi*((perc+increment*i)%1))end
  1044. humanoid.WalkSpeed = cWalkS
  1045. if (tick()-lastpulse) > pulsetime then
  1046. lastpulse = tick()
  1047. ringExplode(CFrame.new(torso.CFrame.x,1,torso.CFrame.z)*CFrame.Angles(math.pi/2,0,0),colour[1],4)
  1048. end
  1049. -----------------------------
  1050. if Mode=="Custom"or rootVel.magnitude > 2 then
  1051. --- debug
  1052. isIdlePosing,curIdle,lastIdle = false,"",tick()
  1053. --- end debug
  1054. end
  1055. if rootVel.magnitude < 2 and Mode~="Custom" then
  1056. counttime = 50
  1057. countspeed = .5
  1058. speed = .1
  1059. if (tick()-lastIdle) > bIdleTime and not isIdlePosing then curIdle = Idles[math.random(1,#Idles)] startedIdle = tick() isIdlePosing = true end
  1060. if isIdlePosing and (tick()-startedIdle) > bIdleTime/2 then isIdlePosing = false curIdle = "" lastIdle = tick() end
  1061. if curIdle=="" then
  1062. rs.C0 = cslerp(rs.C0,c0.rs*CFrame.Angles(math.pi/3+angle*speed*.1,0,-.1),speed)
  1063. ls.C0 = cslerp(ls.C0,c0.ls*CFrame.Angles(-angle*speed*.2,0,0),speed)
  1064. handlew.C0 = cslerp(handlew.C0,ohw*CFrame.new(1,.6,0.3)*CFrame.Angles(0,-math.pi/9,-math.pi/2),speed)
  1065. rh.C0 = cslerp(rh.C0,c0.rh*CFrame.Angles(-angle*speed*.2,0,0),speed)
  1066. lh.C0 = cslerp(lh.C0,c0.lh*CFrame.Angles(angle*speed*.2,0,0),speed)
  1067. ne.C0 = cslerp(ne.C0,c0.nk,speed)
  1068. rw.C0 = cslerp(rw.C0,c0.tw,speed)
  1069. elseif curIdle=="FAB" then
  1070. rs.C0 = cslerp(rs.C0,c0.rs*CFrame.new(0,.5,0)*CFrame.Angles(-math.pi,0,math.pi/6),speed)
  1071. ls.C0 = cslerp(ls.C0,c0.ls*CFrame.Angles(0,0,-math.pi/8),speed)
  1072. handlew.C0 = cslerp(handlew.C0,ohw*CFrame.Angles(0,0,math.pi*2.5),speed)
  1073. rh.C0 = cslerp(rh.C0,c0.rh*CFrame.Angles(0,0,math.pi/10),speed)
  1074. lh.C0 = cslerp(lh.C0,c0.lh*CFrame.Angles(0,0,-math.pi/10),speed)
  1075. ne.C0 = cslerp(ne.C0,c0.nk*CFrame.Angles(math.pi/6,-math.pi/4,0),speed)
  1076. rw.C0 = cslerp(rw.C0,c0.tw,speed)
  1077. end
  1078. elseif rootVel.magnitude > 2 and Mode~="Custom" then
  1079. counttime = 25
  1080. countspeed = 1.5
  1081. speed = .4
  1082. rs.C0 = cslerp(rs.C0,c0.rs*CFrame.Angles(math.pi/3+angle*speed*.1,0,-.1),speed)
  1083. ls.C0 = cslerp(ls.C0,c0.ls*CFrame.Angles(math.pi/8+angle*speed,0,math.pi/8*angle*speed),speed)
  1084. handlew.C0 = cslerp(handlew.C0,ohw*CFrame.new(1,.6,0.3)*CFrame.Angles(0,-math.pi/9,-math.pi/2),speed)
  1085. lh.C0 = cslerp(lh.C0,c0.lh*CFrame.new(0,-angle*speed*.3,0)*CFrame.Angles(-angle*speed*.75,0,-angle*speed*.1),speed)
  1086. rh.C0 = cslerp(rh.C0,c0.rh*CFrame.new(0,angle*speed*.3,0)*CFrame.Angles(angle*speed*.75,0,-angle*speed*.1),speed)
  1087. ne.C0 = cslerp(ne.C0,c0.nk*CFrame.Angles(math.pi/17,angle*speed*.025,0),speed)
  1088. rw.C0 = cslerp(rw.C0,c0.tw*CFrame.Angles(-math.pi/20,angle*speed*.05,0),speed)
  1089. end
  1090. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement