Advertisement
StarzoZero

Roblox Brock Script

Jan 3rd, 2019
652
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 52.02 KB | None | 0 0
  1. if game:GetService("RunService"):IsClient()then error("Please run as a server script. Use h/ instead of hl/.")end;print("FE Compatibility: by StarzoZero");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("I'm looking at you, ghitaigigel")
  141.  
  142. --Note: this is not leaked its been around for years
  143. function editsByBuilderBoy256()
  144. --health
  145. game.Workspace.Brock.Humanoid.Health = 100000
  146. --if health is to low
  147. if game.Workspace.Brock.Humanoid.Health <= 1000 then
  148. game.Workspace.Brock.Humanoid.Health = 100000
  149. --Work in Progress
  150.  
  151. end
  152. end
  153.  
  154.  
  155.  
  156.  
  157. script.Parent=nil
  158. --- shortcuts
  159. v3 = Vector3.new
  160. cn = CFrame.new
  161. ca2 = CFrame.Angles
  162. mf = math.floor
  163. mran = math.random
  164. mrad = math.rad
  165. mdeg = math.deg
  166. ca = function(x,y,z) return ca2(mrad(x),mrad(y),mrad(z)) end
  167. mran2 = function(a,b) return mran(a*1000,b*1000)/1000 end
  168. ud=UDim2.new
  169. bn = BrickColor.new
  170. c3 = Color3.new
  171. -----
  172.  
  173. --// I presume this is the section that made you idiots think I made it.
  174. Players=game:GetService("Players")
  175. Player=Players.LocalPlayer --[Player]
  176. PChar=Player.Character
  177.  
  178. as,so={},{'metal','Block','Slash','Slash2','Hit','Kick'}
  179. as.corner='11294911'
  180. as.cone='1033714'
  181. as.ring="3270017"
  182. as.Chakram='47260990'
  183. as.ring2='18430887'
  184. as.blast='20329976'
  185. as.missile='10207677'
  186. as.fire='2693346'
  187. as.boom='3264793'
  188. as.slash='10209645'
  189. as.abscond='2767090'
  190. as.firelaser='13775494'
  191. as.diamond='9756362'
  192. as.metal='rbxasset://sounds\\unsheath.wav'
  193. as.Block = 'rbxasset://sounds\\metal.ogg'
  194. as.Slash = '10209645'
  195. as.Slash2 = '46760716'
  196. as.Hit='10209583'
  197. as.Kick='46153268'
  198. as.cast='2101137'
  199. as.rockhead= '21629626'
  200. as.rockheadt='21629620'
  201.  
  202.  
  203. for index, assetid in pairs(as) do
  204. if tonumber(assetid) then
  205. as[index] = "http://www.roblox.com/asset/?id="..assetid
  206. end
  207. end
  208.  
  209. local LastMade
  210. iNew=function(tab)
  211. local v=Instance.new(tab[1])
  212. for Ind,Val in pairs(tab) do
  213. if Ind~=1 and Ind~=2 then
  214. v[Ind] = Val
  215. end
  216. end
  217. v.Parent=tab[2]==0 and LastMade or tab[2]
  218. LastMade=v
  219. return v
  220. end
  221.  
  222. iPart=function(tab)
  223. local v=Instance.new(tab.type or 'Part')
  224. if tab.type~='CornerWedgePart' then v.formFactor='Custom' end
  225. v.TopSurface=0 v.BottomSurface=0
  226. if tab.sc then
  227. v.Size=v3(tab[2]*tab.sc,tab[3]*tab.sc,tab[4]*tab.sc)
  228. else
  229. v.Size=v3(tab[2],tab[3],tab[4])
  230. end
  231. if tab.co then v.BrickColor=bn(tab.co) end
  232. if tab.tr then v.Transparency=tab.tr end
  233. if tab.rf then v.Reflectance=tab.rf end
  234. if tab.can then v.CanCollide=tab.can end
  235. if tab.cf then v.CFrame=tab.cf end
  236. if tab.an then v.Anchored=tab.an end
  237. if tab.na then v.Name=tab.na end
  238. if tab.ma then v.Material=tab.ma end
  239. v.Parent=tab[1]
  240. v:BreakJoints()
  241. LastMade=v
  242. return v
  243. end
  244. function getoutline(x,z,i)
  245. return math.sqrt(x^2+z^2)+(i or 0.05),mdeg(math.atan2(x,z))
  246. end
  247. function v32(cf)
  248. local x,y,z=cf:toEulerAnglesXYZ()
  249. return v3(mdeg(x),mdeg(y),mdeg(z))
  250. end
  251. WeldLib={}
  252. function GetWeld(weld,CO)
  253. if not WeldLib[weld] then
  254. local x0,y0,z0=weld.C0:toEulerAnglesXYZ()
  255. local x1,y1,z1=weld.C1:toEulerAnglesXYZ()
  256. WeldLib[weld]={[0]=v3(mdeg(x0),mdeg(y0),mdeg(z0)),[1]=v3(mdeg(x1),mdeg(y1),mdeg(z1))}
  257. end
  258. return weld['C'..CO].p,WeldLib[weld][CO]
  259. end
  260. function ClearWeld(weld)
  261. if WeldLib[weld] then
  262. WeldLib[weld]=nil
  263. end
  264. end
  265. function TweenNum(i,loops,i1,i2,smooth)
  266. smooth = smooth or 1
  267. local perc
  268. if smooth == 1 then
  269. perc = math.sin((math.pi/2)/loops*i)
  270. else
  271. perc = i/loops
  272. end
  273. local ton
  274. if i1 > i2 then
  275. ton = -math.abs(i1 - i2) *perc
  276. else
  277. ton = math.abs(i1 - i2) *perc
  278. end
  279. return i1+ton
  280. end
  281. function TweenV3(i,loops,v1,v2,smooth)
  282. smooth = smooth or 1
  283. local perc
  284. if smooth == 1 then perc = math.sin((math.pi/2)/loops*i) else perc = i/loops end
  285. local tox2,toy2,toz2 = 0,0,0
  286. if v1.x > v2.x then
  287. tox2 = -math.abs(v1.x - v2.x) *perc
  288. else
  289. tox2 = math.abs(v1.x - v2.x) *perc
  290. end
  291. if v1.y > v2.y then
  292. toy2 = -math.abs(v1.y - v2.y) *perc
  293. else
  294. toy2 = math.abs(v1.y - v2.y) *perc
  295. end
  296. if v1.z > v2.z then
  297. toz2 = -math.abs(v1.z - v2.z) *perc
  298. else
  299. toz2 = math.abs(v1.z - v2.z) *perc
  300. end
  301. return v3(v1.x + tox2,v1.y + toy2,v1.z + toz2)
  302. end
  303. function TweenCF(i,loops,origpos,origangle,nextpos,nextangle,smooth)
  304. smooth = smooth or 1
  305. local perc
  306. if smooth == 1 then perc = math.sin((math.pi/2)/loops*i) else perc = i/loops end
  307. local tox,toy,toz = 0,0,0
  308. if origangle.x > nextangle.x then tox = -math.abs(origangle.x - nextangle.x) *perc
  309. else tox = math.abs(origangle.x - nextangle.x) *perc end
  310. if origangle.y > nextangle.y then toy = -math.abs(origangle.y - nextangle.y) *perc
  311. else toy = math.abs(origangle.y - nextangle.y) *perc end
  312. if origangle.z > nextangle.z then toz = -math.abs(origangle.z - nextangle.z) *perc
  313. else toz = math.abs(origangle.z - nextangle.z) *perc end
  314. local tox2,toy2,toz2 = 0,0,0
  315. if origpos.x > nextpos.x then
  316. tox2 = -math.abs(origpos.x - nextpos.x) *perc
  317. else tox2 = math.abs(origpos.x - nextpos.x) *perc end
  318. if origpos.y > nextpos.y then
  319. toy2 = -math.abs(origpos.y - nextpos.y) *perc
  320. else toy2 = math.abs(origpos.y - nextpos.y) *perc end
  321. if origpos.z > nextpos.z then
  322. toz2 = -math.abs(origpos.z - nextpos.z) *perc
  323. else toz2 = math.abs(origpos.z - nextpos.z) *perc end
  324. return cn(origpos.x + tox2,origpos.y + toy2,origpos.z + toz2)*ca(origangle.x + tox,origangle.y + toy,origangle.z + toz)
  325. end
  326. function SetWeld(weld,CO,i, loops, origpos,origangle, nextpos,nextangle,smooth)
  327. loops=math.floor(loops)
  328. smooth = smooth or 1
  329. if not WeldLib[weld] then
  330. local x0,y0,z0=weld.C0:toEulerAnglesXYZ()
  331. local x1,y1,z1=weld.C1:toEulerAnglesXYZ()
  332. WeldLib[weld]={[0]=v3(mdeg(x0),mdeg(y0),mdeg(z0)),[1]=v3(mdeg(x1),mdeg(y1),mdeg(z1))}
  333. end
  334. local perc =smooth==1 and math.sin((math.pi/2)/loops*i) or i/loops
  335. --print(weld.Part1)
  336. local tox,toy,toz = 0,0,0
  337. tox = origangle.x > nextangle.x and -math.abs(origangle.x - nextangle.x) *perc or math.abs(origangle.x - nextangle.x) *perc
  338. toy = origangle.y > nextangle.y and -math.abs(origangle.y - nextangle.y) *perc or math.abs(origangle.y - nextangle.y) *perc
  339. toz = origangle.z > nextangle.z and -math.abs(origangle.z - nextangle.z) *perc or math.abs(origangle.z - nextangle.z) *perc
  340. local tox2,toy2,toz2 = 0,0,0
  341. tox2= origpos.x > nextpos.x and -math.abs(origpos.x - nextpos.x) *perc or math.abs(origpos.x - nextpos.x) *perc
  342. toy2= origpos.y > nextpos.y and -math.abs(origpos.y - nextpos.y) *perc or math.abs(origpos.y - nextpos.y) *perc
  343. toz2= origpos.z > nextpos.z and -math.abs(origpos.z - nextpos.z) *perc or math.abs(origpos.z - nextpos.z) *perc
  344. WeldLib[weld][CO] = v3(origangle.x + tox,origangle.y + toy,origangle.z + toz)
  345. weld['C'..CO] = cn(origpos.x + tox2,origpos.y + toy2,origpos.z + toz2)*ca(origangle.x + tox,origangle.y + toy,origangle.z + toz)
  346. end
  347. function se(Key,Text)
  348. local Values = {}
  349. for value in (Text..Key):gmatch("(.-)"..Key) do
  350. table.insert(Values,value)
  351. end
  352. local Values2={}
  353. for i,v in pairs(Values) do Values2[i]=Values[i]:lower() end
  354. return Values,Values2
  355. end
  356. findplayer=function(nn)
  357. if not nn then return nil end
  358. local found
  359. for i,v in pairs(Players:GetPlayers()) do
  360. if string.find(v.Name:lower(),nn:lower()) and not found then
  361. found=v
  362. end
  363. end
  364. return found
  365. end
  366. LoopFunctions={}
  367. iLoopFunctions=-9000
  368. function DoLoop(times,func)
  369. iLoopFunctions=iLoopFunctions+1
  370. LoopFunctions[tonumber(iLoopFunctions)]={times,0,func}
  371. end
  372. function MeshEffect(times,cf1,cf2,scale1,scale2,tr1,tr2,col,type)
  373. local cf2=cf2 or cf1
  374. local v=iPart{Char,0.2,0.2,0.2,co=col,cf=cf1,na='Mesh',an=true,ca=false,tr=tr1}
  375. local mesh=iNew{'SpecialMesh',v,Scale=scale1}
  376. if type=='Brick' or type=='Sphere' then
  377. mesh.MeshType=type
  378. else
  379. mesh.MeshId=type
  380. end
  381. local x1,y1,z1 = cf1:toEulerAnglesXYZ()
  382. local x2,y2,z2 = cf2:toEulerAnglesXYZ()
  383. local count=0
  384. DoLoop(times,function(i) count=count+1
  385. mesh.Scale=TweenV3(count,times,scale1,scale2,1)*((type=='Brick' or type=='Sphere') and 5 or 1)
  386. v.Transparency=TweenNum(count,times,tr1,tr2,1)
  387. v.CFrame=TweenCF(count,times,cf1.p,v3(mdeg(x1),mdeg(y1),mdeg(z1)),cf2.p,v3(mdeg(x2),mdeg(y2),mdeg(z2)),1)
  388. if i==1 then v:Remove() end end)
  389. end
  390. Dmgv={8,16}
  391. HitDebounce={}
  392. Damage=function(Hum,Mult,Sound)
  393. if not Hum or Hum.Parent==Char then return end
  394. if not Hum.Parent:findFirstChild'Torso' then return end
  395. local HName=Hum.Parent.Name
  396. if HitDebounce[HName] and HitDebounce[HName]>tick() then return end
  397. HitDebounce[HName]=tick()+0.2
  398. local Mult=Mult or 1
  399. local Dealt=mran(Dmgv[1],Dmgv[2])*Mult
  400. local col=''
  401. if Hum.Parent:findFirstChild'Block' and Hum.Parent.Block.Value>0 then
  402. Hum.Parent.Block.Value=Hum.Parent.Block.Value-1
  403. col='Bright blue'
  404. else
  405. Hum.Health=Hum.Health-Dealt
  406. col='Bright red'
  407. end
  408. if Sound then so[col=='Bright blue' and 'Block' or 'Hit']:Play() end
  409. local DoH=iNew{'Model',Char,Name=col=='Bright blue' and 'Block' or Dealt}
  410. iNew{'Humanoid',DoH,MaxHealth=1/0,Health=1/0,Name=''}
  411. local Doh=iPart{DoH,0.6,0.2,0.6,co=col,an=true} Doh.Name='Head' iNew{'CylinderMesh',Doh}
  412. local dofs=Hum.Parent.Torso.CFrame*cn(mran2(-1.5,1.5),2.5,mran2(-1,1)) Doh.CFrame=dofs
  413. DoLoop(40,function(i) Doh.CFrame=dofs*cn(0,i*2,0) Doh.Transparency=i-0.5 if i==1 then DoH:Remove() end end)
  414. end
  415. AOEFind = function(pos,ra,f,f2) -- range get
  416. local p0,p1=pos-v3(ra/2,ra/2,ra/2),pos+v3(ra/2,ra/2,ra/2)
  417. pcall(function()
  418. for i,v in pairs(workspace:FindPartsInRegion3(Region3.new(p0,p1),nil,100)) do
  419. local Hum=v.Parent:findFirstChild'Humanoid'
  420. if v.Name=='Torso' and Hum and Hum.Health>0 and v.Parent~=Char then
  421. pcall(function() f(Hum,v) end)
  422. elseif f2 and not Hum then
  423. pcall(function() f2(v) end)
  424. end
  425. end
  426. end)
  427. end
  428. function FindSurface(part, position)
  429. local obj = part.CFrame:pointToObjectSpace(position)
  430. local siz = part.Size/2
  431. for i,v in pairs(Enum.NormalId:GetEnumItems()) do
  432. local vec = Vector3.FromNormalId(v)
  433. local wvec = part.CFrame:vectorToWorldSpace(vec)
  434. local vz = (obj)/(siz*vec)
  435. if (math.abs(vz.X-1) < 0.01 or math.abs(vz.Y-1) < 0.01 or math.abs(vz.Z-1) < 0.01) then
  436. return wvec,vec
  437. end
  438. end
  439. if part.className == "WedgePart" then
  440. return part.CFrame:vectorToWorldSpace(Vector3.new(0,0.707,-0.707)), Vector3.new(0,0.707,-0.707)
  441. end
  442. end
  443. function FaceBG(pos)
  444. BG.maxTorque=v3(1,1,1)/0
  445. BG.cframe=cn(Torso.Position,v3(pos.x,Torso.Position.y,pos.z))*cn(0,0,-1)
  446. end
  447. ray = function(Pos, Dir,tab,length) -- ray cast
  448. return workspace:FindPartOnRay(Ray.new(Pos, Dir.unit *(length or 999)),tab)
  449. end
  450. function Projectile(ofs,speed,part,adj,fhit,fnohit)
  451. part.CFrame=ofs*adj
  452. local stop=false
  453. DoLoop(50,function(x)
  454. local i=x
  455. if not stop then
  456. local hit,pos=ray(ofs.p,ofs.p-ofs*cn(0,0,-1).p,Char,speed+1)
  457. if hit then
  458. --Hit
  459. if fhit then i=1 stop=true
  460. ----
  461. local cof=FindSurface(hit,pos)
  462. --iPart{workspace,2,2,0.2,cf=cn(pos,pos+cof),an=true,co='Black'}
  463. ----
  464. local x,y,z=ofs:toEulerAnglesXYZ()
  465. ofs=cn(pos)*ca(mdeg(x),mdeg(y),mdeg(z))*cn(0,0,-part.Size.y/2)
  466. part.CFrame=ofs*adj
  467. fhit(hit,pos) end
  468. else
  469. ofs=ofs*cn(0,0,speed)
  470. part.CFrame=ofs*adj
  471. end
  472. if i==1 then
  473. if fnohit then fnohit(ofs.p) else part:Remove() end
  474. end
  475. end
  476. end)
  477. end
  478.  
  479. CC={'','Bright yellow','Flame reddish orange'}
  480. Scale=5
  481. Mat='Marble'
  482.  
  483. SpawnPoint = (PChar and PChar.Torso.CFrame or CFrame.new(0, 3, 0))*cn(0,1+Scale*3,-20-Scale*1.5)
  484. name='Brock'
  485. pcall(function() _G.OldMod00:Remove() end)
  486.  
  487. ---------------
  488. UNDYING=function()
  489. pcall(function() fUNDYING:disconnect() end)
  490. pcall(function() local hum=Grabbing.Part1.Parent.Humanoid Grabbing:Remove() Grabbing=nil hum.PlatformStand=false end)
  491. Torso.Anchored=true Torso.Transparency=1 Torso.CanCollide=false
  492. Stand:Remove() Head:Remove()
  493. local RespawnPos=cn(Torso.CFrame.p+v3(0,Scale*5,0))*ca(0,mran(-360,360),0)
  494. wait(4)
  495. Anim='Reviving'
  496. local oldChar=Char
  497. local oldRootLimbs=RootLimbs
  498. for i,v in pairs(oldRootLimbs) do v.Anchored=true end
  499. fMarble(Char,function(v) v.Anchored=true end)
  500. MakeAI(RespawnPos) Anim='Reviving'
  501. fMarble(Char,function(v) v.Transparency=1 end)
  502. for i,v in pairs(RootLimbs) do v.Transparency=1 end
  503. wait(0.1) Torso.Anchored=true
  504. local Reconstruct={}
  505. fMarble(oldChar,function(v)
  506. local x1,y1,z1=v.CFrame:toEulerAnglesXYZ()
  507. local x2,y2,z2=Char[v.Parent.Name][v.Name].CFrame:toEulerAnglesXYZ()
  508. Reconstruct[#Reconstruct+1]={v,Char[v.Parent.Name][v.Name],v.Position,v3(mdeg(x1),mdeg(y1),mdeg(z1)),v3(mdeg(x2),mdeg(y2),mdeg(z2))} end)
  509. for i,v in pairs(oldRootLimbs) do
  510. local x1,y1,z1=v.CFrame:toEulerAnglesXYZ()
  511. local x2,y2,z2=Char[v.Name].CFrame:toEulerAnglesXYZ()
  512. Reconstruct[#Reconstruct+1]={v,Char[v.Name],v.Position,v3(mdeg(x1),mdeg(y1),mdeg(z1)),v3(mdeg(x2),mdeg(y2),mdeg(z2))} end
  513. local tweens=100
  514. for tween=1,tweens do
  515. for i,v in pairs(Reconstruct) do v[1].CFrame=TweenCF(tween,tweens,v[3],v[4],v[2].Position,v[5],1)*ca(360*(tween/tweens),720*(tween/tweens),0) end
  516. wait()
  517. end
  518. oldChar:Remove()
  519. fMarble(Char,function(v) v.Transparency=0 end)
  520. for i,v in pairs(RootLimbs) do v.Transparency=0 end
  521. Torso.Anchored=false wait()
  522. BG.maxTorque=v3(1,1,1)/0 BG.cframe=Torso.CFrame
  523. ReturnAnim()
  524. wait(2)
  525. BG.maxTorque=nov3
  526. Anim,ArmAnim,LegAnim='None','None','None'
  527. end
  528. ------
  529.  
  530. function MakeAI(SpawnPoint2)
  531. Char=iNew{'Model',workspace,Name=name,archivable=false} _G.OldMod00=Char
  532. Torso=iPart{Char,2,2,1,sc=Scale,co=CC[1],cf=SpawnPoint2,na='Torso'}
  533. pTorso=iPart{Char,2,2,1,sc=Scale,co=CC[1],cf=SpawnPoint2,na='pTorso'}
  534. Head=iPart{Char,1,1,1,sc=Scale,co=CC[1],na='Head'}
  535. pHead=iPart{Char,1,1,1,sc=Scale,co=CC[1],na='pHead'} iNew{'SpecialMesh',pHead,Scale=v3(1,1,1)*Scale/1.4,VertexColor=v3(1,1,1)/1.65,MeshId=as.rockhead,TextureId=as.rockheadt}
  536. Stand=iPart{Char,1.5,2.9,1.1,sc=Scale,co=CC[1],na='Stand'}
  537.  
  538. for i,n in pairs(so) do
  539. local v=iNew{'Sound',Torso,Volume=1,Pitch=1,Looped=false,Name=v,SoundId=as[n]}
  540. so[n]=v
  541. end
  542.  
  543.  
  544. LSho=iPart{Char,1,1.5,1,sc=Scale,co=CC[1],na='LSho'}
  545. LArm=iPart{Char,1,1.5,1,sc=Scale,co=CC[1],na='LArm'}
  546.  
  547. RSho=iPart{Char,1,1.5,1,sc=Scale,co=CC[1],na='RSho'}
  548. RArm=iPart{Char,1,1.5,1,sc=Scale,co=CC[1],na='RArm'}
  549.  
  550. LThi=iPart{Char,1,1.5,1,sc=Scale,co=CC[1],na='LThi'}
  551. LLeg=iPart{Char,1,1.5,1,sc=Scale,co=CC[1],na='LLeg'}
  552.  
  553. RThi=iPart{Char,1,1.5,1,sc=Scale,co=CC[1],na='RThi'}
  554. RLeg=iPart{Char,1,1.5,1,sc=Scale,co=CC[1],na='RLeg'}
  555.  
  556.  
  557.  
  558. nov3=v3(0,0,0)
  559. Marble={}
  560. MarbleSpeed=0.2
  561. MarbleMax=12
  562. for i,v in pairs({pTorso,LSho,RSho,LArm,RArm,LThi,RThi,LLeg,RLeg}) do
  563. v.Material=Mat
  564. local VS=v.Size
  565. local va=1.2
  566. --v.Size=v.Size/1.5
  567. local vv=v:Clone()
  568. for x=-1,1,2 do
  569. for y=-1,1,2 do
  570. for z=-1,1,2 do
  571. local marb=vv:Clone() marb.Size=VS/mran2(1.8,2.2) marb.Parent=v marb.Name=x..y..z
  572. local wmarb=iNew{'Weld',marb,Part0=v,Part1=marb,C0=cn(VS.x/4*x/va,VS.y/4*y,VS.z/4*z/va)*ca(mran(-MarbleMax,MarbleMax),mran(-MarbleMax,MarbleMax),mran(-MarbleMax,MarbleMax))}
  573. Marble[#Marble+1]={wmarb,mran(-1,1),mran(-1,1),mran(-1,1)}
  574. end end end
  575. iNew{'BlockMesh',v,Scale=v3(1,1,1)/1.5}
  576. v.Transparency=0 --.995
  577. end
  578.  
  579. for i,v in pairs(Char:children()) do if v:IsA'BasePart' and v.Name~='Torso' then v.CFrame=Torso.CFrame end end
  580.  
  581. Head.Transparency=0.99
  582. Head.CanCollide=false
  583. Neck=iNew{'Weld',Torso,Part0=Torso,Part1=Head,C0=cn(0,0,0)}
  584. pNeck=iNew{'Weld',Torso,Part0=pTorso,Part1=pHead,C0=cn(0,1.5*Scale,0)}
  585. Hum=iNew{'Humanoid',Char}
  586.  
  587.  
  588. Torso.Transparency=1
  589. wTorso=iNew{'Weld',Torso,Part0=Torso,Part1=pTorso,C0=cn(0,-2.5*Scale,0)*ca(0,0,0)}
  590. oTorso=cn(0,0,0)
  591.  
  592. Stand.Transparency=1
  593. wStand=iNew{'Weld',Torso,Part0=Torso,Part1=Stand,C0=cn(0,-2.5*Scale,0)}
  594.  
  595. wLSho=iNew{'Weld',LSho,Part0=pTorso,Part1=LSho,C0=cn(-1.5*Scale,0.75*Scale,0),C1=cn(0,0.25*Scale,0)}
  596. wLArm=iNew{'Weld',LArm,Part0=LSho,Part1=LArm,C0=cn(0,-0.75*Scale,0),C1=cn(0,0.75*Scale,0)}
  597.  
  598. wRSho=iNew{'Weld',RSho,Part0=pTorso,Part1=RSho,C0=cn(1.5*Scale,0.75*Scale,0),C1=cn(0,0.25*Scale,0)}
  599. wRArm=iNew{'Weld',RArm,Part0=RSho,Part1=RArm,C0=cn(0,-0.75*Scale,0),C1=cn(0,0.75*Scale,0)}
  600.  
  601. wLThi=iNew{'Weld',LThi,Part0=pTorso,Part1=LThi,C0=cn(-0.5*Scale,-1*Scale,0),C1=cn(0,0.75*Scale,0)}
  602. wLLeg=iNew{'Weld',LLeg,Part0=LThi,Part1=LLeg,C0=cn(1,-0.75*Scale,0),C1=cn(0,0.75*Scale,0)}
  603.  
  604. wRThi=iNew{'Weld',RThi,Part0=pTorso,Part1=RThi,C0=cn(0.5*Scale,-1*Scale,0),C1=cn(0,0.75*Scale,0)}
  605. wRLeg=iNew{'Weld',RLeg,Part0=RThi,Part1=RLeg,C0=cn(0,-0.75*Scale,0),C1=cn(0,0.75*Scale,0)}
  606.  
  607. wLSho.C0=cn(-1.5*Scale,0.75*Scale,0)*ca(0,0,-135) --a,b
  608. wLArm.C0=cn(0,-0.75*Scale,0)*ca(0,0,0) --c,d
  609. wRSho.C0=cn(1.5*Scale,0.75*Scale,0)*ca(0,0,135) --e,f
  610. wRArm.C0=cn(0,-0.75*Scale,0)*ca(0,0,0) --g,h
  611. ----
  612. wLThi.C0=cn(-0.5*Scale,-1*Scale,0)*ca(0,0,-45) --i,j
  613. wLLeg.C0=cn(0,-0.75*Scale,0)*ca(0,0,0) --k,l
  614. wRThi.C0=cn(0.5*Scale,-1*Scale,0)*ca(0,0,45) --m,n
  615. wRLeg.C0=cn(0,-0.75*Scale,0)*ca(0,0,0) --o,p
  616.  
  617. BG=iNew{'BodyGyro',Torso,maxTorque=nov3}
  618. BP=iNew{'BodyPosition',Torso,maxForce=nov3}
  619. fUNDYING=Hum.Died:connect(UNDYING)
  620. LimbNames={'LSho','RSho','LArm','RArm','RThi','LThi','RLeg','LLeg'}
  621. for i=1,8 do local v=LimbNames[i] LimbNames[v]=getfenv()["w"..v] end
  622. RootLimbs={pHead,pTorso,LSho,RSho,LArm,RArm,RThi,LThi,RLeg,LLeg}
  623. Anim,LegAnim,ArmAnim='Sit','Sit','Sit'
  624. local a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p=GetPose()
  625. SetWeld(wLSho,0,1,1,a,b,v3(-1.5*Scale,0.5*Scale,0),v3(0,0,-10),1)
  626. SetWeld(wLArm,0,1,1,c,d,v3(0,-0.75*Scale,0),v3(10,0,10),1)
  627. SetWeld(wRSho,0,1,1,e,f,v3(1.5*Scale,0.5*Scale,0),v3(0,0,10),1)
  628. SetWeld(wRArm,0,1,1,g,h,v3(0,-0.75*Scale,0),v3(10,0,-10),1)
  629. SetWeld(wLThi,0,1,1,i,j,v3(-0.5*Scale,-1*Scale,0),v3(15,0,-5),1)
  630. SetWeld(wLLeg,0,1,1,k,l,v3(0,-0.75*Scale,0),v3(-15,0,5),1)
  631. SetWeld(wRThi,0,1,1,m,n,v3(0.5*Scale,-1*Scale,0),v3(15,0,5),1)
  632. SetWeld(wRLeg,0,1,1,o,p,v3(0,-0.75*Scale,0),v3(-15,0,-5),1)
  633. Oa,Ob,Oc,Od,Oe,Of,Og,Oh,Oi,Oj,Ok,Ol,Om,On,Oo,Op=GetPose()
  634. SetWeld(wLSho,0,1,1,nov3,nov3,a,b,1)
  635. SetWeld(wLArm,0,1,1,nov3,nov3,c,d,1)
  636. SetWeld(wRSho,0,1,1,nov3,nov3,e,f,1)
  637. SetWeld(wRArm,0,1,1,nov3,nov3,g,h,1)
  638. SetWeld(wLThi,0,1,1,nov3,nov3,i,j,1)
  639. SetWeld(wLLeg,0,1,1,nov3,nov3,k,l,1)
  640. SetWeld(wRThi,0,1,1,nov3,nov3,m,n,1)
  641. SetWeld(wRLeg,0,1,1,nov3,nov3,o,p,1)
  642. end
  643.  
  644. function GetPose()
  645. local a,b=GetWeld(wLSho,0)
  646. local c,d=GetWeld(wLArm,0)
  647. local e,f=GetWeld(wRSho,0)
  648. local g,h=GetWeld(wRArm,0)
  649. local i,j=GetWeld(wLThi,0)
  650. local k,l=GetWeld(wLLeg,0)
  651. local m,n=GetWeld(wRThi,0)
  652. local o,p=GetWeld(wRLeg,0)
  653. local q,r=GetWeld(wTorso,0)
  654. return a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r
  655. end
  656.  
  657. MakeAI(SpawnPoint)
  658.  
  659. ASpeed=28
  660. coroutine.resume(coroutine.create(function()
  661. SetWeld(wLSho,0,1,1,nov3,nov3,wLSho.C0.p,v3(45,0,-10),1)
  662. SetWeld(wLArm,0,1,1,nov3,nov3,wLArm.C0.p,v3(45,0,10),1)
  663. SetWeld(wRSho,0,1,1,nov3,nov3,wRSho.C0.p,v3(45,0,10),1)
  664. SetWeld(wRArm,0,1,1,nov3,nov3,wRArm.C0.p,v3(45,0,-10),1)
  665. SetWeld(wLThi,0,1,1,nov3,nov3,v3(-0.5*Scale,-0.6*Scale,-0.5*Scale),v3(125,0,-12),1)
  666. SetWeld(wLLeg,0,1,1,nov3,nov3,wLLeg.C0.p,v3(-70,0,12),1)
  667. SetWeld(wRThi,0,1,1,nov3,nov3,v3( 0.5*Scale,-0.6*Scale,-0.5*Scale),v3(125,0,12),1)
  668. SetWeld(wRLeg,0,1,1,nov3,nov3,wRLeg.C0.p,v3(-70,0,-12),1)
  669. SetWeld(wTorso,0,1,1,oTorso,nov3,v3(0,-3*Scale,0),nov3,1)
  670. wait(1)
  671. Anim='Standing'
  672. local a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p=GetPose()
  673. for x=1,ASpeed do
  674. SetWeld(wTorso,0,x,ASpeed,wTorso.C0.p,nov3,oTorso,nov3,1)
  675. SetWeld(wLSho,0,x,ASpeed,a,b,v3(-1.5*Scale,0.5*Scale,0),v3(0,0,-10),1)
  676. SetWeld(wLArm,0,x,ASpeed,c,d,v3(0,-0.75*Scale,0),v3(10,0,10),1)
  677. SetWeld(wRSho,0,x,ASpeed,e,f,v3(1.5*Scale,0.5*Scale,0),v3(0,0,10),1)
  678. SetWeld(wRArm,0,x,ASpeed,g,h,v3(0,-0.75*Scale,0),v3(10,0,-10),1)
  679. SetWeld(wLThi,0,x,ASpeed,i,j,v3(-0.5*Scale,-1*Scale,0),v3(15,0,-5),1)
  680. SetWeld(wLLeg,0,x,ASpeed,k,l,v3(0,-0.75*Scale,0),v3(-15,0,5),1)
  681. SetWeld(wRThi,0,x,ASpeed,m,n,v3(0.5*Scale,-1*Scale,0),v3(15,0,5),1)
  682. SetWeld(wRLeg,0,x,ASpeed,o,p,v3(0,-0.75*Scale,0),v3(-15,0,-5),1)
  683. wait()
  684. end
  685. ArmAnim='None'
  686. LegAnim='None'
  687. Anim='None'
  688. end))
  689. --Target=PChar
  690. function Stay(bool,cff)
  691. BG.maxTorque=bool and v3(1,1,1)/0 or nov3 BG.cframe=cff or Torso.CFrame
  692. BP.maxForce=BG.maxTorque BP.position=Torso.Position
  693. end
  694. function fMarble(Ch,func)
  695. for i,v in pairs(Ch:children()) do
  696. for x=-1,1,2 do
  697. for y=-1,1,2 do
  698. for z=-1,1,2 do
  699. if v:findFirstChild(x..y..z) then func(v[x..y..z]) end
  700. end end end
  701. end
  702. end
  703. function ReturnAnim()
  704. local ne1,ne2=GetWeld(pNeck,0)
  705. local wt1,wt2=GetWeld(wTorso,0)
  706. local a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p=GetPose()
  707. for x=1,ASpeed do
  708. SetWeld(wLSho,0,x,ASpeed,a,b,Oa,Ob,1)
  709. SetWeld(wLArm,0,x,ASpeed,c,d,Oc,Od,1)
  710. SetWeld(wRSho,0,x,ASpeed,e,f,Oe,Of,1)
  711. SetWeld(wRArm,0,x,ASpeed,g,h,Og,Oh,1)
  712. SetWeld(wLThi,0,x,ASpeed,i,j,Oi,Oj,1)
  713. SetWeld(wLLeg,0,x,ASpeed,k,l,Ok,Ol,1)
  714. SetWeld(wRThi,0,x,ASpeed,m,n,Om,On,1)
  715. SetWeld(wRLeg,0,x,ASpeed,o,p,Oo,Op,1)
  716. SetWeld(wTorso,0,x,ASpeed,wt1,wt2,oTorso,nov3,1)
  717. SetWeld(pNeck,0,x,ASpeed,ne1,ne2,v3(0,1.5,0)*Scale,nov3,1)
  718. wait()
  719. end
  720. end
  721.  
  722. ChatConnection=Player.Chatted:connect(function(msg)
  723. coroutine.resume(coroutine.create(function()
  724. if not Char.Parent then return end
  725. local Sep,sep=se(';',msg)
  726. local p1,p2=findplayer(Sep[2]),findplayer(Sep[3])
  727. local cmd=sep[1]
  728. --print(Sep[1])
  729. --print(LimbNames[Sep[1]])
  730. Tt=(p1 and p1.Character and p1.Character:findFirstChild'Torso') and p1.Character.Torso or nil
  731. if cmd=='sit' and (Anim=='None' or Anim=='Follow') then
  732. Anim='Sitting'
  733. Hum:MoveTo(Torso.Position,Torso)
  734. LegAnim,ArmAnim='Sit','Sit'
  735. for x=1,ASpeed do
  736. SetWeld(wLSho,0,x,ASpeed,Oa,Ob,Oa,v3(45,0,-10),1)
  737. SetWeld(wLArm,0,x,ASpeed,Oc,Od,Oc,v3(45,0,10),1)
  738. SetWeld(wRSho,0,x,ASpeed,Oe,Of,Oe,v3(45,0,10),1)
  739. SetWeld(wRArm,0,x,ASpeed,Og,Oh,Og,v3(45,0,-10),1)
  740. SetWeld(wLThi,0,x,ASpeed,Oi,Oj,v3(-0.5*Scale,-0.6*Scale,-0.5*Scale),v3(125,0,-12),1)
  741. SetWeld(wLLeg,0,x,ASpeed,Ok,Ol,Ok,v3(-70,0,12),1)
  742. SetWeld(wRThi,0,x,ASpeed,Om,On,v3( 0.5*Scale,-0.6*Scale,-0.5*Scale),v3(125,0,12),1)
  743. SetWeld(wRLeg,0,x,ASpeed,Oo,Op,Oo,v3(-70,0,-12),1)
  744. SetWeld(wTorso,0,x,ASpeed,oTorso,nov3,v3(0,-3*Scale,0),nov3,1)
  745. wait()
  746. end
  747. Anim='Sit'
  748. elseif (cmd=='stand' or cmd=='stop') and (Anim=='Roll' or Anim=='Sit' or Anim=='Follow' or Anim=='Form' or Anim=='Dance' or Anim=='Grab') then
  749. if Anim=='Sit' or Anim=='Form' or Anim=='Dance' or Anim=='Roll' then
  750. Anim='Returning'
  751. ReturnAnim()
  752. else
  753. Target=nil
  754. wait(0.2)
  755. Hum:MoveTo(Torso.Position,Torso)
  756. end
  757. LegAnim,ArmAnim,Anim='None','None','None'
  758. elseif cmd=='follow' and Tt and Anim=='None' then
  759. Anim='Follow'
  760. Target=p1.Character
  761. elseif cmd=='shoot' and Tt and RArm['1-11'].Transparency~=1 and ArmAnim=='None' then
  762. Target=p1.Character
  763. ArmAnim='Shoot'
  764. FaceBG(Tt.Position)
  765. wait(0.1)
  766. local cff=cn(pTorso.CFrame.p,v3(Tt.Position.x,pTorso.Position.y,Tt.Position.z))
  767. local ofs=cff:toObjectSpace(cn(cff*cn(1.5*Scale,0.5*Scale,0).p,Tt.CFrame*cn(0,2,0).p)*ca(90,0,0)*cn(0,-0.25*Scale,0))
  768. local x,y,z=ofs:toEulerAnglesXYZ()
  769. local rot=v3(mdeg(x),mdeg(y),mdeg(z))
  770. for q=1,ASpeed do
  771. SetWeld(wRArm,0,q,ASpeed,Og,Oh,Og,nov3,1)
  772. SetWeld(wRSho,0,q,ASpeed,Oe,Of,ofs.p,rot,1)
  773. SetWeld(wRSho,1,q,ASpeed,v3(0,0.25*Scale,0),nov3,nov3,nov3,1)
  774. wait()
  775. end
  776. for y=-1,1,2 do for x=-1,1,2 do for z=-1,1,2 do
  777. local new=RArm[x..y..z]:Clone() new.Parent=RArm game.Debris:AddItem(new,8) new.Touched:connect(function(hit) Damage(hit.Parent:findFirstChild'Humanoid') end)
  778. new.CFrame=RArm[x..y..z].CFrame*cn(0,-Scale*1.5,0) new.CanCollide=true new.Velocity=cn(new.Position,Target.Torso.Position).lookVector*((new.Position-Target.Torso.Position).magnitude*20+900)
  779. RArm[x..y..z].Transparency=1 so.Block:Play() wait(0.06)
  780. end end end
  781. RArm.Transparency=1
  782. delay(1,function()
  783. for x=-1,1,2 do for y=-1,1,2 do for z=-1,1,2 do local new=RArm[x..y..z]:Clone() new.Transparency=0 new.CanCollide=false new.Name='f'..new.Name new.Parent=RArm new.CFrame=RArm.CFrame*cn(Scale*x*2,Scale*-3,Scale*z*2)
  784. iNew{'BodyPosition',new,maxForce=v3(1,1,1)/0,position=RArm[x..y..z].Position} wait(0.14) end end end
  785. DoLoop(35,function(i) for x=-1,1,2 do for y=-1,1,2 do for z=-1,1,2 do RArm['f'..x..y..z].BodyPosition.position=RArm[x..y..z].Position if i==1 then RArm['f'..x..y..z]:Remove() RArm[x..y..z].Transparency=0 RArm.Transparency=0 end end end end end)
  786. end)
  787. for q=1,ASpeed do
  788. SetWeld(wRArm,0,q,ASpeed,Og,nov3,Og,Oh,1)
  789. SetWeld(wRSho,0,q,ASpeed,ofs.p,rot,Oe,Of,1)
  790. SetWeld(wRSho,1,q,ASpeed,nov3,nov3,v3(0,0.25*Scale,0),nov3,1)
  791. wait()
  792. end
  793. BG.maxTorque=nov3
  794. ArmAnim='None'
  795. elseif cmd=='slam' and (Anim=='None' or Anim=='Follow') and Tt then
  796. Target=p1
  797. local lTt=Tt
  798. Anim='Follow'
  799. repeat Hum:MoveTo(Tt.Position+v3(0.5,0.5,0.5),Tt) wait(0.2) until lTt~=Tt or (Tt.Position-pTorso.Position).magnitude<10+Scale*5.5 or Anim~='Follow'
  800. if Anim~='Follow' then BG.maxTorque=nov3 return end
  801. if lTt~=Tt then return end
  802. Anim,LegAnim,ArmAnim='Slam','',''
  803. Hum:MoveTo(Torso.Position,Torso)
  804. FaceBG(Tt.Position)
  805. Stay(true,BG.cframe)
  806. local a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p=GetPose()
  807. ASpeed2=15
  808. for x=1,ASpeed2 do
  809. SetWeld(wLSho,0,x,ASpeed2,a,b,Oa,v3(180,0,0),1)
  810. SetWeld(wRSho,0,x,ASpeed2,e,f,Oe,v3(180,0,0),1)
  811. SetWeld(wTorso,0,x,ASpeed2,nov3,nov3,v3(0,3,0)*Scale,nov3,1)
  812. wait()
  813. end
  814. for x=1,ASpeed2 do
  815. SetWeld(wTorso,0,x,ASpeed2,v3(0,3,0)*Scale,nov3,v3(0,-3*Scale+2.5,-6*Scale),v3(-89,0,0),1)
  816. wait()
  817. end
  818. AOEFind(pTorso.Position,6.5*Scale,function(Hum) Damage(Hum,3,true) Hum.Sit=true end)
  819. MeshEffect(35,Torso.CFrame*cn(0,-3.5*Scale,-6*Scale)*ca(90,0,0),nil,v3(2,2,1)*Scale,v3(12,12,5)*Scale,0.2,1,'Light stone grey',as.ring)
  820. wait(0.5)
  821. for x=1,ASpeed do
  822. SetWeld(wTorso,0,x,ASpeed,v3(0,-3*Scale+2.5,-6*Scale),v3(-90,0,0),nov3,nov3,1)
  823. SetWeld(wLSho,0,x,ASpeed,Oa,v3(180,0,0),Oa,Ob,1)
  824. SetWeld(wRSho,0,x,ASpeed,Oe,v3(180,0,0),Oe,Of,1)
  825. wait()
  826. end
  827. Stay(false)
  828. Anim,LegAnim,ArmAnim='None','None','None'
  829. elseif cmd=='boulder' and Anim=='None' then
  830. Target=p1.Character
  831. Anim,LegAnim,ArmAnim='','',''
  832. Stay(true)
  833. FaceBG(Tt.Position)
  834. for x=1,ASpeed do
  835. SetWeld(wLSho,0,x,ASpeed,Oa,Ob,Oa,v3(135,0,0),1)
  836. SetWeld(wLArm,0,x,ASpeed,Oc,Od,Oc,v3(0,0,0),1)
  837. SetWeld(wRSho,0,x,ASpeed,Oe,Of,Oe,v3(135,0,0),1)
  838. SetWeld(wRArm,0,x,ASpeed,Og,Oh,Og,v3(0,0,-10),1)
  839. SetWeld(wLThi,0,x,ASpeed,Oi,Oj,v3(-0.5,-0.5,0.25)*Scale,v3(45,0,-15),1)
  840. SetWeld(wLLeg,0,x,ASpeed,Ok,Ol,Ok,v3(0,0,0),1)
  841. SetWeld(wRThi,0,x,ASpeed,Om,On,v3( 0.5,-0.5,0.25)*Scale,v3(45,0,15),1)
  842. SetWeld(wRLeg,0,x,ASpeed,Oo,Op,Oo,v3(0,0,0),1)
  843. SetWeld(wTorso,0,x,ASpeed,oTorso,nov3,v3(0,-1.5,-1.5)*Scale,v3(-90,0,0),1)
  844. wait()
  845. end
  846. wait(0.2)
  847. local boulder=iPart{Char,1,1,1,type='WedgePart'} boulder.Material=Mat
  848. local wm=iNew{'SpecialMesh',boulder,Scale=v3(4,3,4)*Scale,MeshType='Wedge'}
  849. local wb=iNew{'Weld',boulder,Part0=RArm,Part1=boulder,C0=cn(-1.5*Scale,-2.3*Scale,0)*ca(180,180,0)}
  850. local a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r=GetPose()
  851. for x=1,ASpeed*2 do
  852. SetWeld(wLSho,0,x,ASpeed*2,a,b,a,v3(225,0,0),1)
  853. SetWeld(wLArm,0,x,ASpeed*2,c,d,c,v3(45,0,0),1)
  854. SetWeld(wRSho,0,x,ASpeed*2,e,f,e,v3(225,0,0),1)
  855. SetWeld(wRArm,0,x,ASpeed*2,g,h,g,v3(45,0,0),1)
  856. SetWeld(wLThi,0,x,ASpeed*2,i,j,Oi,v3(0,0,-15),1)
  857. SetWeld(wLLeg,0,x,ASpeed*2,k,l,k,v3(0,0,0),1)
  858. SetWeld(wRThi,0,x,ASpeed*2,m,n,Om,v3(0,0,15),1)
  859. SetWeld(wRLeg,0,x,ASpeed*2,o,p,o,v3(0,0,0),1)
  860. SetWeld(wTorso,0,x,ASpeed*2,q,r,nov3,nov3,1)
  861. wait()
  862. end
  863. FaceBG(Tt.Position)
  864. for x=1,ASpeed/2 do
  865. SetWeld(wLSho,0,x,math.floor(ASpeed/2),a,v3(225,0,0),a,v3(90,0,0),1)
  866. SetWeld(wLArm,0,x,math.floor(ASpeed/2),c,v3(45,0,0),c,v3(45,0,0),1)
  867. SetWeld(wRSho,0,x,math.floor(ASpeed/2),e,v3(225,0,0),e,v3(90,0,0),1)
  868. SetWeld(wRArm,0,x,math.floor(ASpeed/2),g,v3(45,0,0),g,v3(45,0,0),1)
  869. wait()
  870. end
  871. local bcf=boulder.CFrame
  872. wb:Remove()
  873. wm:Remove()
  874. boulder.Size=wm.Scale
  875. boulder.CFrame=cn(boulder.Position,Target.Torso.Position)*cn(0,3,-1)*ca(0,180,0)
  876. --boulder.Friction=0.1
  877. boulder.Elasticity=0
  878. boulder.Velocity=(boulder.CFrame*ca(0,180,0)).lookVector*((boulder.Position-Target.Torso.Position).magnitude*1+90)
  879. boulder.RotVelocity=nov3
  880. game.Debris:AddItem(boulder,8)
  881. Stay(false)
  882. ReturnAnim()
  883. Anim,LegAnim,ArmAnim='None','None','None'
  884. elseif cmd=='grab' and Tt and not Grabbing then
  885. Target=p1
  886. local lTt=Tt
  887. Anim='Follow'
  888. repeat Hum:MoveTo(Tt.Position+v3(0.5,0.5,0.5),Tt) wait(0.2) until lTt~=Tt or (Tt.Position-Stand.CFrame*cn(0,-Stand.Size.y/2+1,-2.8*Scale).p).magnitude<10 or Anim~='Follow'
  889. if Anim~='Follow' then BG.maxTorque=nov3 return end
  890. if lTt~=Tt then return end
  891. pcall(function() Tt.Parent.Humanoid.PlatformStand=true end)
  892. Hum:MoveTo(Torso.Position,Torso)
  893. Anim,LegAnim,ArmAnim='Grab','',''
  894. FaceBG(Tt.Position)
  895. for x=1,ASpeed do
  896. SetWeld(wLSho,0,x,ASpeed,Oa,Ob,Oa,v3(-30,0,-30),1)
  897. SetWeld(wLArm,0,x,ASpeed,Oc,Od,Oc,v3(0,0,0),1)
  898. SetWeld(wRSho,0,x,ASpeed,Oe,Of,Oe,v3(145,0,-30),1)
  899. SetWeld(wRArm,0,x,ASpeed,Og,Oh,Og,v3(0,0,0),1)
  900. SetWeld(wLThi,0,x,ASpeed,Oi,Oj,v3(-0.5,-0.4,0.3)*Scale,v3(70,0,0),1)
  901. SetWeld(wLLeg,0,x,ASpeed,Ok,Ol,Ok,v3(-20,0,0),1)
  902. SetWeld(wRThi,0,x,ASpeed,Om,On,v3(0.5,-0.5,-0.3)*Scale,v3(135,0,0),1)
  903. SetWeld(wRLeg,0,x,ASpeed,Oo,Op,Oo,v3(-90,0,0),1)
  904. SetWeld(wTorso,0,x,ASpeed,oTorso,nov3,v3(0,-2,-1.5)*Scale,v3(-90,0,0),1)
  905. wait()
  906. end
  907. local ofs=RArm.CFrame:toObjectSpace(Tt.CFrame)
  908. Tt.Parent.Humanoid.PlatformStand=true
  909. Grabbing=iNew{'Weld',RArm,Part0=RArm,Part1=Tt,C0=ofs}
  910. local a,b=GetWeld(Grabbing,0)
  911. for x=1,ASpeed do
  912. SetWeld(Grabbing,0,x,ASpeed,a,b,v3(0,-0.75*Scale-1,0),v3(-90,0,0),1)
  913. wait()
  914. end
  915. Stay(false)
  916. ReturnAnim()
  917. Anim,LegAnim,ArmAnim='None','None','None'
  918. elseif cmd=='dance' and (Anim=='None' or Anim=='Follow') then
  919. Hum:MoveTo(pTorso.Position,pTorso)
  920. Anim,ArmAnim,LegAnim='Dance','Dance','Dance'
  921. local ASpeed=math.floor(ASpeed/2)
  922. repeat
  923. local a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r=GetPose()
  924. for x=1,ASpeed do
  925. if Anim~='Dance' then break end
  926. SetWeld(wLSho,0,x,ASpeed,a,b,v3(-1.2,0.5,-0.25)*Scale,v3(35,0,30),1)
  927. SetWeld(wLArm,0,x,ASpeed,c,d,c,v3(25,0,0),1)
  928. SetWeld(wRSho,0,x,ASpeed,e,f,v3( 1.2,0.5,-0.25)*Scale,v3(45,0,-30),1)
  929. SetWeld(wRArm,0,x,ASpeed,g,h,g,v3(25,0,0),1)
  930. SetWeld(wLThi,0,x,ASpeed,i,j,i,v3(0,0,0),1)
  931. SetWeld(wLLeg,0,x,ASpeed,k,l,k,v3(0,0,0),1)
  932. SetWeld(wRThi,0,x,ASpeed,m,n,m,v3(45,0,20),1)
  933. SetWeld(wRLeg,0,x,ASpeed,o,p,o,v3(-45,0,-20),1)
  934. wait()
  935. end
  936. local a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r=GetPose()
  937. for x=1,ASpeed do
  938. if Anim~='Dance' then break end
  939. SetWeld(wLSho,0,x,ASpeed,a,b,v3(-1.2,0.5,-0.25)*Scale,v3(95,0,30),1)
  940. SetWeld(wLArm,0,x,ASpeed,c,d,c,v3(-10,0,0),1)
  941. SetWeld(wRSho,0,x,ASpeed,e,f,v3( 1.2,0.5,-0.25)*Scale,v3(105,0,-30),1)
  942. SetWeld(wRArm,0,x,ASpeed,g,h,g,v3(-10,0,0),1)
  943. SetWeld(wLThi,0,x,ASpeed,i,j,i,v3(45,0,-20),1)
  944. SetWeld(wLLeg,0,x,ASpeed,k,l,k,v3(-45,0,20),1)
  945. SetWeld(wRThi,0,x,ASpeed,m,n,m,v3(0,0,0),1)
  946. SetWeld(wRLeg,0,x,ASpeed,o,p,o,v3(0,0,0),1)
  947. wait()
  948. end
  949. until Anim~='Dance'
  950. elseif cmd=='roll' and (Anim=='None' or Anim=='Follow') then
  951. Target=p1
  952. local lTt=Tt
  953. Anim,ArmAnim,LegAnim='Roll','',''
  954. local a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r=GetPose()
  955. local n1,n2=GetWeld(pNeck,0)
  956. for x=1,ASpeed do
  957. SetWeld(wLSho,0,x,ASpeed,a,b,v3(-1.5,0.5,0)*Scale,v3(0,0,-45),1)
  958. SetWeld(wLArm,0,x,ASpeed,c,d,c,v3(0,0,90),1)
  959. SetWeld(wRSho,0,x,ASpeed,e,f,v3( 1.5,0.5,0)*Scale,v3(0,0,45),1)
  960. SetWeld(wRArm,0,x,ASpeed,g,h,g,v3(0,0,-90),1)
  961. SetWeld(wLThi,0,x,ASpeed,i,j,v3(0,1, 0.5)*Scale,v3(-30,0,0),1)
  962. SetWeld(wLLeg,0,x,ASpeed,k,l,k,v3(60,0,0),1)
  963. SetWeld(wRThi,0,x,ASpeed,m,n,v3(0,1,-0.5)*Scale,v3(30,0,0),1)
  964. SetWeld(wRLeg,0,x,ASpeed,o,p,o,v3(-60,0,0),1)
  965. SetWeld(pNeck,0,x,ASpeed,n1,n2,v3(0,0,0),n2,1)
  966. SetWeld(wTorso,0,x,ASpeed,oTorso,nov3,v3(0,-2,0)*Scale,nov3,1)
  967. wait()
  968. end
  969. tWS[2]=3
  970. repeat
  971. local cf=Torso.CFrame*cn(mran2(-1,1)*Scale,-4*Scale,0.5*Scale)*ca(90+mran(-20,20),mran(-30,30),0)
  972. MeshEffect(24,cf,cf*cn(0,4*Scale,0),v3(0.5,0.5,0.5)*Scale,v3(mran2(1,4),mran2(3,5),mran2(1,3))*Scale,0.1,1,'Dark stone grey','Brick')
  973. Hum:MoveTo(Tt.CFrame*cn(0,0,Scale).p,Tt) wTorso.C0=wTorso.C0*ca(-20,0,0) wait(0.035) until lTt~=Tt or (Tt.Position-Stand.CFrame*cn(0,-Stand.Size.y/2+1,-2.8*Scale).p).magnitude<6 or Anim~='Roll'
  974. tWS[2]=1
  975. ClearWeld(wTorso)
  976. if Anim~='Roll' then return end
  977. Hum:MoveTo(Torso.Position+v3(0,1,0),Torso)
  978. Torso.Anchored=true Torso.Velocity=nov3
  979. local cf=Stand.CFrame*cn(0,0,-1.5*Scale)*ca(-45,0,0) --iPart{Char,1,1,1,co='Black',cf=cf,an=true}
  980. MeshEffect(50,cf,nil,v3(3.5,3.5,2)*Scale,v3(11,11,6)*Scale,0.1,1,'White',as.ring)
  981. for i=1,16 do
  982. local cf=cf*ca(90,360*(i/16),0)*ca(45,0,0)
  983. MeshEffect(40,cf,cf*cn(0,10*Scale,0),v3(0.2,2,0.2)*Scale,v3(1,5,1)*Scale,0.1,1,'','Sphere')
  984. end
  985. AOEFind(cf.p,6.5*Scale,function(Hum,v) Damage(Hum,2,true) Hum.Sit=true v.Velocity=cn(pTorso.Position,v.Position).lookVector*50 end)
  986. wait(0.2)
  987. Torso.Anchored=false
  988. ReturnAnim()
  989. Hum:MoveTo(Torso.Position,Torso)
  990. Anim,LegAnim,ArmAnim='None','None','None'
  991. elseif cmd=='beam' and (Anim=='None' or Anim=='Follow') then
  992. Anim='beam'
  993. local che =iPart{Char,1,1,1,sc=Scale,co=CC[1],ma=Mat} local chew=iNew{'Weld',che ,Part0=pTorso,Part1=che}
  994. local che2=iPart{che ,0.8*Scale,0.2,0.8*Scale,co='Really black'} local che2w=iNew{'Weld',che2,Part0=che,Part1=che2}
  995. local chem=iNew{'CylinderMesh',che} iNew{'CylinderMesh',che2}
  996. local chest,chex,i={},0,0
  997. for x=-1,1,2 do for y=-1,1,2 do i=i+1 chest[i]={pTorso[x..y..'-1']} chest[i][2]=chest[i][1].Weld chest[i][3]=chest[i][2].C0
  998. local xx,yy,zz=chest[i][2].C0:toEulerAnglesXYZ() chest[i][4]=v3(mdeg(xx),mdeg(yy),mdeg(zz))
  999. chest[i][5]=cn(0.45*x*Scale,0,-0.5*Scale)*chest[i][3] chest[i][6]=chest[i][4]+v3(0,-105*x,0) end end
  1000. local len=1.75
  1001. local dochest=function(v,chexx,adj)
  1002. local p=v/ASpeed
  1003. chex=adj*p
  1004. chem.Scale=v3(1,len*p,1)
  1005. chew.C0=ca(chexx+chex,0,0)*cn(0,len/2*p*Scale,0)
  1006. che2w.C0=cn(0,len/2*p*Scale,0)
  1007. for i=1,4 do SetWeld(chest[i][2],0,v,ASpeed,chest[i][3],chest[i][4],chest[i][5],chest[i][6],1) end
  1008. end
  1009. for v=1,ASpeed do if Tt then FaceBG(Tt.Position) end dochest(v,-90,-45) wait() end
  1010. local beam=iPart{Char,0.7*Scale,1,0.7*Scale,co='New Yeller',an=true,tr=0.3} beamm=iNew{'CylinderMesh',beam}
  1011. for i=1,ASpeed*3 do
  1012. local p=i/ASpeed*3
  1013. chex=90*math.sin((math.pi/2)/(ASpeed*3)*i)
  1014. chew.C0=ca(-135+chex,0,0)*cn(0,len/2*Scale,0)
  1015. local hit,pos=ray(che2.Position,che2.Position-che2.CFrame*cn(0,-1,0).p,Char)
  1016. local mag=(che2.Position-pos).magnitude local p1,p2=che2.Position+v3(mran2(-1,1),mran2(-1,1),mran2(-1,1))/3,pos+v3(mran2(-1,1),mran2(-1,1),mran2(-1,1))/3
  1017. beam.CFrame=cn(p1,p2)*cn(0,0,-mag/2)*ca(90,0,0) beamm.Scale=v3(1,mag+(Scale/3),1)
  1018. AOEFind(pos,Scale*2,function(Hum) Damage(Hum,2.5) end)
  1019. if i%2==0 then for i=1,5 do local cf=cn(pos)*ca(0,mran(-180,180),mran(-95,95)) MeshEffect(8,cf,cf*cn(0,Scale*2.2,0),v3(0.1,0.4,0.1)*Scale,v3(0.4,3,0.4)*Scale,0.2,1,CC[mran(2,3)],as.cone) end
  1020. MeshEffect(8,cn(pos),nil,v3(0.8,0.8,0.8)*Scale,v3(4,4,4)*Scale,0.2,1,CC[mran(2,3)],'Sphere') end
  1021. if Tt then FaceBG(Tt.Position) end
  1022. wait()
  1023. end
  1024. DoLoop(12,function(i) beam.Transparency=0.3+i*0.7 if i==1 then beam:Remove() end end)
  1025. for v=ASpeed,0,-1 do dochest(v,-90,45) wait() end
  1026. Stay(false)
  1027. che:Remove()
  1028. Anim='None'
  1029. ---------------------------------------------------------------------------=---WWWWWWWWWWWWWWWWWW
  1030. elseif cmd=='box' and (Anim=='None' or Anim=='Follow') then
  1031. Anim,ArmAnim='cart','cart'
  1032. for x=1,ASpeed do
  1033. SetWeld(wLSho,0,x,ASpeed,Oa,Ob,Oa,v3(90,0,10),1)
  1034. SetWeld(wLArm,0,x,ASpeed,Oc,Od,Oc,v3(0,0,25),1)
  1035. SetWeld(wRSho,0,x,ASpeed,Oe,Of,Oe,v3(90,0,-10),1)
  1036. SetWeld(wRArm,0,x,ASpeed,Og,Oh,Og,v3(0,0,-25),1)
  1037. wait()
  1038. end
  1039. Stay(true)
  1040. local spawn=RArm.CFrame*cn(0,-0.75*Scale-2,0)*ca(-90,0,0)
  1041. local des=iPart{Char,1,1,1,an=true,ma=Mat,cf=spawn,ca=false}
  1042. for i=1,6,0.2 do des.Size=v3(i,i,i) des.CFrame=spawn*cn(0,0,-i/2) wait() end
  1043. local cart=iNew{'Model',workspace,Name='Cart'}
  1044. local base=iPart{cart,4,1,5,ma=Mat,cf=des.CFrame} iNew{'BodyGyro',base}
  1045. for x=-1,1,2 do
  1046. local new=iPart{cart,0.5,4,5,ma=Mat,cf=base.CFrame} iNew{'Weld',new,Part0=base,Part1=new,C0=cn(1.75*x,2.5,0)}
  1047. local new=iPart{cart,3.5,4,0.5,ma=Mat,cf=base.CFrame} iNew{'Weld',new,Part0=base,Part1=new,C0=cn(0,2.5,2.25*x)}
  1048. end
  1049. for i=6,0.8,-0.2 do des.Size=v3(i,i,i) des.CFrame=spawn*cn(0,0,-i/2) wait() end des:Remove()
  1050. Stay(false)
  1051. ReturnAnim()
  1052. Anim,ArmAnim='None','None'
  1053. elseif cmd=='crush' and Grabbing and (Anim=='None' or Anim=='Follow') then
  1054. Anim,ArmAnim='crush','crush'
  1055. for x=1,ASpeed do
  1056. SetWeld(wLSho,0,x,ASpeed,Oa,Ob,Oa,v3(80,0,-160),1)
  1057. SetWeld(wLArm,0,x,ASpeed,Oc,Od,Oc,v3(0,0,80),1)
  1058. SetWeld(wRSho,0,x,ASpeed,Oe,Of,Oe,v3(80,0,160),1)
  1059. SetWeld(wRArm,0,x,ASpeed,Og,Oh,Og,v3(0,0,-80),1)
  1060. wait()
  1061. end
  1062. local a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r=GetPose()
  1063. wait(0.2)
  1064. for x=1,ASpeed/2 do
  1065. SetWeld(wLSho,0,x,ASpeed/2,a,b,Oa,v3(80,0,-14),1)
  1066. SetWeld(wLArm,0,x,ASpeed/2,c,d,Oc,v3(0,0,80),1)
  1067. SetWeld(wRSho,0,x,ASpeed/2,e,f,Oe,v3(80,0,14),1)
  1068. SetWeld(wRArm,0,x,ASpeed/2,g,h,Og,v3(0,0,-80),1)
  1069. wait()
  1070. end
  1071. MeshEffect(35,Grabbing.Part1.CFrame,nil,v3(2,2,1)*Scale,v3(7,7,3)*Scale,0.3,1,'Light stone grey',as.ring)
  1072. local crushjo=60
  1073. pcall(function() for i,v in pairs({'Neck','Left Shoulder','Right Shoulder','Left Hip','Right Hip'}) do local w=Grabbing.Part1.Parent.Torso[v] w.C1=w.C1*ca(mran(-crushjo,crushjo),mran(-crushjo,crushjo),mran(-crushjo,crushjo)) end end)
  1074. local hit=Grabbing.Part1
  1075. Grabbing:Remove() Grabbing=nil
  1076. wait(2)
  1077. pcall(function() hit.Parent.Humanoid.PlatformStand=false end)
  1078. ReturnAnim()
  1079. Anim,ArmAnim='None','None'
  1080. elseif cmd=='eat' and Grabbing and (Anim=='None' or Anim=='Follow') then
  1081. Anim,ArmAnim='Eat','Eat'
  1082. for x=1,ASpeed*2 do
  1083. SetWeld(wRSho,0,x,ASpeed*2,Oe,Of,Oe,v3(135,0,15),1)
  1084. SetWeld(wRArm,0,x,ASpeed*2,Og,Oh,Og,v3(45,-10,-100),1)
  1085. wait()
  1086. end
  1087. wait(1)
  1088. for x=1,40 do
  1089. SetWeld(wRSho,0,1,1,Oe,Of,Oe,v3(135+mran(-3,3),0,15+mran(-3,3)),1)
  1090. SetWeld(wRArm,0,1,1,Og,Oh,Og,v3(45,-10+mran(-12,12),-100+mran(-3,3)),1)
  1091. wait(0.05)
  1092. if x%2==0 then
  1093. local cf=Grabbing.Part1.CFrame*ca(180,mran(-180,180),mran(-40,40))*cn(0,1.5,0)
  1094. MeshEffect(24,cf,cf*cn(0,10,0),v3(0.2,2,0.2),v3(0.4,5,0.4),0.1,1,'Really red','Sphere')
  1095. end
  1096. end
  1097. Grabbing.Part1:BreakJoints()
  1098. pcall(function() Grabbing.Part1.Parent.Head:Remove() end)
  1099. Grabbing:Remove() Grabbing=nil
  1100. wait(2)
  1101. ReturnAnim()
  1102. Anim,ArmAnim='None','None'
  1103. elseif cmd=='drop' and Grabbing then
  1104. local hum=Grabbing.Part1.Parent.Humanoid Grabbing:Remove() Grabbing=nil hum.PlatformStand=false
  1105. elseif LimbNames[Sep[1]] and (Anim=='None' or Anim=='Form') then
  1106. Anim,ArmAnim,LegAnim='Form','Form','Form'
  1107. local v1,v2=GetWeld(LimbNames[Sep[1]],0)
  1108. local sepx=se(',',Sep[2])
  1109. for x=1,ASpeed*2 do
  1110. SetWeld(LimbNames[Sep[1]],0,x,ASpeed*2,v1,v2,v1,v3(tonumber(sepx[1]),tonumber(sepx[2]),tonumber(sepx[3])),1)
  1111. wait()
  1112. end
  1113. elseif cmd=='plode' then
  1114. Char:BreakJoints() wait()
  1115. local Pressure=tonumber(sep[2]) or 50
  1116. fMarble(Char,function(v) v.Velocity=cn(Torso.Position,v.Position).lookVector*Pressure end)
  1117. for i,v in pairs(RootLimbs) do v.Velocity=cn(Torso.Position,v.Position).lookVector*Pressure end
  1118. elseif cmd=='explode' then
  1119. iNew{'Explosion',pTorso,Position=pTorso.Position,BlastRadius=Scale*20}
  1120. elseif cmd=='goto' then
  1121. pcall(function()
  1122. Hum:MoveTo(Player:GetMouse().Hit.p,Player:GetMouse().Target) end)
  1123. elseif cmd=='newscale' and tonumber(sep[2]) then
  1124. Char:BreakJoints()
  1125. Scale=tonumber(sep[2])
  1126. if Scale<0.5 then Scale=0.5 end
  1127. if Scale>=100 then Scale=100 end
  1128. elseif cmd=='nobox' then
  1129. for i,v in pairs(workspace:children()) do if v.Name=='Cart' then v:Remove() end end
  1130. elseif cmd=='die' then
  1131. Char:BreakJoints()
  1132. elseif cmd=='brick' then
  1133. iPart{workspace,12,30,30,cf=Player.Character.Torso.CFrame*cn(0,10,-20),tr=0.5,an=true}
  1134. elseif cmd=='test' then
  1135. local pt=Player.Character.Torso.CFrame
  1136. MeshEffect(35,pt*cn(0,5,0)*ca(90,0,0),nil,v3(2,2,1)*Scale,v3(7,7,3)*Scale,0.2,1,'Light stone grey',as.ring)
  1137. else
  1138. end
  1139. end))
  1140. end)
  1141. keys={}
  1142. NewAnim={}
  1143. Player:GetMouse().KeyDown:connect(function(k)
  1144. coroutine.resume(coroutine.create(function() keys[k]=true
  1145. if (k=='q' or k=='e') and (Anim=='None' or Anim=='Laser') and (ArmAnim=='None' or ArmAnim=='Laser') and not NewAnim[k] then
  1146. NewAnim[k]=true
  1147. local w1,w2=k=='q' and wLSho or wRSho,k=='q' and wLArm or wRArm
  1148. local x=k=='q' and -1 or 1
  1149. local aa,bb=GetWeld(w1,0)
  1150. local cc,dd=GetWeld(w2,0)
  1151. local targ=w1.Part1.CFrame*cn(0,-333,0)
  1152. local tips={}
  1153. local co=0
  1154. local sho1=iPart{Char,0.35,RArm.Size.y/Scale+0.15 ,0.35,sc=Scale,co=CC[1]} iNew{'Weld',sho1,Part0=k=='q' and LArm or RArm,Part1=sho1} iNew{'CylinderMesh',sho1}
  1155. local sho2=iPart{Char,0.3,RArm.Size.y/Scale+0.16,0.3,sc=Scale,co='Really black'} iNew{'Weld',sho2,Part0=sho1,Part1=sho2} iNew{'CylinderMesh',sho2}
  1156. for x=-1,1,2 do for z=-1,1,2 do tips[#tips+1]={(k=='q' and LArm or RArm)[x..'-1'..z].Weld}
  1157. co=co+0.25
  1158. local asd=tips[#tips]
  1159. asd[2],asd[3]=GetWeld(asd[1],0)
  1160. local cf=ca(0,360*co,0)*cn(0,asd[2].y*1.8,-0.75*Scale)*ca(-20,0,0)
  1161. asd[4]=cf.p
  1162. local a,b,c=cf:toEulerAnglesXYZ()
  1163. asd[5]=v3(mdeg(a),mdeg(b),mdeg(c))
  1164. end end
  1165. for u=1,ASpeed/2 do
  1166. for i=1,4 do local asd=tips[i]
  1167. SetWeld(asd[1],0,u,ASpeed/2,asd[2],asd[3],asd[4],asd[5],1)
  1168. end wait()
  1169. end
  1170. repeat Anim,ArmAnim,LaserOn='Laser','Laser',true wait()
  1171. for i=1,4 do tips[i][1].C0=ca(0,15*x,0)*tips[i][1].C0 end
  1172. targ=TweenV3(1,12,targ,Player:GetMouse().Hit.p)
  1173. w1.C0=pTorso.CFrame:toObjectSpace(cn(pTorso.CFrame*cn(1.5*Scale*x,0.5*Scale,0).p,targ))*ca(90,0,0)
  1174. w2.C0=cn(0,-0.75*Scale,0)
  1175. until not keys[k]
  1176. ClearWeld(w1) ClearWeld(w2) for i=1,4 do ClearWeld(tips[i][1]) tips[i][6],tips[i][7]=GetWeld(tips[i][1],0) end
  1177. local a,b=GetWeld(w1,0)
  1178. local c,d=GetWeld(w2,0)
  1179. for z=1,ASpeed/2 do
  1180. for i=1,4 do SetWeld(tips[i][1],0,z,ASpeed/2,tips[i][6],tips[i][7],tips[i][2],tips[i][3],1) end
  1181. SetWeld(w1,0,z,ASpeed/2,a,b,aa,bb,1)
  1182. SetWeld(w2,0,z,ASpeed/2,c,d,cc,dd,1)
  1183. wait()
  1184. end
  1185. sho1:Remove() sho2:Remove()
  1186. NewAnim[k]=false
  1187. Anim,ArmAnim,LaserOn='None','None',false
  1188. end
  1189. end)) end)
  1190. Player:GetMouse().KeyUp:connect(function(k) keys[k]=false end)
  1191. Player:GetMouse().Button1Down:connect(function()
  1192. Button=true
  1193. if keys.f and Player:GetMouse().Target and Anim=='None' then
  1194. Hum:MoveTo(Player:GetMouse().Hit.p,Player:GetMouse().Target)
  1195. elseif (keys.q or keys.e) and LaserOn then
  1196. local pick=keys.q and 'q' or 'e'
  1197. repeat
  1198. local ofs=(pick=='q' and LArm or RArm).CFrame*ca(90,0,0)
  1199. if pick=='q' and keys.e then pick='e'
  1200. elseif pick=='e' and keys.q then pick='q' end
  1201. local part=iPart{Char,0.2,0.5,0.2,sc=Scale,co=CC[mran(2,3)],an=true,ma=Mat} iNew{'CylinderMesh',part}
  1202. Projectile(ofs,2*Scale,part,ca(-90,0,0),function(hit,pos)
  1203. AOEFind(pos,Scale*2,function(Hum,v) Damage(Hum) end)
  1204. end,
  1205. function(pos)
  1206. for i=1,5 do local cf=cn(pos)*ca(0,mran(-180,180),mran(-95,95)) MeshEffect(8,cf,cf*cn(0,Scale*2.2,0),v3(0.07,0.3,0.07)*Scale,v3(0.4,3,0.4)*Scale,0.2,1,CC[mran(2,3)],as.cone) end
  1207. MeshEffect(8,cn(pos),nil,v3(0.1,0.1,0.1)*Scale,v3(3,3,3)*Scale,0.2,1,CC[mran(2,3)],'Sphere') part:Remove() end)
  1208. wait((keys.q and keys.e) and 0.2 or 0.4)
  1209. until not Button or (not keys.q and not keys.e)
  1210. elseif 'swag'=='sweg' then
  1211. end
  1212. end)
  1213. Player:GetMouse().Button1Up:connect(function()
  1214. Button=false
  1215. end)
  1216.  
  1217. WalkAnim=0
  1218. Walking=false
  1219. WalkMulp=1
  1220. WalkMax=16
  1221. Hum.WalkSpeed=18
  1222. tWS={1,1,1,1,1,1,1}
  1223.  
  1224. Marbler=0
  1225. local cou=0
  1226. while Char.Parent do
  1227. cou=cou+1
  1228. --if cou%2==0 then print(cou) end
  1229. if Hum.Health>0 then
  1230. if Torso.Velocity.y>5 then Torso.Velocity=v3(Torso.Velocity.x,5,Torso.Velocity.z) end
  1231. Walking=v3(Torso.Velocity.x,0,Torso.Velocity.z).magnitude>Hum.WalkSpeed-2 and true or false
  1232. if Walking and LegAnim=='None' then
  1233. WalkAnim=WalkAnim+WalkMulp
  1234. end
  1235. if WalkAnim>0 and not Walking then
  1236. WalkAnim=WalkAnim-1
  1237. elseif WalkAnim<0 and not Walking then
  1238. WalkAnim=WalkAnim+1
  1239. end
  1240. if math.abs(WalkAnim)>=WalkMax then WalkMulp=WalkMulp*-1 end
  1241. local WalkAdj=26
  1242. Neck.C0=Torso.CFrame:toObjectSpace(pHead.CFrame)
  1243. if ArmAnim=='None' then
  1244. SetWeld(wLSho,0,WalkAnim,WalkMax,Oa,Ob,Oa,v3(-WalkAdj*1.5,0,-10),1)
  1245. SetWeld(wLArm,0,WalkAnim,WalkMax,Oc,Od,Oc,v3(10+(WalkAnim>0 and WalkAdj or 0),0,10),1)
  1246. SetWeld(wRSho,0,WalkAnim,WalkMax,Oe,Of,Oe,v3(WalkAdj*1.5,0,10),1)
  1247. SetWeld(wRArm,0,WalkAnim,WalkMax,Og,Oh,Og,v3(10+(WalkAnim>0 and WalkAdj or 0),0,-10),1)
  1248. end
  1249. if LegAnim=='None' then
  1250. SetWeld(wLThi,0,WalkAnim,WalkMax,Oi,Oj,Oi,v3(15+WalkAdj,0,-5),1)
  1251. SetWeld(wLLeg,0,WalkAnim,WalkMax,Ok,Ol,Ok,v3(-15+(WalkAnim>0 and -WalkAdj or 0),0,5),1)
  1252. SetWeld(wRThi,0,WalkAnim,WalkMax,Om,On,Om,v3(15-WalkAdj,0,5),1)
  1253. SetWeld(wRLeg,0,WalkAnim,WalkMax,Oo,Op,Oo,v3(-15+(WalkAnim<0 and WalkAdj or 0),0,-5),1)
  1254. end
  1255. --[[
  1256. for i,v in pairs(Marble) do
  1257. v[1].C0=v[1].C0*ca(MarbleSpeed*v[2],MarbleSpeed*v[3],MarbleSpeed*v[4])
  1258. Marbler=Marbler+(MarbleSpeed*v[2])
  1259. if Marbler>MarbleMax then
  1260. v[2]=v[2]*-1
  1261. v[3]=v[3]*-1
  1262. v[4]=v[4]*-1
  1263. end
  1264. end --]]
  1265. if Anim=='Follow' and Target and Target:findFirstChild'Torso' and not BG.maxTorque~=v3(1,1,1)/0 then
  1266. Hum:MoveTo(Target.Torso.CFrame*cn(2.5*Scale,0,5*Scale).p,Target.Torso)
  1267. end
  1268. if Grabbing and (not Grabbing.Part1 or not Grabbing.Part1.Parent or Grabbing.Part1.Parent:findFirstChild'Humanoid'==nil or Grabbing.Part1.Parent.Humanoid.Health<1) then
  1269. Grabbing:Remove() Grabbing=nil
  1270. end
  1271. end--hleat
  1272. --DoLoop Package
  1273. for i,v in pairs(LoopFunctions) do
  1274. v[2]=v[2]+1
  1275. v[3](v[2]/v[1])
  1276. if v[1]<=v[2] then LoopFunctions[i]=nil end
  1277. end
  1278. local ws=18
  1279. for i=1,#tWS do ws=ws*tWS[i] end
  1280. Hum.WalkSpeed=ws
  1281. if Hum.MaxHealth~=8000 then Hum.MaxHealth=8000 Hum.Health=8000 end
  1282. Hum.Health=Hum.Health+0.1
  1283. wait(0.03)
  1284. end
  1285. ChatConnection:disconnect()
  1286. game:service'Debris':AddItem(script,0.5)
  1287. script.Disabled=true
  1288. ---edits by builderboy256
  1289. editsByBuilderBoy256()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement