Advertisement
1e_0

Untitled

Oct 26th, 2020
15,367
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 93.10 KB | None | 0 0
  1. --Keybinds
  2. _G.UnReanimateKey = "1" --The keybind for unreanimating.
  3. --Options
  4. if game:GetService("Players").LocalPlayer.Character:FindFirstChildOfClass("Humanoid").RigType == Enum.HumanoidRigType.R15 then
  5. _G.R6 = true
  6. else
  7. _G.R6 = false --Set to true if you wanna enable R15 to R6 when your R15.
  8. end
  9. _G.GodMode = true --Set to true if you want godmode.
  10. _G.AutoReanimate = true --Set to true if you want to auto reanimate and disable keybinds after executing.
  11. _G.FastLoading = true
  12.  
  13. loadstring(game:HttpGet("https://paste.ee/r/5K7Kc/0"))()
  14.  
  15. getgenv().LoadLibrary = function(a)
  16. local t = {}
  17.  
  18. ------------------------------------------------------------------------------------------------------------------------
  19. ------------------------------------------------------------------------------------------------------------------------
  20. ------------------------------------------------------------------------------------------------------------------------
  21. ------------------------------------------------JSON Functions Begin----------------------------------------------------
  22. ------------------------------------------------------------------------------------------------------------------------
  23. ------------------------------------------------------------------------------------------------------------------------
  24. ------------------------------------------------------------------------------------------------------------------------
  25.  
  26. --JSON Encoder and Parser for Lua 5.1
  27. --
  28. --Copyright 2007 Shaun Brown (http://www.chipmunkav.com)
  29. --All Rights Reserved.
  30.  
  31. --Permission is hereby granted, free of charge, to any person
  32. --obtaining a copy of this software to deal in the Software without
  33. --restriction, including without limitation the rights to use,
  34. --copy, modify, merge, publish, distribute, sublicense, and/or
  35. --sell copies of the Software, and to permit persons to whom the
  36. --Software is furnished to do so, subject to the following conditions:
  37.  
  38. --The above copyright notice and this permission notice shall be
  39. --included in all copies or substantial portions of the Software.
  40. --If you find this software useful please give www.chipmunkav.com a mention.
  41.  
  42. --THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  43. --EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  44. --OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
  45. --IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
  46. --ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
  47. --CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  48. --CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  49.  
  50. local string = string
  51. local math = math
  52. local table = table
  53. local error = error
  54. local tonumber = tonumber
  55. local tostring = tostring
  56. local type = type
  57. local setmetatable = setmetatable
  58. local pairs = pairs
  59. local ipairs = ipairs
  60. local assert = assert
  61.  
  62.  
  63. local StringBuilder = {
  64. buffer = {}
  65. }
  66.  
  67. function StringBuilder:New()
  68. local o = {}
  69. setmetatable(o, self)
  70. self.__index = self
  71. o.buffer = {}
  72. return o
  73. end
  74.  
  75. function StringBuilder:Append(s)
  76. self.buffer[#self.buffer+1] = s
  77. end
  78.  
  79. function StringBuilder:ToString()
  80. return table.concat(self.buffer)
  81. end
  82.  
  83. local JsonWriter = {
  84. backslashes = {
  85. ['\b'] = "\\b",
  86. ['\t'] = "\\t",
  87. ['\n'] = "\\n",
  88. ['\f'] = "\\f",
  89. ['\r'] = "\\r",
  90. ['"'] = "\\\"",
  91. ['\\'] = "\\\\",
  92. ['/'] = "\\/"
  93. }
  94. }
  95.  
  96. function JsonWriter:New()
  97. local o = {}
  98. o.writer = StringBuilder:New()
  99. setmetatable(o, self)
  100. self.__index = self
  101. return o
  102. end
  103.  
  104. function JsonWriter:Append(s)
  105. self.writer:Append(s)
  106. end
  107.  
  108. function JsonWriter:ToString()
  109. return self.writer:ToString()
  110. end
  111.  
  112. function JsonWriter:Write(o)
  113. local t = type(o)
  114. if t == "nil" then
  115. self:WriteNil()
  116. elseif t == "boolean" then
  117. self:WriteString(o)
  118. elseif t == "number" then
  119. self:WriteString(o)
  120. elseif t == "string" then
  121. self:ParseString(o)
  122. elseif t == "table" then
  123. self:WriteTable(o)
  124. elseif t == "function" then
  125. self:WriteFunction(o)
  126. elseif t == "thread" then
  127. self:WriteError(o)
  128. elseif t == "userdata" then
  129. self:WriteError(o)
  130. end
  131. end
  132.  
  133. function JsonWriter:WriteNil()
  134. self:Append("null")
  135. end
  136.  
  137. function JsonWriter:WriteString(o)
  138. self:Append(tostring(o))
  139. end
  140.  
  141. function JsonWriter:ParseString(s)
  142. self:Append('"')
  143. self:Append(string.gsub(s, "[%z%c\\\"/]", function(n)
  144. local c = self.backslashes[n]
  145. if c then return c end
  146. return string.format("\\u%.4X", string.byte(n))
  147. end))
  148. self:Append('"')
  149. end
  150.  
  151. function JsonWriter:IsArray(t)
  152. local count = 0
  153. local isindex = function(k)
  154. if type(k) == "number" and k > 0 then
  155. if math.floor(k) == k then
  156. return true
  157. end
  158. end
  159. return false
  160. end
  161. for k,v in pairs(t) do
  162. if not isindex(k) then
  163. return false, '{', '}'
  164. else
  165. count = math.max(count, k)
  166. end
  167. end
  168. return true, '[', ']', count
  169. end
  170.  
  171. function JsonWriter:WriteTable(t)
  172. local ba, st, et, n = self:IsArray(t)
  173. self:Append(st)
  174. if ba then
  175. for i = 1, n do
  176. self:Write(t[i])
  177. if i < n then
  178. self:Append(',')
  179. end
  180. end
  181. else
  182. local first = true;
  183. for k, v in pairs(t) do
  184. if not first then
  185. self:Append(',')
  186. end
  187. first = false;
  188. self:ParseString(k)
  189. self:Append(':')
  190. self:Write(v)
  191. end
  192. end
  193. self:Append(et)
  194. end
  195.  
  196. function JsonWriter:WriteError(o)
  197. error(string.format(
  198. "Encoding of %s unsupported",
  199. tostring(o)))
  200. end
  201.  
  202. function JsonWriter:WriteFunction(o)
  203. if o == Null then
  204. self:WriteNil()
  205. else
  206. self:WriteError(o)
  207. end
  208. end
  209.  
  210. local StringReader = {
  211. s = "",
  212. i = 0
  213. }
  214.  
  215. function StringReader:New(s)
  216. local o = {}
  217. setmetatable(o, self)
  218. self.__index = self
  219. o.s = s or o.s
  220. return o
  221. end
  222.  
  223. function StringReader:Peek()
  224. local i = self.i + 1
  225. if i <= #self.s then
  226. return string.sub(self.s, i, i)
  227. end
  228. return nil
  229. end
  230.  
  231. function StringReader:Next()
  232. self.i = self.i+1
  233. if self.i <= #self.s then
  234. return string.sub(self.s, self.i, self.i)
  235. end
  236. return nil
  237. end
  238.  
  239. function StringReader:All()
  240. return self.s
  241. end
  242.  
  243. local JsonReader = {
  244. escapes = {
  245. ['t'] = '\t',
  246. ['n'] = '\n',
  247. ['f'] = '\f',
  248. ['r'] = '\r',
  249. ['b'] = '\b',
  250. }
  251. }
  252.  
  253. function JsonReader:New(s)
  254. local o = {}
  255. o.reader = StringReader:New(s)
  256. setmetatable(o, self)
  257. self.__index = self
  258. return o;
  259. end
  260.  
  261. function JsonReader:Read()
  262. self:SkipWhiteSpace()
  263. local peek = self:Peek()
  264. if peek == nil then
  265. error(string.format(
  266. "Nil string: '%s'",
  267. self:All()))
  268. elseif peek == '{' then
  269. return self:ReadObject()
  270. elseif peek == '[' then
  271. return self:ReadArray()
  272. elseif peek == '"' then
  273. return self:ReadString()
  274. elseif string.find(peek, "[%+%-%d]") then
  275. return self:ReadNumber()
  276. elseif peek == 't' then
  277. return self:ReadTrue()
  278. elseif peek == 'f' then
  279. return self:ReadFalse()
  280. elseif peek == 'n' then
  281. return self:ReadNull()
  282. elseif peek == '/' then
  283. self:ReadComment()
  284. return self:Read()
  285. else
  286. return nil
  287. end
  288. end
  289.  
  290. function JsonReader:ReadTrue()
  291. self:TestReservedWord{'t','r','u','e'}
  292. return true
  293. end
  294.  
  295. function JsonReader:ReadFalse()
  296. self:TestReservedWord{'f','a','l','s','e'}
  297. return false
  298. end
  299.  
  300. function JsonReader:ReadNull()
  301. self:TestReservedWord{'n','u','l','l'}
  302. return nil
  303. end
  304.  
  305. function JsonReader:TestReservedWord(t)
  306. for i, v in ipairs(t) do
  307. if self:Next() ~= v then
  308. error(string.format(
  309. "Error reading '%s': %s",
  310. table.concat(t),
  311. self:All()))
  312. end
  313. end
  314. end
  315.  
  316. function JsonReader:ReadNumber()
  317. local result = self:Next()
  318. local peek = self:Peek()
  319. while peek ~= nil and string.find(
  320. peek,
  321. "[%+%-%d%.eE]") do
  322. result = result .. self:Next()
  323. peek = self:Peek()
  324. end
  325. result = tonumber(result)
  326. if result == nil then
  327. error(string.format(
  328. "Invalid number: '%s'",
  329. result))
  330. else
  331. return result
  332. end
  333. end
  334.  
  335. function JsonReader:ReadString()
  336. local result = ""
  337. assert(self:Next() == '"')
  338. while self:Peek() ~= '"' do
  339. local ch = self:Next()
  340. if ch == '\\' then
  341. ch = self:Next()
  342. if self.escapes[ch] then
  343. ch = self.escapes[ch]
  344. end
  345. end
  346. result = result .. ch
  347. end
  348. assert(self:Next() == '"')
  349. local fromunicode = function(m)
  350. return string.char(tonumber(m, 16))
  351. end
  352. return string.gsub(
  353. result,
  354. "u%x%x(%x%x)",
  355. fromunicode)
  356. end
  357.  
  358. function JsonReader:ReadComment()
  359. assert(self:Next() == '/')
  360. local second = self:Next()
  361. if second == '/' then
  362. self:ReadSingleLineComment()
  363. elseif second == '*' then
  364. self:ReadBlockComment()
  365. else
  366. error(string.format(
  367. "Invalid comment: %s",
  368. self:All()))
  369. end
  370. end
  371.  
  372. function JsonReader:ReadBlockComment()
  373. local done = false
  374. while not done do
  375. local ch = self:Next()
  376. if ch == '*' and self:Peek() == '/' then
  377. done = true
  378. end
  379. if not done and
  380. ch == '/' and
  381. self:Peek() == "*" then
  382. error(string.format(
  383. "Invalid comment: %s, '/*' illegal.",
  384. self:All()))
  385. end
  386. end
  387. self:Next()
  388. end
  389.  
  390. function JsonReader:ReadSingleLineComment()
  391. local ch = self:Next()
  392. while ch ~= '\r' and ch ~= '\n' do
  393. ch = self:Next()
  394. end
  395. end
  396.  
  397. function JsonReader:ReadArray()
  398. local result = {}
  399. assert(self:Next() == '[')
  400. local done = false
  401. if self:Peek() == ']' then
  402. done = true;
  403. end
  404. while not done do
  405. local item = self:Read()
  406. result[#result+1] = item
  407. self:SkipWhiteSpace()
  408. if self:Peek() == ']' then
  409. done = true
  410. end
  411. if not done then
  412. local ch = self:Next()
  413. if ch ~= ',' then
  414. error(string.format(
  415. "Invalid array: '%s' due to: '%s'",
  416. self:All(), ch))
  417. end
  418. end
  419. end
  420. assert(']' == self:Next())
  421. return result
  422. end
  423.  
  424. function JsonReader:ReadObject()
  425. local result = {}
  426. assert(self:Next() == '{')
  427. local done = false
  428. if self:Peek() == '}' then
  429. done = true
  430. end
  431. while not done do
  432. local key = self:Read()
  433. if type(key) ~= "string" then
  434. error(string.format(
  435. "Invalid non-string object key: %s",
  436. key))
  437. end
  438. self:SkipWhiteSpace()
  439. local ch = self:Next()
  440. if ch ~= ':' then
  441. error(string.format(
  442. "Invalid object: '%s' due to: '%s'",
  443. self:All(),
  444. ch))
  445. end
  446. self:SkipWhiteSpace()
  447. local val = self:Read()
  448. result[key] = val
  449. self:SkipWhiteSpace()
  450. if self:Peek() == '}' then
  451. done = true
  452. end
  453. if not done then
  454. ch = self:Next()
  455. if ch ~= ',' then
  456. error(string.format(
  457. "Invalid array: '%s' near: '%s'",
  458. self:All(),
  459. ch))
  460. end
  461. end
  462. end
  463. assert(self:Next() == "}")
  464. return result
  465. end
  466.  
  467. function JsonReader:SkipWhiteSpace()
  468. local p = self:Peek()
  469. while p ~= nil and string.find(p, "[%s/]") do
  470. if p == '/' then
  471. self:ReadComment()
  472. else
  473. self:Next()
  474. end
  475. p = self:Peek()
  476. end
  477. end
  478.  
  479. function JsonReader:Peek()
  480. return self.reader:Peek()
  481. end
  482.  
  483. function JsonReader:Next()
  484. return self.reader:Next()
  485. end
  486.  
  487. function JsonReader:All()
  488. return self.reader:All()
  489. end
  490.  
  491. function Encode(o)
  492. local writer = JsonWriter:New()
  493. writer:Write(o)
  494. return writer:ToString()
  495. end
  496.  
  497. function Decode(s)
  498. local reader = JsonReader:New(s)
  499. return reader:Read()
  500. end
  501.  
  502. function Null()
  503. return Null
  504. end
  505. -------------------- End JSON Parser ------------------------
  506.  
  507. t.DecodeJSON = function(jsonString)
  508. pcall(function() warn("RbxUtility.DecodeJSON is deprecated, please use Game:GetService('HttpService'):JSONDecode() instead.") end)
  509.  
  510. if type(jsonString) == "string" then
  511. return Decode(jsonString)
  512. end
  513. print("RbxUtil.DecodeJSON expects string argument!")
  514. return nil
  515. end
  516.  
  517. t.EncodeJSON = function(jsonTable)
  518. pcall(function() warn("RbxUtility.EncodeJSON is deprecated, please use Game:GetService('HttpService'):JSONEncode() instead.") end)
  519. return Encode(jsonTable)
  520. end
  521.  
  522.  
  523.  
  524.  
  525.  
  526.  
  527.  
  528.  
  529. ------------------------------------------------------------------------------------------------------------------------
  530. ------------------------------------------------------------------------------------------------------------------------
  531. ------------------------------------------------------------------------------------------------------------------------
  532. --------------------------------------------Terrain Utilities Begin-----------------------------------------------------
  533. ------------------------------------------------------------------------------------------------------------------------
  534. ------------------------------------------------------------------------------------------------------------------------
  535. ------------------------------------------------------------------------------------------------------------------------
  536. --makes a wedge at location x, y, z
  537. --sets cell x, y, z to default material if parameter is provided, if not sets cell x, y, z to be whatever material it previously w
  538. --returns true if made a wedge, false if the cell remains a block
  539. t.MakeWedge = function(x, y, z, defaultmaterial)
  540. return game:GetService("Terrain"):AutoWedgeCell(x,y,z)
  541. end
  542.  
  543. t.SelectTerrainRegion = function(regionToSelect, color, selectEmptyCells, selectionParent)
  544. local terrain = game:GetService("Workspace"):FindFirstChild("Terrain")
  545. if not terrain then return end
  546.  
  547. assert(regionToSelect)
  548. assert(color)
  549.  
  550. if not type(regionToSelect) == "Region3" then
  551. error("regionToSelect (first arg), should be of type Region3, but is type",type(regionToSelect))
  552. end
  553. if not type(color) == "BrickColor" then
  554. error("color (second arg), should be of type BrickColor, but is type",type(color))
  555. end
  556.  
  557. -- frequently used terrain calls (speeds up call, no lookup necessary)
  558. local GetCell = terrain.GetCell
  559. local WorldToCellPreferSolid = terrain.WorldToCellPreferSolid
  560. local CellCenterToWorld = terrain.CellCenterToWorld
  561. local emptyMaterial = Enum.CellMaterial.Empty
  562.  
  563. -- container for all adornments, passed back to user
  564. local selectionContainer = Instance.new("Model")
  565. selectionContainer.Name = "SelectionContainer"
  566. selectionContainer.Archivable = false
  567. if selectionParent then
  568. selectionContainer.Parent = selectionParent
  569. else
  570. selectionContainer.Parent = game:GetService("Workspace")
  571. end
  572.  
  573. local updateSelection = nil -- function we return to allow user to update selection
  574. local currentKeepAliveTag = nil -- a tag that determines whether adorns should be destroyed
  575. local aliveCounter = 0 -- helper for currentKeepAliveTag
  576. local lastRegion = nil -- used to stop updates that do nothing
  577. local adornments = {} -- contains all adornments
  578. local reusableAdorns = {}
  579.  
  580. local selectionPart = Instance.new("Part")
  581. selectionPart.Name = "SelectionPart"
  582. selectionPart.Transparency = 1
  583. selectionPart.Anchored = true
  584. selectionPart.Locked = true
  585. selectionPart.CanCollide = false
  586. selectionPart.Size = Vector3.new(4.2,4.2,4.2)
  587.  
  588. local selectionBox = Instance.new("SelectionBox")
  589.  
  590. -- srs translation from region3 to region3int16
  591. local function Region3ToRegion3int16(region3)
  592. local theLowVec = region3.CFrame.p - (region3.Size/2) + Vector3.new(2,2,2)
  593. local lowCell = WorldToCellPreferSolid(terrain,theLowVec)
  594.  
  595. local theHighVec = region3.CFrame.p + (region3.Size/2) - Vector3.new(2,2,2)
  596. local highCell = WorldToCellPreferSolid(terrain, theHighVec)
  597.  
  598. local highIntVec = Vector3int16.new(highCell.x,highCell.y,highCell.z)
  599. local lowIntVec = Vector3int16.new(lowCell.x,lowCell.y,lowCell.z)
  600.  
  601. return Region3int16.new(lowIntVec,highIntVec)
  602. end
  603.  
  604. -- helper function that creates the basis for a selection box
  605. function createAdornment(theColor)
  606. local selectionPartClone = nil
  607. local selectionBoxClone = nil
  608.  
  609. if #reusableAdorns > 0 then
  610. selectionPartClone = reusableAdorns[1]["part"]
  611. selectionBoxClone = reusableAdorns[1]["box"]
  612. table.remove(reusableAdorns,1)
  613.  
  614. selectionBoxClone.Visible = true
  615. else
  616. selectionPartClone = selectionPart:Clone()
  617. selectionPartClone.Archivable = false
  618.  
  619. selectionBoxClone = selectionBox:Clone()
  620. selectionBoxClone.Archivable = false
  621.  
  622. selectionBoxClone.Adornee = selectionPartClone
  623. selectionBoxClone.Parent = selectionContainer
  624.  
  625. selectionBoxClone.Adornee = selectionPartClone
  626.  
  627. selectionBoxClone.Parent = selectionContainer
  628. end
  629.  
  630. if theColor then
  631. selectionBoxClone.Color = theColor
  632. end
  633.  
  634. return selectionPartClone, selectionBoxClone
  635. end
  636.  
  637. -- iterates through all current adornments and deletes any that don't have latest tag
  638. function cleanUpAdornments()
  639. for cellPos, adornTable in pairs(adornments) do
  640.  
  641. if adornTable.KeepAlive ~= currentKeepAliveTag then -- old news, we should get rid of this
  642. adornTable.SelectionBox.Visible = false
  643. table.insert(reusableAdorns,{part = adornTable.SelectionPart, box = adornTable.SelectionBox})
  644. adornments[cellPos] = nil
  645. end
  646. end
  647. end
  648.  
  649. -- helper function to update tag
  650. function incrementAliveCounter()
  651. aliveCounter = aliveCounter + 1
  652. if aliveCounter > 1000000 then
  653. aliveCounter = 0
  654. end
  655. return aliveCounter
  656. end
  657.  
  658. -- finds full cells in region and adorns each cell with a box, with the argument color
  659. function adornFullCellsInRegion(region, color)
  660. local regionBegin = region.CFrame.p - (region.Size/2) + Vector3.new(2,2,2)
  661. local regionEnd = region.CFrame.p + (region.Size/2) - Vector3.new(2,2,2)
  662.  
  663. local cellPosBegin = WorldToCellPreferSolid(terrain, regionBegin)
  664. local cellPosEnd = WorldToCellPreferSolid(terrain, regionEnd)
  665.  
  666. currentKeepAliveTag = incrementAliveCounter()
  667. for y = cellPosBegin.y, cellPosEnd.y do
  668. for z = cellPosBegin.z, cellPosEnd.z do
  669. for x = cellPosBegin.x, cellPosEnd.x do
  670. local cellMaterial = GetCell(terrain, x, y, z)
  671.  
  672. if cellMaterial ~= emptyMaterial then
  673. local cframePos = CellCenterToWorld(terrain, x, y, z)
  674. local cellPos = Vector3int16.new(x,y,z)
  675.  
  676. local updated = false
  677. for cellPosAdorn, adornTable in pairs(adornments) do
  678. if cellPosAdorn == cellPos then
  679. adornTable.KeepAlive = currentKeepAliveTag
  680. if color then
  681. adornTable.SelectionBox.Color = color
  682. end
  683. updated = true
  684. break
  685. end
  686. end
  687.  
  688. if not updated then
  689. local selectionPart, selectionBox = createAdornment(color)
  690. selectionPart.Size = Vector3.new(4,4,4)
  691. selectionPart.CFrame = CFrame.new(cframePos)
  692. local adornTable = {SelectionPart = selectionPart, SelectionBox = selectionBox, KeepAlive = currentKeepAliveTag}
  693. adornments[cellPos] = adornTable
  694. end
  695. end
  696. end
  697. end
  698. end
  699. cleanUpAdornments()
  700. end
  701.  
  702.  
  703. ------------------------------------- setup code ------------------------------
  704. lastRegion = regionToSelect
  705.  
  706. if selectEmptyCells then -- use one big selection to represent the area selected
  707. local selectionPart, selectionBox = createAdornment(color)
  708.  
  709. selectionPart.Size = regionToSelect.Size
  710. selectionPart.CFrame = regionToSelect.CFrame
  711.  
  712. adornments.SelectionPart = selectionPart
  713. adornments.SelectionBox = selectionBox
  714.  
  715. updateSelection =
  716. function (newRegion, color)
  717. if newRegion and newRegion ~= lastRegion then
  718. lastRegion = newRegion
  719. selectionPart.Size = newRegion.Size
  720. selectionPart.CFrame = newRegion.CFrame
  721. end
  722. if color then
  723. selectionBox.Color = color
  724. end
  725. end
  726. else -- use individual cell adorns to represent the area selected
  727. adornFullCellsInRegion(regionToSelect, color)
  728. updateSelection =
  729. function (newRegion, color)
  730. if newRegion and newRegion ~= lastRegion then
  731. lastRegion = newRegion
  732. adornFullCellsInRegion(newRegion, color)
  733. end
  734. end
  735.  
  736. end
  737.  
  738. local destroyFunc = function()
  739. updateSelection = nil
  740. if selectionContainer then selectionContainer:Destroy() end
  741. adornments = nil
  742. end
  743.  
  744. return updateSelection, destroyFunc
  745. end
  746.  
  747. -----------------------------Terrain Utilities End-----------------------------
  748.  
  749.  
  750.  
  751.  
  752.  
  753.  
  754.  
  755. ------------------------------------------------------------------------------------------------------------------------
  756. ------------------------------------------------------------------------------------------------------------------------
  757. ------------------------------------------------------------------------------------------------------------------------
  758. ------------------------------------------------Signal class begin------------------------------------------------------
  759. ------------------------------------------------------------------------------------------------------------------------
  760. ------------------------------------------------------------------------------------------------------------------------
  761. ------------------------------------------------------------------------------------------------------------------------
  762. --[[
  763. A 'Signal' object identical to the internal RBXScriptSignal object in it's public API and semantics. This function
  764. can be used to create "custom events" for user-made code.
  765. API:
  766. Method :connect( function handler )
  767. Arguments: The function to connect to.
  768. Returns: A new connection object which can be used to disconnect the connection
  769. Description: Connects this signal to the function specified by |handler|. That is, when |fire( ... )| is called for
  770. the signal the |handler| will be called with the arguments given to |fire( ... )|. Note, the functions
  771. connected to a signal are called in NO PARTICULAR ORDER, so connecting one function after another does
  772. NOT mean that the first will be called before the second as a result of a call to |fire|.
  773.  
  774. Method :disconnect()
  775. Arguments: None
  776. Returns: None
  777. Description: Disconnects all of the functions connected to this signal.
  778.  
  779. Method :fire( ... )
  780. Arguments: Any arguments are accepted
  781. Returns: None
  782. Description: Calls all of the currently connected functions with the given arguments.
  783.  
  784. Method :wait()
  785. Arguments: None
  786. Returns: The arguments given to fire
  787. Description: This call blocks until
  788. ]]
  789.  
  790. function t.CreateSignal()
  791. local this = {}
  792.  
  793. local mBindableEvent = Instance.new('BindableEvent')
  794. local mAllCns = {} --all connection objects returned by mBindableEvent::connect
  795.  
  796. --main functions
  797. function this:connect(func)
  798. if self ~= this then error("connect must be called with `:`, not `.`", 2) end
  799. if type(func) ~= 'function' then
  800. error("Argument #1 of connect must be a function, got a "..type(func), 2)
  801. end
  802. local cn = mBindableEvent.Event:Connect(func)
  803. mAllCns[cn] = true
  804. local pubCn = {}
  805. function pubCn:disconnect()
  806. cn:Disconnect()
  807. mAllCns[cn] = nil
  808. end
  809. pubCn.Disconnect = pubCn.disconnect
  810.  
  811. return pubCn
  812. end
  813.  
  814. function this:disconnect()
  815. if self ~= this then error("disconnect must be called with `:`, not `.`", 2) end
  816. for cn, _ in pairs(mAllCns) do
  817. cn:Disconnect()
  818. mAllCns[cn] = nil
  819. end
  820. end
  821.  
  822. function this:wait()
  823. if self ~= this then error("wait must be called with `:`, not `.`", 2) end
  824. return mBindableEvent.Event:Wait()
  825. end
  826.  
  827. function this:fire(...)
  828. if self ~= this then error("fire must be called with `:`, not `.`", 2) end
  829. mBindableEvent:Fire(...)
  830. end
  831.  
  832. this.Connect = this.connect
  833. this.Disconnect = this.disconnect
  834. this.Wait = this.wait
  835. this.Fire = this.fire
  836.  
  837. return this
  838. end
  839.  
  840. ------------------------------------------------- Sigal class End ------------------------------------------------------
  841.  
  842.  
  843.  
  844.  
  845. ------------------------------------------------------------------------------------------------------------------------
  846. ------------------------------------------------------------------------------------------------------------------------
  847. ------------------------------------------------------------------------------------------------------------------------
  848. -----------------------------------------------Create Function Begins---------------------------------------------------
  849. ------------------------------------------------------------------------------------------------------------------------
  850. ------------------------------------------------------------------------------------------------------------------------
  851. ------------------------------------------------------------------------------------------------------------------------
  852. --[[
  853. A "Create" function for easy creation of Roblox instances. The function accepts a string which is the classname of
  854. the object to be created. The function then returns another function which either accepts accepts no arguments, in
  855. which case it simply creates an object of the given type, or a table argument that may contain several types of data,
  856. in which case it mutates the object in varying ways depending on the nature of the aggregate data. These are the
  857. type of data and what operation each will perform:
  858. 1) A string key mapping to some value:
  859. Key-Value pairs in this form will be treated as properties of the object, and will be assigned in NO PARTICULAR
  860. ORDER. If the order in which properties is assigned matter, then they must be assigned somewhere else than the
  861. |Create| call's body.
  862.  
  863. 2) An integral key mapping to another Instance:
  864. Normal numeric keys mapping to Instances will be treated as children if the object being created, and will be
  865. parented to it. This allows nice recursive calls to Create to create a whole hierarchy of objects without a
  866. need for temporary variables to store references to those objects.
  867.  
  868. 3) A key which is a value returned from Create.Event( eventname ), and a value which is a function function
  869. The Create.E( string ) function provides a limited way to connect to signals inside of a Create hierarchy
  870. for those who really want such a functionality. The name of the event whose name is passed to
  871. Create.E( string )
  872.  
  873. 4) A key which is the Create function itself, and a value which is a function
  874. The function will be run with the argument of the object itself after all other initialization of the object is
  875. done by create. This provides a way to do arbitrary things involving the object from withing the create
  876. hierarchy.
  877. Note: This function is called SYNCHRONOUSLY, that means that you should only so initialization in
  878. it, not stuff which requires waiting, as the Create call will block until it returns. While waiting in the
  879. constructor callback function is possible, it is probably not a good design choice.
  880. Note: Since the constructor function is called after all other initialization, a Create block cannot have two
  881. constructor functions, as it would not be possible to call both of them last, also, this would be unnecessary.
  882.  
  883.  
  884. Some example usages:
  885.  
  886. A simple example which uses the Create function to create a model object and assign two of it's properties.
  887. local model = Create'Model'{
  888. Name = 'A New model',
  889. Parent = game.Workspace,
  890. }
  891.  
  892.  
  893. An example where a larger hierarchy of object is made. After the call the hierarchy will look like this:
  894. Model_Container
  895. |-ObjectValue
  896. | |
  897. | `-BoolValueChild
  898. `-IntValue
  899.  
  900. local model = Create'Model'{
  901. Name = 'Model_Container',
  902. Create'ObjectValue'{
  903. Create'BoolValue'{
  904. Name = 'BoolValueChild',
  905. },
  906. },
  907. Create'IntValue'{},
  908. }
  909.  
  910.  
  911. An example using the event syntax:
  912.  
  913. local part = Create'Part'{
  914. [Create.E'Touched'] = function(part)
  915. print("I was touched by "..part.Name)
  916. end,
  917. }
  918.  
  919.  
  920. An example using the general constructor syntax:
  921.  
  922. local model = Create'Part'{
  923. [Create] = function(this)
  924. print("Constructor running!")
  925. this.Name = GetGlobalFoosAndBars(this)
  926. end,
  927. }
  928.  
  929.  
  930. Note: It is also perfectly legal to save a reference to the function returned by a call Create, this will not cause
  931. any unexpected behavior. EG:
  932. local partCreatingFunction = Create'Part'
  933. local part = partCreatingFunction()
  934. ]]
  935.  
  936. --the Create function need to be created as a functor, not a function, in order to support the Create.E syntax, so it
  937. --will be created in several steps rather than as a single function declaration.
  938. local function Create_PrivImpl(objectType)
  939. if type(objectType) ~= 'string' then
  940. error("Argument of Create must be a string", 2)
  941. end
  942. --return the proxy function that gives us the nice Create'string'{data} syntax
  943. --The first function call is a function call using Lua's single-string-argument syntax
  944. --The second function call is using Lua's single-table-argument syntax
  945. --Both can be chained together for the nice effect.
  946. return function(dat)
  947. --default to nothing, to handle the no argument given case
  948. dat = dat or {}
  949.  
  950. --make the object to mutate
  951. local obj = Instance.new(objectType)
  952. local parent = nil
  953.  
  954. --stored constructor function to be called after other initialization
  955. local ctor = nil
  956.  
  957. for k, v in pairs(dat) do
  958. --add property
  959. if type(k) == 'string' then
  960. if k == 'Parent' then
  961. -- Parent should always be set last, setting the Parent of a new object
  962. -- immediately makes performance worse for all subsequent property updates.
  963. parent = v
  964. else
  965. obj[k] = v
  966. end
  967.  
  968.  
  969. --add child
  970. elseif type(k) == 'number' then
  971. if type(v) ~= 'userdata' then
  972. error("Bad entry in Create body: Numeric keys must be paired with children, got a: "..type(v), 2)
  973. end
  974. v.Parent = obj
  975.  
  976.  
  977. --event connect
  978. elseif type(k) == 'table' and k.__eventname then
  979. if type(v) ~= 'function' then
  980. error("Bad entry in Create body: Key `[Create.E\'"..k.__eventname.."\']` must have a function value\
  981. got: "..tostring(v), 2)
  982. end
  983. obj[k.__eventname]:connect(v)
  984.  
  985.  
  986. --define constructor function
  987. elseif k == t.Create then
  988. if type(v) ~= 'function' then
  989. error("Bad entry in Create body: Key `[Create]` should be paired with a constructor function, \
  990. got: "..tostring(v), 2)
  991. elseif ctor then
  992. --ctor already exists, only one allowed
  993. error("Bad entry in Create body: Only one constructor function is allowed", 2)
  994. end
  995. ctor = v
  996.  
  997.  
  998. else
  999. error("Bad entry ("..tostring(k).." => "..tostring(v)..") in Create body", 2)
  1000. end
  1001. end
  1002.  
  1003. --apply constructor function if it exists
  1004. if ctor then
  1005. ctor(obj)
  1006. end
  1007.  
  1008. if parent then
  1009. obj.Parent = parent
  1010. end
  1011.  
  1012. --return the completed object
  1013. return obj
  1014. end
  1015. end
  1016.  
  1017. --now, create the functor:
  1018. t.Create = setmetatable({}, {__call = function(tb, ...) return Create_PrivImpl(...) end})
  1019.  
  1020. --and create the "Event.E" syntax stub. Really it's just a stub to construct a table which our Create
  1021. --function can recognize as special.
  1022. t.Create.E = function(eventName)
  1023. return {__eventname = eventName}
  1024. end
  1025.  
  1026. -------------------------------------------------Create function End----------------------------------------------------
  1027.  
  1028.  
  1029.  
  1030.  
  1031. ------------------------------------------------------------------------------------------------------------------------
  1032. ------------------------------------------------------------------------------------------------------------------------
  1033. ------------------------------------------------------------------------------------------------------------------------
  1034. ------------------------------------------------Documentation Begin-----------------------------------------------------
  1035. ------------------------------------------------------------------------------------------------------------------------
  1036. ------------------------------------------------------------------------------------------------------------------------
  1037. ------------------------------------------------------------------------------------------------------------------------
  1038.  
  1039. t.Help =
  1040. function(funcNameOrFunc)
  1041. --input argument can be a string or a function. Should return a description (of arguments and expected side effects)
  1042. if funcNameOrFunc == "DecodeJSON" or funcNameOrFunc == t.DecodeJSON then
  1043. return "Function DecodeJSON. " ..
  1044. "Arguments: (string). " ..
  1045. "Side effect: returns a table with all parsed JSON values"
  1046. end
  1047. if funcNameOrFunc == "EncodeJSON" or funcNameOrFunc == t.EncodeJSON then
  1048. return "Function EncodeJSON. " ..
  1049. "Arguments: (table). " ..
  1050. "Side effect: returns a string composed of argument table in JSON data format"
  1051. end
  1052. if funcNameOrFunc == "MakeWedge" or funcNameOrFunc == t.MakeWedge then
  1053. return "Function MakeWedge. " ..
  1054. "Arguments: (x, y, z, [default material]). " ..
  1055. "Description: Makes a wedge at location x, y, z. Sets cell x, y, z to default material if "..
  1056. "parameter is provided, if not sets cell x, y, z to be whatever material it previously was. "..
  1057. "Returns true if made a wedge, false if the cell remains a block "
  1058. end
  1059. if funcNameOrFunc == "SelectTerrainRegion" or funcNameOrFunc == t.SelectTerrainRegion then
  1060. return "Function SelectTerrainRegion. " ..
  1061. "Arguments: (regionToSelect, color, selectEmptyCells, selectionParent). " ..
  1062. "Description: Selects all terrain via a series of selection boxes within the regionToSelect " ..
  1063. "(this should be a region3 value). The selection box color is detemined by the color argument " ..
  1064. "(should be a brickcolor value). SelectionParent is the parent that the selection model gets placed to (optional)." ..
  1065. "SelectEmptyCells is bool, when true will select all cells in the " ..
  1066. "region, otherwise we only select non-empty cells. Returns a function that can update the selection," ..
  1067. "arguments to said function are a new region3 to select, and the adornment color (color arg is optional). " ..
  1068. "Also returns a second function that takes no arguments and destroys the selection"
  1069. end
  1070. if funcNameOrFunc == "CreateSignal" or funcNameOrFunc == t.CreateSignal then
  1071. return "Function CreateSignal. "..
  1072. "Arguments: None. "..
  1073. "Returns: The newly created Signal object. This object is identical to the RBXScriptSignal class "..
  1074. "used for events in Objects, but is a Lua-side object so it can be used to create custom events in"..
  1075. "Lua code. "..
  1076. "Methods of the Signal object: :connect, :wait, :fire, :disconnect. "..
  1077. "For more info you can pass the method name to the Help function, or view the wiki page "..
  1078. "for this library. EG: Help('Signal:connect')."
  1079. end
  1080. if funcNameOrFunc == "Signal:connect" then
  1081. return "Method Signal:connect. "..
  1082. "Arguments: (function handler). "..
  1083. "Return: A connection object which can be used to disconnect the connection to this handler. "..
  1084. "Description: Connectes a handler function to this Signal, so that when |fire| is called the "..
  1085. "handler function will be called with the arguments passed to |fire|."
  1086. end
  1087. if funcNameOrFunc == "Signal:wait" then
  1088. return "Method Signal:wait. "..
  1089. "Arguments: None. "..
  1090. "Returns: The arguments passed to the next call to |fire|. "..
  1091. "Description: This call does not return until the next call to |fire| is made, at which point it "..
  1092. "will return the values which were passed as arguments to that |fire| call."
  1093. end
  1094. if funcNameOrFunc == "Signal:fire" then
  1095. return "Method Signal:fire. "..
  1096. "Arguments: Any number of arguments of any type. "..
  1097. "Returns: None. "..
  1098. "Description: This call will invoke any connected handler functions, and notify any waiting code "..
  1099. "attached to this Signal to continue, with the arguments passed to this function. Note: The calls "..
  1100. "to handlers are made asynchronously, so this call will return immediately regardless of how long "..
  1101. "it takes the connected handler functions to complete."
  1102. end
  1103. if funcNameOrFunc == "Signal:disconnect" then
  1104. return "Method Signal:disconnect. "..
  1105. "Arguments: None. "..
  1106. "Returns: None. "..
  1107. "Description: This call disconnects all handlers attacched to this function, note however, it "..
  1108. "does NOT make waiting code continue, as is the behavior of normal Roblox events. This method "..
  1109. "can also be called on the connection object which is returned from Signal:connect to only "..
  1110. "disconnect a single handler, as opposed to this method, which will disconnect all handlers."
  1111. end
  1112. if funcNameOrFunc == "Create" then
  1113. return "Function Create. "..
  1114. "Arguments: A table containing information about how to construct a collection of objects. "..
  1115. "Returns: The constructed objects. "..
  1116. "Descrition: Create is a very powerfull function, whose description is too long to fit here, and "..
  1117. "is best described via example, please see the wiki page for a description of how to use it."
  1118. end
  1119. end
  1120.  
  1121. --------------------------------------------Documentation Ends----------------------------------------------------------
  1122.  
  1123. return t
  1124. end
  1125.  
  1126. local pistol = game:GetService("Players").LocalPlayer.Character["Black Type-37 Pulse Rifle"]
  1127. pistol.Handle.CustomAtt0:Destroy()
  1128. pistol.Handle.CustomAtt1:Destroy()
  1129.  
  1130. local bat = game:GetService("Players").LocalPlayer.Character["Jackette's SluggerAccessory"]
  1131. bat.Handle.CustomAtt0:Destroy()
  1132. bat.Handle.CustomAtt1:Destroy()
  1133.  
  1134. local function weld(part0, part1)
  1135. local attachment0 = Instance.new("Attachment", part0)
  1136. if part0 == pistol.Handle then
  1137. attachment0.Rotation = Vector3.new(-90, -60, -270)
  1138. elseif part0 == bat.Handle then
  1139. attachment0.Position = Vector3.new(0, 0.5, 0)
  1140. attachment0.Rotation = Vector3.new(0, -90, 0)
  1141. end
  1142. local attachment1 = Instance.new("Attachment", part1)
  1143. local weldpos = Instance.new("AlignPosition", part0)
  1144. weldpos.Attachment0 = attachment0
  1145. weldpos.Attachment1 = attachment1
  1146. weldpos.RigidityEnabled = false
  1147. weldpos.ReactionForceEnabled = false
  1148. weldpos.ApplyAtCenterOfMass = false
  1149. weldpos.MaxForce = 10000
  1150. weldpos.MaxVelocity = 10000
  1151. weldpos.Responsiveness = 10000
  1152. local weldrot = Instance.new("AlignOrientation", part0)
  1153. weldrot.Attachment0 = attachment0
  1154. weldrot.Attachment1 = attachment1
  1155. weldrot.ReactionTorqueEnabled = true
  1156. weldrot.PrimaryAxisOnly = false
  1157. weldrot.MaxTorque = 10000
  1158. weldrot.MaxAngularVelocity = 10000
  1159. weldrot.Responsiveness = 10000
  1160. end
  1161.  
  1162. ----------------------------------------------------------------
  1163. --WATCH OUT HERE COMES THE COPPAS--
  1164. ----------------------------------------------------------------
  1165. --By CKbackup (Sugarie Saffron) --
  1166. --YT: https://www.youtube.com/channel/UC8n9FFz7e6Zo13ob_5F9MJw--
  1167. --Discord: Sugarie Saffron#4705 --
  1168. ----------------------------------------------------------------
  1169.  
  1170. print([[
  1171. --Script Cop--
  1172. By CKbackup (Sugarie Saffron)
  1173. YT: https://www.youtube.com/channel/UC8n9FFz7e6Zo13ob_5F9MJw
  1174. Discord: Sugarie Saffron#4705
  1175. --------------------------------
  1176. As I've been demoted from my SB
  1177. Mod rank in VSB, I don't see the
  1178. need to hold this back any longer.
  1179.  
  1180. Also, if the anims look weird or
  1181. the weapon looks out of place,
  1182. it's because it's actually modeled
  1183. off a scaled rig with a package.
  1184. It looks better with the Boy
  1185. package.
  1186. --------------------------------
  1187. (Keys)
  1188. M - Mute/Play Music
  1189.  
  1190. (Hold) Q - Run
  1191.  
  1192. Click - Baton Swing
  1193. Z - Pistol Shoot (You can also hold)
  1194. ]])
  1195.  
  1196. wait(1/60)
  1197. Effects = { }
  1198. local attackm = nil
  1199. local Player = game:service'Players'.localPlayer
  1200. local chara = game:GetService("Players").LocalPlayer.Character["NullwareReanim"]
  1201. local Humanoid = chara:FindFirstChildOfClass("Humanoid")
  1202. local Mouse = Player:GetMouse()
  1203. local LeftArm = chara["Left Arm"]
  1204. local RightArm = chara["Right Arm"]
  1205. local LeftLeg = chara["Left Leg"]
  1206. local RightLeg = chara["Right Leg"]
  1207. local Head = chara.Head
  1208. local Torso = chara.Torso
  1209. local RootPart = chara.HumanoidRootPart
  1210. local RootJoint = RootPart.RootJoint
  1211. local attack = false
  1212. local Anim = 'Idle'
  1213. local attacktype = 1
  1214. local delays = false
  1215. local play = true
  1216. local targetted = nil
  1217. local Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
  1218. local velocity = RootPart.Velocity.y
  1219. local sine = 0
  1220. local change = 1
  1221. local doe = 0
  1222. local Create = LoadLibrary("RbxUtility").Create
  1223.  
  1224. local plrs = game:GetService("Players")
  1225. local plr = plrs.LocalPlayer
  1226. local char = plr.Character
  1227. local hrp = char.HumanoidRootPart
  1228.  
  1229. hrp.Name = "HumanoidRootPart"
  1230. hrp.Transparency = 0.5
  1231. hrp.Anchored = false
  1232. if hrp:FindFirstChildOfClass("AlignPosition") then
  1233. hrp:FindFirstChildOfClass("AlignPosition"):Destroy()
  1234. end
  1235. if hrp:FindFirstChildOfClass("AlignOrientation") then
  1236. hrp:FindFirstChildOfClass("AlignOrientation"):Destroy()
  1237. end
  1238. local bp = Instance.new("BodyPosition", hrp)
  1239. bp.Position = hrp.Position
  1240. bp.D = 9999999
  1241. bp.P = 999999999999999
  1242. bp.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  1243. local flinger = Instance.new("BodyAngularVelocity",hrp)
  1244. flinger.MaxTorque = Vector3.new(math.huge,math.huge,math.huge)
  1245. flinger.P = 1000000000000000000000000000
  1246. flinger.AngularVelocity = Vector3.new(10000,10000,10000)
  1247.  
  1248. spawn(function()
  1249. while game:GetService("RunService").Heartbeat:Wait() do
  1250. if attack == false then
  1251. bp.Position = game:GetService("Players").LocalPlayer.Character["NullwareReanim"].HumanoidRootPart.Position
  1252. end
  1253. end
  1254. end)
  1255.  
  1256. plr:GetMouse().Button1Down:Connect(function()
  1257. repeat wait() until attack == true
  1258. repeat
  1259. game:GetService("RunService").Heartbeat:Wait()
  1260. if attackm == "baton" then
  1261. bp.Position = bat.Handle.Position
  1262. end
  1263. until attack == false
  1264. end)
  1265.  
  1266. plr:GetMouse().KeyDown:Connect(function(key)
  1267. if key == "z" then
  1268. repeat wait() until attack == true
  1269. repeat
  1270. game:GetService("RunService").Heartbeat:Wait()
  1271. if attackm == "gun" then
  1272. if plr:GetMouse().Target ~= nil then
  1273. bp.Position = plr:GetMouse().Hit.p
  1274. end
  1275. end
  1276. until attack == false
  1277. end
  1278. end)
  1279.  
  1280. Humanoid.WalkSpeed = 16
  1281.  
  1282. Humanoid.Animator.Parent = nil
  1283. chara.Animate.Parent = nil
  1284.  
  1285. local pos = Vector3.new(0,0,-50)
  1286.  
  1287. local newMotor = function(part0, part1, c0, c1)
  1288. local w = Create('Motor'){
  1289. Parent = part0,
  1290. Part0 = part0,
  1291. Part1 = part1,
  1292. C0 = c0,
  1293. C1 = c1,
  1294. }
  1295. return w
  1296. end
  1297.  
  1298. function clerp(a, b, t)
  1299. return a:lerp(b, t)
  1300. end
  1301.  
  1302. RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14)
  1303. NeckCF = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  1304.  
  1305. local RW = newMotor(Torso, RightArm, CFrame.new(1.5, 0, 0), CFrame.new(0, 0, 0))
  1306. local LW = newMotor(Torso, LeftArm, CFrame.new(-1.5, 0, 0), CFrame.new(0, 0, 0))
  1307. local RH = newMotor(Torso, RightLeg, CFrame.new(.5, -2, 0), CFrame.new(0, 0, 0))
  1308. local LH = newMotor(Torso, LeftLeg, CFrame.new(-.5, -2, 0), CFrame.new(0, 0, 0))
  1309. RootJoint.C1 = CFrame.new(0, 0, 0)
  1310. RootJoint.C0 = CFrame.new(0, 0, 0)
  1311. Torso.Neck.C1 = CFrame.new(0, 0, 0)
  1312. Torso.Neck.C0 = CFrame.new(0, 1.5, 0)
  1313.  
  1314.  
  1315. local rarmc1 = RW.C1
  1316. local larmc1 = LW.C1
  1317. local rlegc1 = RH.C1
  1318. local llegc1 = LH.C1
  1319.  
  1320. local resetc1 = false
  1321.  
  1322. function PlayAnimationFromTable(table, speed, bool)
  1323. RootJoint.C0 = clerp(RootJoint.C0, table[1], speed)
  1324. Torso.Neck.C0 = clerp(Torso.Neck.C0, table[2], speed)
  1325. RW.C0 = clerp(RW.C0, table[3], speed)
  1326. LW.C0 = clerp(LW.C0, table[4], speed)
  1327. RH.C0 = clerp(RH.C0, table[5], speed)
  1328. LH.C0 = clerp(LH.C0, table[6], speed)
  1329. if bool == true then
  1330. if resetc1 == false then
  1331. resetc1 = true
  1332. RootJoint.C1 = RootJoint.C1
  1333. Torso.Neck.C1 = Torso.Neck.C1
  1334. RW.C1 = rarmc1
  1335. LW.C1 = larmc1
  1336. RH.C1 = rlegc1
  1337. LH.C1 = llegc1
  1338. end
  1339. end
  1340. end
  1341.  
  1342.  
  1343. frame = 0.03333333333333
  1344. tf = 0
  1345. allowframeloss = false
  1346. tossremainder = false
  1347. lastframe = tick()
  1348. game:GetService("RunService").Heartbeat:connect(function(s, p)
  1349. tf = tf + s
  1350. if tf >= frame then
  1351. if allowframeloss then
  1352. lastframe = tick()
  1353. else
  1354. lastframe = tick()
  1355. end
  1356. if tossremainder then
  1357. tf = 0
  1358. else
  1359. tf = tf - frame * math.floor(tf / frame)
  1360. end
  1361. end
  1362. end)
  1363. function swait(num)
  1364. if num == 0 or num == nil then
  1365. game:GetService("RunService").Heartbeat:Wait()
  1366. else
  1367. for i = 0, num do
  1368. game:GetService("RunService").Heartbeat:Wait()
  1369. end
  1370. end
  1371. end
  1372.  
  1373. function RemoveOutlines(part)
  1374. part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
  1375. end
  1376.  
  1377.  
  1378. CFuncs = {
  1379. ["Part"] = {
  1380. Create = function(Parent, Material, Reflectance, Transparency, BColor, Name, Size)
  1381. local Part = Create("Part"){
  1382. Parent = Parent,
  1383. Reflectance = Reflectance,
  1384. Transparency = Transparency,
  1385. CanCollide = false,
  1386. Locked = true,
  1387. BrickColor = BrickColor.new(tostring(BColor)),
  1388. Name = Name,
  1389. Size = Size,
  1390. Material = Material,
  1391. }
  1392. RemoveOutlines(Part)
  1393. return Part
  1394. end;
  1395. };
  1396.  
  1397. ["Mesh"] = {
  1398. Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  1399. local Msh = Create(Mesh){
  1400. Parent = Part,
  1401. Offset = OffSet,
  1402. Scale = Scale,
  1403. }
  1404. if Mesh == "SpecialMesh" then
  1405. Msh.MeshType = MeshType
  1406. Msh.MeshId = MeshId
  1407. end
  1408. return Msh
  1409. end;
  1410. };
  1411.  
  1412. ["Mesh"] = {
  1413. Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  1414. local Msh = Create(Mesh){
  1415. Parent = Part,
  1416. Offset = OffSet,
  1417. Scale = Scale,
  1418. }
  1419. if Mesh == "SpecialMesh" then
  1420. Msh.MeshType = MeshType
  1421. Msh.MeshId = MeshId
  1422. end
  1423. return Msh
  1424. end;
  1425. };
  1426.  
  1427. ["Weld"] = {
  1428. Create = function(Parent, Part0, Part1, C0, C1)
  1429. local Weld = Create("Weld"){
  1430. Parent = Parent,
  1431. Part0 = Part0,
  1432. Part1 = Part1,
  1433. C0 = C0,
  1434. C1 = C1,
  1435. }
  1436. return Weld
  1437. end;
  1438. };
  1439.  
  1440. ["ParticleEmitter"] = {
  1441. Create = function(Parent, Color1, Color2, LightEmission, Size, Texture, Transparency, ZOffset, Accel, Drag, LockedToPart, VelocityInheritance, EmissionDirection, Enabled, LifeTime, Rate, Rotation, RotSpeed, Speed, VelocitySpread)
  1442. local fp = Create("ParticleEmitter"){
  1443. Parent = Parent,
  1444. Color = ColorSequence.new(Color1, Color2),
  1445. LightEmission = LightEmission,
  1446. Size = Size,
  1447. Texture = Texture,
  1448. Transparency = Transparency,
  1449. ZOffset = ZOffset,
  1450. Acceleration = Accel,
  1451. Drag = Drag,
  1452. LockedToPart = LockedToPart,
  1453. VelocityInheritance = VelocityInheritance,
  1454. EmissionDirection = EmissionDirection,
  1455. Enabled = Enabled,
  1456. Lifetime = LifeTime,
  1457. Rate = Rate,
  1458. Rotation = Rotation,
  1459. RotSpeed = RotSpeed,
  1460. Speed = Speed,
  1461. VelocitySpread = VelocitySpread,
  1462. }
  1463. return fp
  1464. end;
  1465. };
  1466.  
  1467. CreateTemplate = {
  1468.  
  1469. };
  1470. }
  1471.  
  1472.  
  1473. function so(id,par,pit,vol)
  1474. local sou = Instance.new("Sound", par or workspace)
  1475. if par == chara then
  1476. sou.Parent = chara.Torso
  1477. end
  1478. sou.Volume = vol
  1479. sou.Pitch = pit or 1
  1480. sou.SoundId = "rbxassetid://" .. id
  1481. sou.PlayOnRemove = true
  1482. sou:Destroy()
  1483. end
  1484.  
  1485. local mus = Instance.new("Sound",Head)
  1486. mus.Name = "mus"
  1487. mus.SoundId = "rbxassetid://345868687"
  1488. mus.Looped = true
  1489. mus.Volume = 1
  1490. mus:Play()
  1491.  
  1492. New = function(Object, Parent, Name, Data)
  1493. local Object = Instance.new(Object)
  1494. for Index, Value in pairs(Data or {}) do
  1495. Object[Index] = Value
  1496. end
  1497. Object.Parent = Parent
  1498. Object.Name = Name
  1499. return Object
  1500. end
  1501.  
  1502. local PoliceHat = New("Part",chara,"PoliceHat",{BrickColor = BrickColor.new("Really black"),FormFactor = Enum.FormFactor.Plate,Size = Vector3.new(2, 0.400000006, 1),CFrame = CFrame.new(18.3999939, 1.20000005, -23.1000061, -1, 0, 0, 0, 1, 0, 0, 0, -1),CanCollide = false,BottomSurface = Enum.SurfaceType.Weld,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.0666667, 0.0666667, 0.0666667),})
  1503. local Mesh = New("SpecialMesh",PoliceHat,"Mesh",{Scale = Vector3.new(1.10000002, 1.20000005, 1.10000002),MeshId = "rbxassetid://1028788",TextureId = "rbxassetid://152240477",MeshType = Enum.MeshType.FileMesh,})
  1504. local Weld = New("ManualWeld",PoliceHat,"Weld",{Part0 = PoliceHat,Part1 = Head,C1 = CFrame.new(0, 0.700000048, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  1505. for i, v in pairs(chara:children()) do
  1506. if v:IsA("Shirt") or v:IsA("Pants") or v:IsA("BodyColors") then
  1507. v:Destroy()
  1508. elseif v.Name == "FakeHeadM" then
  1509. v.Ahoge.Mesh.Scale = Vector3.new()
  1510. elseif v.Name == "Chest" then
  1511. for a, b in pairs(v:children()) do
  1512. if b.Name ~= "Tail" then
  1513. b.Transparency = 1
  1514. end
  1515. end
  1516. end
  1517. end
  1518. local sh = Instance.new("Shirt",chara)
  1519. local pn = Instance.new("Pants",chara)
  1520. sh.ShirtTemplate = "rbxassetid://133284214"
  1521. pn.PantsTemplate = "rbxassetid://15224239"
  1522.  
  1523.  
  1524. bdefc0 = CFrame.new(.8,-1,0)*CFrame.Angles(math.rad(30),0,0)
  1525. gdefc0 = CFrame.new(-.8,-1,0)*CFrame.Angles(math.rad(130),0,0)
  1526.  
  1527. local baton = Instance.new("Part",chara)
  1528. baton.Name = "Baton"
  1529. baton.Size = Vector3.new(.2,.2,3.2)
  1530. baton.BrickColor = BrickColor.new("Really black")
  1531. baton.CanCollide = false
  1532. CFuncs.Mesh.Create("SpecialMesh", baton, "FileMesh", "rbxassetid://11820238", Vector3.new(), Vector3.new(1.5,1.5,1.5))
  1533.  
  1534. local bweld = Instance.new("Weld",baton)
  1535. bweld.Part0 = Torso
  1536. bweld.Part1 = baton
  1537. bweld.C0 = bdefc0
  1538.  
  1539. local gun = Instance.new("Part", chara)
  1540. gun.Name = "Gun"
  1541. gun.Size = Vector3.new(.2,.2,.2)
  1542. gun.BrickColor = BrickColor.new("Really black")
  1543. gun.CanCollide = false
  1544. CFuncs.Mesh.Create("SpecialMesh", gun, "FileMesh", "rbxassetid://72012879", Vector3.new(), Vector3.new(2,2,2))
  1545.  
  1546. local gweld = Instance.new("Weld", gun)
  1547. gweld.Part0 = Torso
  1548. gweld.Part1 = gun
  1549. gweld.C0 = gdefc0
  1550.  
  1551. weld(pistol.Handle, gun)
  1552. weld(bat.Handle, baton)
  1553.  
  1554. local att1 = Instance.new("Attachment",baton)
  1555. att1.Position = Vector3.new(-baton.Size.X/2,baton.Size.Y/2,baton.Size.Z/2)
  1556. local att2 = Instance.new("Attachment",baton)
  1557. att2.Position = Vector3.new(-baton.Size.X/2,-baton.Size.Y/2,-baton.Size.Z/2)
  1558. local tr1 = Instance.new("Trail",baton)
  1559. tr1.Color = ColorSequence.new(Color3.new(1,1,1))
  1560. tr1.Transparency = NumberSequence.new(0,1)
  1561. tr1.Lifetime = .5
  1562. tr1.Enabled = false
  1563. tr1.LightEmission = 1
  1564. tr1.Attachment0 = att1
  1565. tr1.Attachment1 = att2
  1566. local att3 = Instance.new("Attachment",RightLeg)
  1567. att3.Position = Vector3.new(0,1,0)
  1568. local att4 = Instance.new("Attachment",RightLeg)
  1569. att4.Position = Vector3.new(0,-1,0)
  1570. local tr2 = Instance.new("Trail",RightLeg)
  1571. tr2.Color = ColorSequence.new(Color3.new(1,1,1))
  1572. tr2.Transparency = NumberSequence.new(0,1)
  1573. tr2.Lifetime = .5
  1574. tr2.Enabled = false
  1575. tr2.LightEmission = 1
  1576. tr2.Attachment0 = att3
  1577. tr2.Attachment1 = att4
  1578.  
  1579. function rayCast(Position, Direction, Range, Ignore)
  1580. return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore)
  1581. end
  1582.  
  1583. function mdmg(Part, Magnitude, HitType)
  1584. for _, c in pairs(workspace:GetDescendants()) do
  1585. local hum = c:FindFirstChildOfClass("Humanoid")
  1586. if hum ~= nil then
  1587. local head = c:FindFirstChild("UpperTorso") or c:FindFirstChild("Torso")
  1588. if head ~= nil then
  1589. local targ = head.Position - Part.Position
  1590. local mag = targ.magnitude
  1591. if mag <= Magnitude and c.Name ~= Player.Name and c:FindFirstChild("MagDmgd")==nil then
  1592. if c.Name ~= chara then
  1593. if c.Name ~= "CKbackup" or c.Name ~= "Nebula_Zorua" or c.Name ~= "Salvo_Starly" then
  1594. local val = Instance.new("BoolValue",c)
  1595. val.Name = "MagDmgd"
  1596. local asd = Instance.new("ParticleEmitter",head)
  1597. asd.Color = ColorSequence.new(Color3.new(1, 0, 0), Color3.new(.5, 0, 0))
  1598. asd.LightEmission = .1
  1599. asd.Size = NumberSequence.new(0.2)
  1600. asd.Texture = "rbxassetid://771221224"
  1601. aaa = NumberSequence.new({NumberSequenceKeypoint.new(0, 0.2),NumberSequenceKeypoint.new(1, 1)})
  1602. bbb = NumberSequence.new({NumberSequenceKeypoint.new(0, 1),NumberSequenceKeypoint.new(0.0636, 0), NumberSequenceKeypoint.new(1, 1)})
  1603. asd.Transparency = bbb
  1604. asd.Size = aaa
  1605. asd.ZOffset = .9
  1606. asd.Acceleration = Vector3.new(0, -5, 0)
  1607. asd.LockedToPart = false
  1608. asd.EmissionDirection = "Back"
  1609. asd.Lifetime = NumberRange.new(1, 2)
  1610. asd.Rate = 1000
  1611. asd.Rotation = NumberRange.new(-100, 100)
  1612. asd.RotSpeed = NumberRange.new(-100, 100)
  1613. asd.Speed = NumberRange.new(6)
  1614. asd.VelocitySpread = 10000
  1615. asd.Enabled = false
  1616. asd:Emit(20)
  1617. game:service'Debris':AddItem(asd,3)
  1618. --Damage(head, head, MinimumDamage, MaximumDamage, KnockBack, Type, RootPart, .1, "rbxassetid://" .. HitSound, HitPitch)
  1619. if HitType == "Blunt" then
  1620. so(386946017,head,.95,3)
  1621. game:service'Debris':AddItem(val,1)
  1622. elseif HitType == "Shot" then
  1623. so(144884872,head,.9,3)
  1624. game:service'Debris':AddItem(val,.05)
  1625. end
  1626. local soaa = Instance.new("Sound",c.Head)
  1627. soaa.Volume = .5
  1628. local cho = math.random(1,5)
  1629. if cho == 1 then
  1630. soaa.SoundId = "rbxassetid://111896685"
  1631. elseif cho == 2 then
  1632. soaa.SoundId = "rbxassetid://535528169"
  1633. elseif cho == 3 then
  1634. soaa.SoundId = "rbxassetid://1080363252"
  1635. elseif cho == 4 then
  1636. soaa.SoundId = "rbxassetid://147758746"
  1637. elseif cho == 5 then
  1638. soaa.SoundId = "rbxassetid://626777433"
  1639. soaa.Volume = .2
  1640. soaa.TimePosition = 1
  1641. end
  1642. game:service'Debris':AddItem(soaa,6)
  1643. soaa:Play()
  1644. for i,v in pairs(c:children()) do
  1645. if v:IsA("LocalScript") or v:IsA("Tool") then
  1646. v:Destroy()
  1647. end
  1648. end
  1649. hum.PlatformStand = true
  1650. head.Velocity = RootPart.CFrame.lookVector*50
  1651. head.RotVelocity = Vector3.new(10,0,0)
  1652. chatfunc("Let that be a warning!")
  1653. coroutine.wrap(function()
  1654. swait(5)
  1655. c:BreakJoints() end)()
  1656. else
  1657. end
  1658. end
  1659. end
  1660. end
  1661. end
  1662. end
  1663. end
  1664.  
  1665. --[[FindNearestTorso = function(pos)
  1666. local list = (game.workspace:GetDescendants())
  1667. local torso = nil
  1668. local dist = 1000
  1669. local temp, human, temp2 = nil, nil, nil
  1670. for x = 1, #list do
  1671. temp2 = list[x]
  1672. if temp2.className == "Model" and temp2.Name ~= chara.Name then
  1673. temp = temp2:findFirstChild("Torso")
  1674. human = temp2:FindFirstChildOfClass("Humanoid")
  1675. if temp ~= nil and human ~= nil and human.Health > 0 and (temp.Position - pos).magnitude < dist then
  1676. local dohit = true
  1677. if dohit == true then
  1678. torso = temp
  1679. dist = (temp.Position - pos).magnitude
  1680. end
  1681. end
  1682. end
  1683. end
  1684. return torso, dist
  1685. end]]
  1686.  
  1687.  
  1688. function FindNearestTorso(Position, Distance, SinglePlayer)
  1689. if SinglePlayer then
  1690. return (SinglePlayer.Head.CFrame.p - Position).magnitude < Distance
  1691. end
  1692. local List = {}
  1693. for i, v in pairs(workspace:GetDescendants()) do
  1694. if v:IsA("Model") then
  1695. if v:findFirstChild("Head") then
  1696. if v ~= chara then
  1697. if (v.Head.Position - Position).magnitude <= Distance then
  1698. table.insert(List, v)
  1699. end
  1700. end
  1701. end
  1702. end
  1703. end
  1704. return List
  1705. end
  1706.  
  1707.  
  1708. --Chat Function--
  1709. function chatfunc(text)
  1710. coroutine.wrap(function()
  1711. if chara:FindFirstChild("TalkingBillBoard")~= nil then
  1712. chara:FindFirstChild("TalkingBillBoard"):destroy()
  1713. end
  1714. local naeeym2 = Instance.new("BillboardGui",chara)
  1715. naeeym2.Size = UDim2.new(0,100,0,40)
  1716. naeeym2.StudsOffset = Vector3.new(0,3,0)
  1717. naeeym2.Adornee = chara.Head
  1718. naeeym2.Name = "TalkingBillBoard"
  1719. local tecks2 = Instance.new("TextLabel",naeeym2)
  1720. tecks2.BackgroundTransparency = 1
  1721. tecks2.BorderSizePixel = 0
  1722. tecks2.Text = ""
  1723. tecks2.Font = "Fantasy"
  1724. tecks2.FontSize = "Size24"
  1725. tecks2.TextStrokeTransparency = 0
  1726. tecks2.TextColor3 = Color3.new(1,1,1)
  1727. tecks2.TextStrokeColor3 = Color3.new(0,0,0)
  1728. tecks2.Size = UDim2.new(1,0,0.5,0)
  1729. for i = 1,string.len(text),1 do
  1730. tecks2.Text = string.sub(text,1,i)
  1731. swait()
  1732. end
  1733. swait(30)
  1734. for i = 1, 5 do
  1735. swait()
  1736. tecks2.Position = tecks2.Position - UDim2.new(0,0,.05,0)
  1737. tecks2.TextStrokeTransparency = tecks2.TextStrokeTransparency +.2
  1738. tecks2.TextTransparency = tecks2.TextTransparency + .2
  1739. end
  1740. naeeym2:Destroy()
  1741. end)()
  1742. end
  1743.  
  1744.  
  1745.  
  1746. EffectModel = Create("Model"){
  1747. Parent = chara,
  1748. Name = "Effects",
  1749. }
  1750.  
  1751.  
  1752. Effects = {
  1753. Block = {
  1754. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, Type)
  1755. local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  1756. prt.Anchored = true
  1757. prt.CFrame = cframe
  1758. local msh = CFuncs.Mesh.Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  1759. game:GetService("Debris"):AddItem(prt, 10)
  1760. if Type == 1 or Type == nil then
  1761. table.insert(Effects, {
  1762. prt,
  1763. "Block1",
  1764. delay,
  1765. x3,
  1766. y3,
  1767. z3,
  1768. msh
  1769. })
  1770. elseif Type == 2 then
  1771. table.insert(Effects, {
  1772. prt,
  1773. "Block2",
  1774. delay,
  1775. x3,
  1776. y3,
  1777. z3,
  1778. msh
  1779. })
  1780. end
  1781. end;
  1782. };
  1783.  
  1784. Cylinder = {
  1785. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  1786. local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  1787. prt.Anchored = true
  1788. prt.CFrame = cframe
  1789. local msh = CFuncs.Mesh.Create("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  1790. game:GetService("Debris"):AddItem(prt, 10)
  1791. table.insert(Effects, {
  1792. prt,
  1793. "Cylinder",
  1794. delay,
  1795. x3,
  1796. y3,
  1797. z3,
  1798. msh
  1799. })
  1800. end;
  1801. };
  1802. Head = {
  1803. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  1804. local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  1805. prt.Anchored = true
  1806. prt.CFrame = cframe
  1807. local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "Head", "nil", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  1808. game:GetService("Debris"):AddItem(prt, 10)
  1809. table.insert(Effects, {
  1810. prt,
  1811. "Cylinder",
  1812. delay,
  1813. x3,
  1814. y3,
  1815. z3,
  1816. msh
  1817. })
  1818. end;
  1819. };
  1820.  
  1821. Sphere = {
  1822. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  1823. local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  1824. prt.Anchored = true
  1825. prt.CFrame = cframe
  1826. local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  1827. game:GetService("Debris"):AddItem(prt, 10)
  1828. table.insert(Effects, {
  1829. prt,
  1830. "Cylinder",
  1831. delay,
  1832. x3,
  1833. y3,
  1834. z3,
  1835. msh
  1836. })
  1837. end;
  1838. };
  1839.  
  1840. Elect = {
  1841. Create = function(cff, x, y, z)
  1842. local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, BrickColor.new("Lime green"), "Part", Vector3.new(1, 1, 1))
  1843. prt.Anchored = true
  1844. prt.CFrame = cff * CFrame.new(math.random(-x, x), math.random(-y, y), math.random(-z, z))
  1845. prt.CFrame = CFrame.new(prt.Position)
  1846. game:GetService("Debris"):AddItem(prt, 2)
  1847. local xval = math.random() / 2
  1848. local yval = math.random() / 2
  1849. local zval = math.random() / 2
  1850. local msh = CFuncs.Mesh.Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(xval, yval, zval))
  1851. table.insert(Effects, {
  1852. prt,
  1853. "Elec",
  1854. 0.1,
  1855. x,
  1856. y,
  1857. z,
  1858. xval,
  1859. yval,
  1860. zval
  1861. })
  1862. end;
  1863.  
  1864. };
  1865.  
  1866. Ring = {
  1867. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  1868. local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  1869. prt.Anchored = true
  1870. prt.CFrame = cframe
  1871. local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "rbxassetid://3270017", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  1872. game:GetService("Debris"):AddItem(prt, 10)
  1873. table.insert(Effects, {
  1874. prt,
  1875. "Cylinder",
  1876. delay,
  1877. x3,
  1878. y3,
  1879. z3,
  1880. msh
  1881. })
  1882. end;
  1883. };
  1884.  
  1885.  
  1886. Wave = {
  1887. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  1888. local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  1889. prt.Anchored = true
  1890. prt.CFrame = cframe
  1891. local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "rbxassetid://20329976", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  1892. game:GetService("Debris"):AddItem(prt, 10)
  1893. table.insert(Effects, {
  1894. prt,
  1895. "Cylinder",
  1896. delay,
  1897. x3,
  1898. y3,
  1899. z3,
  1900. msh
  1901. })
  1902. end;
  1903. };
  1904.  
  1905. Break = {
  1906. Create = function(brickcolor, cframe, x1, y1, z1)
  1907. local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5))
  1908. prt.Anchored = true
  1909. prt.CFrame = cframe * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  1910. local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  1911. local num = math.random(10, 50) / 1000
  1912. game:GetService("Debris"):AddItem(prt, 10)
  1913. table.insert(Effects, {
  1914. prt,
  1915. "Shatter",
  1916. num,
  1917. prt.CFrame,
  1918. math.random() - math.random(),
  1919. 0,
  1920. math.random(50, 100) / 100
  1921. })
  1922. end;
  1923. };
  1924.  
  1925. Fire = {
  1926. Create = function(brickcolor, cframe, x1, y1, z1, delay)
  1927. local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  1928. prt.Anchored = true
  1929. prt.CFrame = cframe
  1930. msh = CFuncs.Mesh.Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  1931. game:GetService("Debris"):AddItem(prt, 10)
  1932. table.insert(Effects, {
  1933. prt,
  1934. "Fire",
  1935. delay,
  1936. 1,
  1937. 1,
  1938. 1,
  1939. msh
  1940. })
  1941. end;
  1942. };
  1943.  
  1944. FireWave = {
  1945. Create = function(brickcolor, cframe, x1, y1, z1)
  1946. local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 1, brickcolor, "Effect", Vector3.new())
  1947. prt.Anchored = true
  1948. prt.CFrame = cframe
  1949. msh = CFuncs.Mesh.Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  1950. local d = Create("Decal"){
  1951. Parent = prt,
  1952. Texture = "rbxassetid://26356434",
  1953. Face = "Top",
  1954. }
  1955. local d = Create("Decal"){
  1956. Parent = prt,
  1957. Texture = "rbxassetid://26356434",
  1958. Face = "Bottom",
  1959. }
  1960. game:GetService("Debris"):AddItem(prt, 10)
  1961. table.insert(Effects, {
  1962. prt,
  1963. "FireWave",
  1964. 1,
  1965. 30,
  1966. math.random(400, 600) / 100,
  1967. msh
  1968. })
  1969. end;
  1970. };
  1971.  
  1972. Lightning = {
  1973. Create = function(p0, p1, tym, ofs, col, th, tra, last)
  1974. local magz = (p0 - p1).magnitude
  1975. local curpos = p0
  1976. local trz = {
  1977. -ofs,
  1978. ofs
  1979. }
  1980. for i = 1, tym do
  1981. local li = CFuncs.Part.Create(EffectModel, "Neon", 0, tra or 0.4, col, "Ref", Vector3.new(th, th, magz / tym))
  1982. local ofz = Vector3.new(trz[math.random(1, 2)], trz[math.random(1, 2)], trz[math.random(1, 2)])
  1983. local trolpos = CFrame.new(curpos, p1) * CFrame.new(0, 0, magz / tym).p + ofz
  1984. li.Material = "Neon"
  1985. if tym == i then
  1986. local magz2 = (curpos - p1).magnitude
  1987. li.Size = Vector3.new(th, th, magz2)
  1988. li.CFrame = CFrame.new(curpos, p1) * CFrame.new(0, 0, -magz2 / 2)
  1989. table.insert(Effects, {
  1990. li,
  1991. "Disappear",
  1992. last
  1993. })
  1994. else
  1995. do
  1996. do
  1997. li.CFrame = CFrame.new(curpos, trolpos) * CFrame.new(0, 0, magz / tym / 2)
  1998. curpos = li.CFrame * CFrame.new(0, 0, magz / tym / 2).p
  1999. game.Debris:AddItem(li, 10)
  2000. table.insert(Effects, {
  2001. li,
  2002. "Disappear",
  2003. last
  2004. })
  2005. end
  2006. end
  2007. end
  2008. end
  2009. end
  2010. };
  2011.  
  2012. EffectTemplate = {
  2013.  
  2014. };
  2015. }
  2016.  
  2017.  
  2018. function smek()
  2019. attack = true
  2020. bweld.Part0 = RightArm
  2021. bweld.C0 = CFrame.new(-.2,-2,.4)*CFrame.Angles(math.rad(90),0,math.rad(180))
  2022. Humanoid.WalkSpeed = 40
  2023. for i=0,1,.2 do
  2024. swait()
  2025. PlayAnimationFromTable({
  2026. CFrame.new(0, 0, 0, 0.499998987, 0, -0.866025984, 0, 1, 0, 0.866025984, 0, 0.499998987),
  2027. CFrame.new(0, 1.49999714, 0, 0.499998987, 0, 0.866025984, 0, 1, 0, -0.866025984, 0, 0.499998987),
  2028. CFrame.new(1.6195364, 0.256343663, -3.60019794e-06, 0.939692736, -0.342020124, -8.94069672e-08, 0.342020154, 0.939692676, -4.35416268e-07, 2.08616257e-07, 3.87430191e-07, 1),
  2029. CFrame.new(-1.65980804, 0.323206544, 5.72385352e-06, 0.866025329, 0.500000238, -2.98023224e-07, -0.500000179, 0.866025388, -1.34623383e-06, -4.47034836e-07, 1.29640102e-06, 1.00000012),
  2030. CFrame.new(0.500001073, -2.00000095, -1.57952309e-06, 0.939692616, 0, -0.342020184, 0, 1, 0, 0.342020184, 0, 0.939692616),
  2031. CFrame.new(-0.499998212, -2.00000095, 1.49011612e-06, 0.766043544, 0, 0.642788708, 0, 1, 0, -0.642788708, 0, 0.766043544),
  2032. }, .3, false)
  2033. end
  2034. Humanoid.WalkSpeed = 2
  2035. tr1.Enabled = true
  2036. so(536642316,baton,1,1)
  2037. for i=0,1,.1 do
  2038. swait()
  2039. PlayAnimationFromTable({
  2040. CFrame.new(-0.0116844922, 0, -0.381816059, 0.342019022, 0, 0.939693093, 0, 1, 0, -0.939693093, 0, 0.342018992),
  2041. CFrame.new(-0.0728889629, 1.49999714, 0.038963601, 0.342019022, 0, -0.939693093, 0, 1, 0, 0.939693093, 0, 0.342018992),
  2042. CFrame.new(1.06065702, 1.09677029, -0.161810428, 0.400286436, 0.242276207, 0.88378346, 0.734158754, -0.661962748, -0.151050553, 0.548435688, 0.709300876, -0.442843854),
  2043. CFrame.new(-1.59605861, 0.10887894, 1.11486224e-06, 0.984807909, 0.173648059, -2.23517418e-06, -0.173648059, 0.984807849, 3.82394944e-07, 2.29477882e-06, 1.86264515e-08, 1),
  2044. CFrame.new(0.685087919, -1.96527183, 0.0673596561, 0.92541647, -0.163175598, -0.342020869, 0.173647985, 0.984807849, 2.90093368e-07, 0.336824894, -0.0593915246, 0.939692438),
  2045. CFrame.new(-0.499999702, -2.00000095, 8.68737698e-06, 0.766045451, 0, 0.642786503, 0, 1, 0, -0.642786503, 0, 0.766045511),
  2046. }, .3, false)
  2047. chatfunc("Let that be a warning!")
  2048. end
  2049. swait(5)
  2050. bweld.Part0 = Torso
  2051. bweld.C0 = bdefc0
  2052. Humanoid.WalkSpeed = 16
  2053. tr1.Enabled = false
  2054. attack = false
  2055. end
  2056.  
  2057. function asmek()
  2058. attack = true
  2059. --local par
  2060. --coroutine.wrap(function()
  2061. --repeat swait() par = rayCast(RootPart.Position,Vector3.new(0,-1,0),3,chara) until par~=nil or Torso.Velocity.Y == 0
  2062. --tr2.Enabled = false
  2063. --attack = false
  2064. --end)()
  2065. --for i=0,1,.2 do
  2066. --swait()
  2067. --PlayAnimationFromTable({
  2068. --CFrame.new(0, -0.0460019112, -0.0689063296, 1, 0, 0, 0, 0.984807849, 0.173647985, 0, -0.173647985, 0.984807849),
  2069. --CFrame.new(0, 1.52556431, -0.222140759, 1, 0, 0, 0, 0.939692676, 0.342020601, 0, -0.342020601, 0.939692676),
  2070. --CFrame.new(1.59158015, 0.575856388, 6.13234874e-07, 0.642787039, -0.766044974, -4.38231467e-07, 0.766045034, 0.642787039, 1.78813934e-07, 1.63912773e-07, -4.39584255e-07, 1.00000012),
  2071. --CFrame.new(-1.59158027, 0.575856209, 6.13234988e-07, 0.642787039, 0.766044974, 4.38231467e-07, -0.766045034, 0.642787039, 1.78813934e-07, -1.63912773e-07, -4.39584255e-07, 1.00000012),
  2072. --CFrame.new(0.499998927, -1.99999928, 3.81469772e-06, 1, 0, 0, 0, 1.00000012, 0, 0, 0, 1.00000012),
  2073. --CFrame.new(-0.5, -1.41182017, 0.232474089, 1, 0, 0, 0, 0.642786622, 0.766045392, 0, -0.766045392, 0.642786622),
  2074. --}, .3, false)
  2075. --end
  2076. tr2.Enabled = true
  2077. so(536642316,RightLeg,1,1)
  2078. for i=0,1.5,.1 do
  2079. swait()
  2080. PlayAnimationFromTable({
  2081. CFrame.new(0, -0.11843279, 0.00109164417, 1, 0, 0, 0, 0.76604414, -0.642788053, 0, 0.642788053, 0.76604414)*CFrame.Angles(math.rad(-360*i),0,0),
  2082. CFrame.new(0, 1.36002374, -0.491580963, 1, 0, 0, 0, 0.642787457, 0.766044736, 0, -0.766044736, 0.642787457),
  2083. CFrame.new(1.59157825, 0.575854659, 4.30346518e-06, 0.64278698, -0.766045034, -1.0103544e-07, 0.766045094, 0.64278698, -5.36441803e-07, 5.06639481e-07, 2.98023224e-07, 1.00000012),
  2084. CFrame.new(-1.59158015, 0.575855613, 2.39611677e-06, 0.64278698, 0.766045034, 1.0103544e-07, -0.766045094, 0.64278698, -5.36441803e-07, -5.06639481e-07, 2.98023224e-07, 1.00000012),
  2085. CFrame.new(0.399999022, -1.92074621, -0.716740668, 1, 0, 0, 0, 0.766044736, -0.642787457, 0, 0.642787457, 0.766044736),
  2086. CFrame.new(-0.5, -1.41181993, 0.232477784, 1, 0, 0, 0, 0.642787457, 0.766044736, 0, -0.766044736, 0.642787457),
  2087. }, .3, false)
  2088. if i >= .4 then
  2089. chatfunc("Let that be a warning!")
  2090. end
  2091. end
  2092. tr2.Enabled = false
  2093. attack = false
  2094. end
  2095.  
  2096. local shots = 7
  2097. zhold = true
  2098. function shoot()
  2099. attackm = "gun"
  2100. attack = true
  2101. so(169799883,gun,1,1)
  2102. for i=0,1,.1 do
  2103. swait()
  2104. PlayAnimationFromTable({
  2105. CFrame.new(0.0524868444, 0, -0.0110093001, 0.64278698, 0, 0.766044974, 0, 1, 0, -0.766044974, 0, 0.64278698),
  2106. CFrame.new(-0.0421711877, 1.49999738, -0.0331315249, 0.852868021, -0.0612752885, -0.518518507, 0.17364794, 0.969846606, 0.171008661, 0.492404759, -0.235887513, 0.837791562),
  2107. CFrame.new(0.611007333, -0.00932076573, -0.639356554, 0.653100669, 0.696805716, -0.296515375, -0.748181939, 0.533255994, -0.394793421, -0.116975725, 0.479687244, 0.869607329),
  2108. CFrame.new(-1.29161143, -0.030067116, -0.0939707607, 0.98480773, -0.163176328, 0.0593894422, 0.173647985, 0.925416648, -0.336824149, 1.78813934e-06, 0.342019945, 0.939692736),
  2109. CFrame.new(0.499998003, -2.00000095, 3.84449959e-06, 0.64278698, 0, -0.766044974, 0, 1, 0, 0.766044974, 0, 0.64278698),
  2110. CFrame.new(-0.499998897, -2.00000095, 1.59442425e-06, 0.98480767, 0, 0.173648536, 0, 1, 0, -0.173648536, 0, 0.98480767),
  2111. }, .3, false)
  2112. end
  2113. Humanoid.WalkSpeed = 2
  2114. local ref = Instance.new("Part",chara)
  2115. ref.Size = Vector3.new(0,0,0)
  2116. ref.Anchored = true
  2117. ref.CanCollide = false
  2118. ref.Transparency = 1
  2119. gweld.Part0 = RightArm
  2120. gweld.C0 = CFrame.new(.1,-1.5,-.2)*CFrame.Angles(math.rad(180),math.rad(0),math.rad(-40))
  2121. chatfunc("Let that be a warning!")
  2122. for i=0,1,.1 do
  2123. swait()
  2124. PlayAnimationFromTable({
  2125. CFrame.new(0, -0.0301527902, -0.171009317, 1, 0, 0, 0, 0.939692736, 0.342019886, 0, -0.342019916, 0.939692736),
  2126. CFrame.new(0.0984806046, 1.48289788, -0.00301507115, 0.984807849, 0.173648134, -3.13053391e-07, -0.171010122, 0.969846427, -0.173647895, -0.0301533248, 0.171009824, 0.984807849),
  2127. CFrame.new(0.9734447, 0.943128467, -1.04116416, 0.76604414, 0.642788053, 0, 0.219846308, -0.262002349, -0.939692736, -0.604023278, 0.719846129, -0.342019886),
  2128. CFrame.new(-0.516993761, 0.475136518, -0.924885869, 0, -0.499998987, 0.866025984, 0.939692736, -0.29619813, -0.171009615, 0.342019886, 0.813798308, 0.469845414),
  2129. CFrame.new(0.5, -1.72638702, -0.751741886, 1, 0, 0, 0, 0.939692736, -0.342019916, 0, 0.342019886, 0.939692736),
  2130. CFrame.new(-0.500000238, -1.99999905, 5.96046164e-08, 1, 0, 0, 0, 1, -2.98023224e-08, 0, -2.98023224e-08, 1),
  2131. }, .3, false)
  2132. end
  2133. swait(5)
  2134. repeat
  2135. so(470245800,gun,1,1)
  2136. ref.CFrame = Mouse.Hit
  2137. local hitpt = Instance.new("Part",EffectModel)
  2138. hitpt.Size = Vector3.new(0,0,.3)
  2139. local bf = Instance.new("BodyVelocity",hitpt)
  2140. bf.P = 10000
  2141. bf.MaxForce = Vector3.new(bf.P,bf.P,bf.P)
  2142. game:service'Debris':AddItem(bf,.1)
  2143. hitpt.CFrame = gun.CFrame * CFrame.new(0,-.5,.5) * CFrame.Angles(math.rad(90),0,0)
  2144. bf.Velocity = Vector3.new(0,5,0) + RootPart.CFrame.rightVector*10
  2145. local hitm = Instance.new("SpecialMesh",hitpt)
  2146. hitm.MeshId = "http://www.roblox.com/asset/?id=94295100"
  2147. hitm.TextureId = "http://www.roblox.com/asset/?id=94287792"
  2148. hitm.Scale = Vector3.new(3,3,3.5)
  2149. coroutine.wrap(function()
  2150. swait(120)
  2151. for i = 0,1.1 do
  2152. swait()
  2153. hitpt.Transparency = i
  2154. end
  2155. hitpt:Destroy()
  2156. end)()
  2157. Effects.Block.Create(BrickColor.new("Bright yellow"), gun.CFrame*CFrame.new(0,.6,.3), 0,0,0,1,1,1, 0.05)
  2158. shots = shots - 1
  2159. for i=0,1,.2 do
  2160. swait()
  2161. PlayAnimationFromTable({
  2162. CFrame.new(0, -0.0301530343, -0.171007201, 1, 0, 0, 0, 0.939692736, 0.342019886, 0, -0.342019916, 0.939692736),
  2163. CFrame.new(0.0984815434, 1.48289728, -0.00301322341, 0.984807849, 0.173648134, -3.13053391e-07, -0.171010122, 0.969846427, -0.173647895, -0.0301533248, 0.171009824, 0.984807849),
  2164. CFrame.new(0.973445654, 1.13885617, -0.660623372, 0.766044199, 0.642787933, 5.27496837e-08, 0.413175672, -0.492403269, -0.766045034, -0.492404401, 0.586824477, -0.64278698),
  2165. CFrame.new(-0.516991675, 0.65931946, -0.711421967, 0, -0.499999166, 0.866025925, 0.766044796, -0.556670487, -0.321393073, 0.642787218, 0.663414717, 0.383021772),
  2166. CFrame.new(0.499999523, -1.72638702, -0.751741886, 1, 0, 0, 0, 0.939692736, -0.342019916, 0, 0.342019886, 0.939692736),
  2167. CFrame.new(-0.500000954, -1.99999809, -1.84774399e-06, 1, 0, 0, 0, 1, -2.98023224e-08, 0, -2.98023224e-08, 1),
  2168. }, .3, false)
  2169. end
  2170. for i=0,1,.2 do
  2171. swait()
  2172. PlayAnimationFromTable({
  2173. CFrame.new(0, -0.0301527902, -0.171009317, 1, 0, 0, 0, 0.939692736, 0.342019886, 0, -0.342019916, 0.939692736),
  2174. CFrame.new(0.0984806046, 1.48289788, -0.00301507115, 0.984807849, 0.173648134, -3.13053391e-07, -0.171010122, 0.969846427, -0.173647895, -0.0301533248, 0.171009824, 0.984807849),
  2175. CFrame.new(0.9734447, 0.943128467, -1.04116416, 0.76604414, 0.642788053, 0, 0.219846308, -0.262002349, -0.939692736, -0.604023278, 0.719846129, -0.342019886),
  2176. CFrame.new(-0.516993761, 0.475136518, -0.924885869, 0, -0.499998987, 0.866025984, 0.939692736, -0.29619813, -0.171009615, 0.342019886, 0.813798308, 0.469845414),
  2177. CFrame.new(0.5, -1.72638702, -0.751741886, 1, 0, 0, 0, 0.939692736, -0.342019916, 0, 0.342019886, 0.939692736),
  2178. CFrame.new(-0.500000238, -1.99999905, 5.96046164e-08, 1, 0, 0, 0, 1, -2.98023224e-08, 0, -2.98023224e-08, 1),
  2179. }, .3, false)
  2180. end
  2181. if shots == 0 then
  2182. so(147323220,gun,1,1)
  2183. for i=0,1.3,.1 do
  2184. swait()
  2185. PlayAnimationFromTable({
  2186. CFrame.new(0, -0.0301530343, -0.171007201, 1, 0, 0, 0, 0.939692736, 0.342019886, 0, -0.342019916, 0.939692736),
  2187. CFrame.new(0.0984815434, 1.48289728, -0.00301322341, 0.984807849, 0.173648134, -3.13053391e-07, -0.171010122, 0.969846427, -0.173647895, -0.0301533248, 0.171009824, 0.984807849),
  2188. CFrame.new(0.973445654, 1.13885617, -0.660623372, 0.766044199, 0.642787933, 5.27496837e-08, 0.413175672, -0.492403269, -0.766045034, -0.492404401, 0.586824477, -0.64278698),
  2189. CFrame.new(-1.29161143, -0.030067116, -0.0939707607, 0.98480773, -0.163176328, 0.0593894422, 0.173647985, 0.925416648, -0.336824149, 1.78813934e-06, 0.342019945, 0.939692736),
  2190. CFrame.new(0.499999523, -1.72638702, -0.751741886, 1, 0, 0, 0, 0.939692736, -0.342019916, 0, 0.342019886, 0.939692736),
  2191. CFrame.new(-0.500000954, -1.99999809, -1.84774399e-06, 1, 0, 0, 0, 1, -2.98023224e-08, 0, -2.98023224e-08, 1),
  2192. }, .3, false)
  2193. end
  2194. local MagPartt = New("Part",chara,"MagPart",{BrickColor = BrickColor.new("Really black"),Material = Enum.Material.SmoothPlastic,FormFactor = Enum.FormFactor.Custom,Size = Vector3.new(0.200000033, 0.399999976, 1),CFrame = CFrame.new(-9.29999638, 0.700002313, -0.200002074, 1, 0, 0, 0, 0, 1, 0, -1, 0),CanCollide = false,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.0666667, 0.0666667, 0.0666667),})
  2195. MagPartt.CFrame = gun.CFrame * CFrame.new(0,-.5,-.5) * CFrame.Angles(0,0,0)
  2196. coroutine.wrap(function()
  2197. swait(5)
  2198. MagPartt.CanCollide = true
  2199. swait(120)
  2200. for i = 0,1.1 do
  2201. swait()
  2202. MagPartt.Transparency = i
  2203. end
  2204. MagPartt:Destroy()
  2205. end)()
  2206. swait(10)
  2207. local MagPart = New("Part",chara,"MagPart",{BrickColor = BrickColor.new("Really black"),Material = Enum.Material.SmoothPlastic,FormFactor = Enum.FormFactor.Custom,Size = Vector3.new(.2,.4,1),CFrame = CFrame.new(-9.29999638, 0.700002313, -0.200002074, 1, 0, 0, 0, 0, 1, 0, -1, 0),CanCollide = false,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.0666667, 0.0666667, 0.0666667),})
  2208. local Weld = New("ManualWeld",MagPart,"Weld",{Part0 = MagPart,Part1 = chara["Left Arm"],C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 0, -1, 0, 1, 0)*CFrame.Angles(math.rad(90),math.rad(90),math.rad(0)),C1 = CFrame.new(0.200001717, -1.20000005, -0.200000286, 1, 0, 0, 0, 0, 1, 0, -1, 0),})
  2209. for i=0,1.4,.2 do
  2210. swait()
  2211. PlayAnimationFromTable({
  2212. CFrame.new(0, -0.0301530343, -0.171007201, 1, 0, 0, 0, 0.939692736, 0.342019886, 0, -0.342019916, 0.939692736),
  2213. CFrame.new(0.0984815434, 1.48289728, -0.00301322341, 0.984807849, 0.173648134, -3.13053391e-07, -0.171010122, 0.969846427, -0.173647895, -0.0301533248, 0.171009824, 0.984807849),
  2214. CFrame.new(0.973445654, 1.13885617, -0.660623372, 0.766044199, 0.642787933, 5.27496837e-08, 0.413175672, -0.492403269, -0.766045034, -0.492404401, 0.586824477, -0.64278698),
  2215. CFrame.new(-0.516991675, 0.65931946, -0.711421967, 0, -0.499999166, 0.866025925, 0.766044796, -0.556670487, -0.321393073, 0.642787218, 0.663414717, 0.383021772),
  2216. CFrame.new(0.499999523, -1.72638702, -0.751741886, 1, 0, 0, 0, 0.939692736, -0.342019916, 0, 0.342019886, 0.939692736),
  2217. CFrame.new(-0.500000954, -1.99999809, -1.84774399e-06, 1, 0, 0, 0, 1, -2.98023224e-08, 0, -2.98023224e-08, 1),
  2218. }, .3, false)
  2219. end
  2220. MagPart:Destroy()
  2221. swait(5)
  2222. for i=0,1,.2 do
  2223. swait()
  2224. PlayAnimationFromTable({
  2225. CFrame.new(0, -0.0301530343, -0.171007201, 1, 0, 0, 0, 0.939692736, 0.342019886, 0, -0.342019916, 0.939692736),
  2226. CFrame.new(0.0984815434, 1.48289728, -0.00301322341, 0.984807849, 0.173648134, -3.13053391e-07, -0.171010122, 0.969846427, -0.173647895, -0.0301533248, 0.171009824, 0.984807849),
  2227. CFrame.new(1.16020393, 0.666379213, -0.905047119, 0.76604414, 0.604023218, 0.219846413, 0.219846308, 0.0751920938, -0.972632408, -0.604023278, 0.793411791, -0.0751917362),
  2228. CFrame.new(-0.629211903, 0.930547178, -0.87133497, 0.262002915, -0.642787874, -0.71984607, -0.958213985, -0.262002975, -0.114805877, -0.114805937, 0.71984601, -0.684573948),
  2229. CFrame.new(0.499999523, -1.72638702, -0.751741886, 1, 0, 0, 0, 0.939692736, -0.342019916, 0, 0.342019886, 0.939692736),
  2230. CFrame.new(-0.500000954, -1.99999809, -1.84774399e-06, 1, 0, 0, 0, 1, -2.98023224e-08, 0, -2.98023224e-08, 1),
  2231. }, .3, false)
  2232. end
  2233. so(506273075,gun,1,1)
  2234. for i=0,1,.2 do
  2235. swait()
  2236. PlayAnimationFromTable({
  2237. CFrame.new(0, -0.0301530343, -0.171007201, 1, 0, 0, 0, 0.939692736, 0.342019886, 0, -0.342019916, 0.939692736),
  2238. CFrame.new(0.0984815434, 1.48289728, -0.00301322341, 0.984807849, 0.173648134, -3.13053391e-07, -0.171010122, 0.969846427, -0.173647895, -0.0301533248, 0.171009824, 0.984807849),
  2239. CFrame.new(1.16020393, 0.666379213, -0.905047119, 0.76604414, 0.604023218, 0.219846413, 0.219846308, 0.0751920938, -0.972632408, -0.604023278, 0.793411791, -0.0751917362),
  2240. CFrame.new(-0.629361629, 0.793605626, -0.495871037, 0.262002915, -0.642787874, -0.71984607, -0.958213985, -0.262002975, -0.114805877, -0.114805937, 0.71984601, -0.684573948),
  2241. CFrame.new(0.499999523, -1.72638702, -0.751741886, 1, 0, 0, 0, 0.939692736, -0.342019916, 0, 0.342019886, 0.939692736),
  2242. CFrame.new(-0.500000954, -1.99999809, -1.84774399e-06, 1, 0, 0, 0, 1, -2.98023224e-08, 0, -2.98023224e-08, 1),
  2243. }, .3, false)
  2244. end
  2245. for i=0,1,.2 do
  2246. swait()
  2247. PlayAnimationFromTable({
  2248. CFrame.new(0, -0.0301530343, -0.171007201, 1, 0, 0, 0, 0.939692736, 0.342019886, 0, -0.342019916, 0.939692736),
  2249. CFrame.new(0.0984815434, 1.48289728, -0.00301322341, 0.984807849, 0.173648134, -3.13053391e-07, -0.171010122, 0.969846427, -0.173647895, -0.0301533248, 0.171009824, 0.984807849),
  2250. CFrame.new(1.16020393, 0.666379213, -0.905047119, 0.76604414, 0.604023218, 0.219846413, 0.219846308, 0.0751920938, -0.972632408, -0.604023278, 0.793411791, -0.0751917362),
  2251. CFrame.new(-0.629211903, 0.930547178, -0.87133497, 0.262002915, -0.642787874, -0.71984607, -0.958213985, -0.262002975, -0.114805877, -0.114805937, 0.71984601, -0.684573948),
  2252. CFrame.new(0.499999523, -1.72638702, -0.751741886, 1, 0, 0, 0, 0.939692736, -0.342019916, 0, 0.342019886, 0.939692736),
  2253. CFrame.new(-0.500000954, -1.99999809, -1.84774399e-06, 1, 0, 0, 0, 1, -2.98023224e-08, 0, -2.98023224e-08, 1),
  2254. }, .3, false)
  2255. end
  2256. shots = 7
  2257. swait(10)
  2258. for i=0,1,.2 do
  2259. swait()
  2260. PlayAnimationFromTable({
  2261. CFrame.new(0, -0.0301527902, -0.171009317, 1, 0, 0, 0, 0.939692736, 0.342019886, 0, -0.342019916, 0.939692736),
  2262. CFrame.new(0.0984806046, 1.48289788, -0.00301507115, 0.984807849, 0.173648134, -3.13053391e-07, -0.171010122, 0.969846427, -0.173647895, -0.0301533248, 0.171009824, 0.984807849),
  2263. CFrame.new(0.9734447, 0.943128467, -1.04116416, 0.76604414, 0.642788053, 0, 0.219846308, -0.262002349, -0.939692736, -0.604023278, 0.719846129, -0.342019886),
  2264. CFrame.new(-0.516993761, 0.475136518, -0.924885869, 0, -0.499998987, 0.866025984, 0.939692736, -0.29619813, -0.171009615, 0.342019886, 0.813798308, 0.469845414),
  2265. CFrame.new(0.5, -1.72638702, -0.751741886, 1, 0, 0, 0, 0.939692736, -0.342019916, 0, 0.342019886, 0.939692736),
  2266. CFrame.new(-0.500000238, -1.99999905, 5.96046164e-08, 1, 0, 0, 0, 1, -2.98023224e-08, 0, -2.98023224e-08, 1),
  2267. }, .3, false)
  2268. end
  2269. end
  2270. until zhold == false
  2271. swait(5)
  2272. ref:Destroy()
  2273. so(211134014,gun,1,1)
  2274. for i=0,1,.1 do
  2275. swait()
  2276. PlayAnimationFromTable({
  2277. CFrame.new(0.0524868444, 0, -0.0110093001, 0.64278698, 0, 0.766044974, 0, 1, 0, -0.766044974, 0, 0.64278698),
  2278. CFrame.new(-0.0421711877, 1.49999738, -0.0331315249, 0.852868021, -0.0612752885, -0.518518507, 0.17364794, 0.969846606, 0.171008661, 0.492404759, -0.235887513, 0.837791562),
  2279. CFrame.new(0.611007333, -0.00932076573, -0.639356554, 0.653100669, 0.696805716, -0.296515375, -0.748181939, 0.533255994, -0.394793421, -0.116975725, 0.479687244, 0.869607329),
  2280. CFrame.new(-1.29161143, -0.030067116, -0.0939707607, 0.98480773, -0.163176328, 0.0593894422, 0.173647985, 0.925416648, -0.336824149, 1.78813934e-06, 0.342019945, 0.939692736),
  2281. CFrame.new(0.499998003, -2.00000095, 3.84449959e-06, 0.64278698, 0, -0.766044974, 0, 1, 0, 0.766044974, 0, 0.64278698),
  2282. CFrame.new(-0.499998897, -2.00000095, 1.59442425e-06, 0.98480767, 0, 0.173648536, 0, 1, 0, -0.173648536, 0, 0.98480767),
  2283. }, .3, false)
  2284. end
  2285. gweld.Part0 = Torso
  2286. gweld.C0 = gdefc0
  2287. Humanoid.WalkSpeed = 16
  2288. attack = false
  2289. end
  2290.  
  2291. qhold = false
  2292. justsprinted = false
  2293. function sprint()
  2294. attack = true
  2295. --print("supurinto?")
  2296. --justsprinted = true
  2297. --coroutine.wrap(function()
  2298. --swait(10)
  2299. --justsprinted = false
  2300. --end)()
  2301. repeat
  2302. swait()
  2303. PlayAnimationFromTable({
  2304. CFrame.new(-2.4138464e-07, 0.123327732, -0.188363045, 1, -4.38293796e-07, 1.20420327e-06, 0, 0.939692736, 0.342019886, -1.28148622e-06, -0.342019916, 0.939692736) * CFrame.new(0, 0- .08 * math.cos((sine/2.5)), 0),
  2305. CFrame.new(0, 1.41422474, 0.0894482136, 1, 0, 0, 0, 0.939692736, -0.342019916, 0, 0.342019886, 0.939692736),
  2306. CFrame.new(1.54809988, 0.041232653, 1.35168499e-08, 0.996376455, -0.0850530341, -3.41060513e-13, 0.0850530341, 0.996376455, 4.47034836e-07, 2.78823862e-08, 3.26637689e-07, 1.00000024) * CFrame.new(0, 0, -.6 * math.cos((sine) / 2.5)) * CFrame.Angles(math.rad(0 + 60 * math.cos((sine) / 2.5)), 0, 0),
  2307. CFrame.new(-1.53598976, 0.0413191095, -1.86092848e-06, 0.995650649, 0.0931596532, -2.61508148e-07, -0.0931649953, 0.995651186, -1.00695124e-05, -7.49969331e-07, 1.08217946e-05, 1.00000024) * CFrame.new(0, 0, .6 * math.cos((sine) / 2.5)) * CFrame.Angles(math.rad(0 - 60 * math.cos((sine) / 2.5)), 0, 0),
  2308. CFrame.new(0.540300786, -1.99793816, -9.82598067e-07, 0.998698533, -0.0510031395, 6.36324955e-07, 0.0510031395, 0.998698533, -1.00461093e-05, -8.35937328e-08, 1.08393433e-05, 1.00000024) * CFrame.new(0, 0, 0+ 1 * math.cos((sine) / 2.5)) * CFrame.Angles(math.rad(0 - 60 * math.cos((sine) / 2.5)), 0, 0),
  2309. CFrame.new(-0.539563596, -1.99794078, 1.12228372e-06, 0.998635888, 0.0523072146, -1.77852357e-07, -0.0523072146, 0.998635888, -1.00715051e-05, -3.89727461e-07, 1.08406466e-05, 1.00000024) * CFrame.new(0, 0, 0- 1 * math.cos((sine) / 2.5)) * CFrame.Angles(math.rad(0 + 60 * math.cos((sine) / 2.5)), 0, 0),
  2310. }, .3, false)
  2311. Humanoid.WalkSpeed = 40
  2312. until qhold == false or Torso.Velocity == Vector3.new(0,0,0)
  2313. --print'sutoppu'
  2314. Humanoid.WalkSpeed = 16
  2315. attack = false
  2316. end
  2317.  
  2318. Mouse.Button1Down:connect(function()
  2319. if attack == false then
  2320. attackm = "baton"
  2321. if Anim == "Jump" or Anim == "Fall" then
  2322. asmek()
  2323. else
  2324. smek()
  2325. end
  2326. end
  2327. end)
  2328.  
  2329. local sprintt = 0
  2330.  
  2331.  
  2332. Mouse.KeyDown:connect(function(k)
  2333. k = k:lower()
  2334. if k=='m' then
  2335. if mus.IsPlaying == true then
  2336. mus:Stop()
  2337. elseif mus.IsPaused == true then
  2338. mus:Play()
  2339. end
  2340. end
  2341. if attack == false then
  2342. if k == 'q' then
  2343. qhold = true
  2344. sprint()
  2345. elseif k == 'z' then
  2346. zhold = true
  2347. shoot()
  2348. end
  2349. end
  2350. end)
  2351.  
  2352.  
  2353. Mouse.KeyUp:connect(function(k)
  2354. k = k:lower()
  2355. if k == 'q' then
  2356. qhold = false
  2357. elseif k == 'z' then
  2358. zhold = false
  2359. end
  2360. end)
  2361.  
  2362.  
  2363. coroutine.wrap(function()
  2364. while 1 do
  2365. swait()
  2366. if doe <= 360 then
  2367. doe = doe + 2
  2368. else
  2369. doe = 0
  2370. end
  2371. end
  2372. end)()
  2373. while true do
  2374. swait()
  2375. for i, v in pairs(chara:GetChildren()) do
  2376. if v:IsA("Part") then
  2377. v.Material = "SmoothPlastic"
  2378. elseif v:IsA("Accessory") then
  2379. v:WaitForChild("Handle").Material = "SmoothPlastic"
  2380. end
  2381. end
  2382. while true do
  2383. swait()
  2384. if sprintt >= 1 then
  2385. sprintt = sprintt - 1
  2386. end
  2387.  
  2388. if Head:FindFirstChild("mus")==nil then
  2389. mus = Instance.new("Sound",Head)
  2390. mus.Name = "mus"
  2391. mus.SoundId = "rbxassetid://345868687"
  2392. mus.Looped = true
  2393. mus.Volume = 1
  2394. mus:Play()
  2395. end
  2396. Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
  2397. velocity = RootPart.Velocity.y
  2398. sine = sine + change
  2399. local hit, pos = rayCast(RootPart.Position, (CFrame.new(RootPart.Position, RootPart.Position - Vector3.new(0, 1, 0))).lookVector, 4, chara)
  2400. if RootPart.Velocity.y > 1 and hit == nil then
  2401. Anim = "Jump"
  2402. if attack == false then
  2403. PlayAnimationFromTable({
  2404. CFrame.new(0, 0.0382082276, -0.0403150208, 1, 0, 0, 0, 0.984807849, 0.173647985, 0, -0.173647985, 0.984807849),
  2405. CFrame.new(0, 1.46579528, 0.0939689279, 1, 0, 0, 0, 0.939692855, -0.342019796, 0, 0.342019796, 0.939692855),
  2406. CFrame.new(1.20945489, -0.213504896, 3.55388607e-07, 0.939692736, 0.342019916, 1.53461215e-07, -0.342019945, 0.939692736, 1.93715096e-07, -8.56816769e-08, -2.23517418e-07, 1.00000012),
  2407. CFrame.new(-1.20945573, -0.213503733, 5.0439985e-07, 0.939692736, -0.342019916, -1.53461215e-07, 0.342019945, 0.939692736, 1.93715096e-07, 8.56816769e-08, -2.23517418e-07, 1.00000012),
  2408. CFrame.new(0.5, -1.99739456, -0.0180913229, 1, 0, 0, 0, 1.00000012, 0, 0, 0, 1.00000012),
  2409. CFrame.new(-0.5, -1.30000103, -0.39999947, 1, 0, 0, 0, 0.939692676, 0.342020601, 0, -0.342020601, 0.939692676),
  2410. }, .3, false)
  2411. end
  2412. elseif RootPart.Velocity.y < -1 and hit == nil then
  2413. Anim = "Fall"
  2414. if attack == false then
  2415. PlayAnimationFromTable({
  2416. CFrame.new(0, -0.0646628663, 0.0399149321, 1, 0, 0, 0, 0.984807849, -0.173647985, 0, 0.173647985, 0.984807849),
  2417. CFrame.new(0, 1.4913609, -0.128171027, 1, 0, 0, 0, 0.939692855, 0.342019796, 0, -0.342019796, 0.939692855),
  2418. CFrame.new(1.55285025, 0.466259956, -9.26282269e-08, 0.766043842, -0.642788351, -6.46188241e-08, 0.642788291, 0.766043961, -7.4505806e-08, 1.04308128e-07, 1.49011612e-08, 1.00000012),
  2419. CFrame.new(-1.5605253, 0.475036323, -2.10609159e-07, 0.766043842, 0.642788351, 6.46188241e-08, -0.642788291, 0.766043961, -7.4505806e-08, -1.04308128e-07, 1.49011612e-08, 1.00000012),
  2420. CFrame.new(0.500000954, -1.9973948, -0.0180922765, 1, 0, 0, 0, 1.00000012, 0, 0, 0, 1.00000012),
  2421. CFrame.new(-0.499999046, -1.30000043, -0.400000483, 1, 0, 0, 0, 0.939692855, 0.342019796, 0, -0.342019796, 0.939692855),
  2422. }, .3, false)
  2423. end
  2424. elseif Torsovelocity < 1 and hit ~= nil then
  2425. Anim = "Idle"
  2426. if attack == false then
  2427. change = 1
  2428. PlayAnimationFromTable({
  2429. CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1) * CFrame.new(0,.05 * math.cos((sine)/10), 0),
  2430. CFrame.new(0, 1.49999809, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  2431. CFrame.new(0.89930898, -0.180769742, 0.30436784, 0.766043901, 0.642788172, 8.56792951e-07, -0.556670964, 0.663412929, 0.500000715, 0.321393967, -0.383022994, 0.866024971),
  2432. CFrame.new(-0.899309754, -0.180769712, 0.304367989, 0.766043901, -0.642788172, -8.56792951e-07, 0.556670964, 0.663412929, 0.500000715, -0.321393967, -0.383022994, 0.866024971),
  2433. CFrame.new(0.5, -1.99999893, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1) * CFrame.new(0,-.05 * math.cos((sine)/10), 0),
  2434. CFrame.new(-0.5, -1.99999893, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1) * CFrame.new(0,-.05 * math.cos((sine)/10), 0),
  2435. }, .3, false)
  2436. end
  2437. elseif Torsovelocity > 2 and hit ~= nil then
  2438. Anim = "Walk"
  2439. if attack == false then
  2440. PlayAnimationFromTable({
  2441. CFrame.new(0, 0, 0, 1, -2.21689355e-12, -5.11591203e-13, -2.21689355e-12, 1, 7.74860496e-07, -5.11591203e-13, 7.74860496e-07, 1.00000048) * CFrame.new(0, 0- .08 * math.cos((sine) / 3.5), 0) * CFrame.Angles(0, 0, 0),
  2442. CFrame.new(-2.09923631e-14, 1.48262846, -0.0984891504, 1, -1.42108547e-14, 0, 0, 0.984807491, 0.173649743, 0, -0.173649758, 0.984807491),
  2443. CFrame.new(0.89930898, -0.180769742, 0.30436784, 0.766043901, 0.642788172, 8.56792951e-07, -0.556670964, 0.663412929, 0.500000715, 0.321393967, -0.383022994, 0.866024971),
  2444. CFrame.new(-0.899309754, -0.180769712, 0.304367989, 0.766043901, -0.642788172, -8.56792951e-07, 0.556670964, 0.663412929, 0.500000715, -0.321393967, -0.383022994, 0.866024971),
  2445. CFrame.new(0.540300786, -1.99793816, -9.82598067e-07, 0.998698533, -0.0510031395, 6.36324955e-07, 0.0510031395, 0.998698533, -1.00461093e-05, -8.35937328e-08, 1.08393433e-05, 1.00000024) * CFrame.new(0, 0, 0+ .5 * math.cos((sine) / 5)) * CFrame.Angles(math.rad(0 - 30 * math.cos((sine) / 5)), 0, 0),
  2446. CFrame.new(-0.539563596, -1.99794078, 1.12228372e-06, 0.998635888, 0.0523072146, -1.77852357e-07, -0.0523072146, 0.998635888, -1.00715051e-05, -3.89727461e-07, 1.08406466e-05, 1.00000024) * CFrame.new(0, 0, 0- .5 * math.cos((sine) / 5)) * CFrame.Angles(math.rad(0 + 30 * math.cos((sine) / 5)), 0, 0),
  2447. }, .3, false)
  2448. end
  2449. end
  2450. if 0 < #Effects then
  2451. for e = 1, #Effects do
  2452. if Effects[e] ~= nil then
  2453. local Thing = Effects[e]
  2454. if Thing ~= nil then
  2455. local Part = Thing[1]
  2456. local Mode = Thing[2]
  2457. local Delay = Thing[3]
  2458. local IncX = Thing[4]
  2459. local IncY = Thing[5]
  2460. local IncZ = Thing[6]
  2461. if Thing[2] == "Shoot" then
  2462. local Look = Thing[1]
  2463. local move = 30
  2464. if Thing[8] == 3 then
  2465. move = 10
  2466. end
  2467. local hit, pos = rayCast(Thing[4], Thing[1], move, m)
  2468. if Thing[10] ~= nil then
  2469. da = pos
  2470. cf2 = CFrame.new(Thing[4], Thing[10].Position)
  2471. cfa = CFrame.new(Thing[4], pos)
  2472. tehCF = cfa:lerp(cf2, 0.2)
  2473. Thing[1] = tehCF.lookVector
  2474. end
  2475. local mag = (Thing[4] - pos).magnitude
  2476. Effects["Head"].Create(Torso.BrickColor, CFrame.new((Thing[4] + pos) / 2, pos) * CFrame.Angles(1.57, 0, 0), 1, mag * 5, 1, 0.5, 0, 0.5, 0.2)
  2477. if Thing[8] == 2 then
  2478. Effects["Ring"].Create(Torso.BrickColor, CFrame.new((Thing[4] + pos) / 2, pos) * CFrame.Angles(1.57, 0, 0) * CFrame.fromEulerAnglesXYZ(1.57, 0, 0), 1, 1, 0.1, 0.5, 0.5, 0.1, 0.1, 1)
  2479. end
  2480. Thing[4] = Thing[4] + Look * move
  2481. Thing[3] = Thing[3] - 1
  2482. if 2 < Thing[5] then
  2483. Thing[5] = Thing[5] - 0.3
  2484. Thing[6] = Thing[6] - 0.3
  2485. end
  2486. if hit ~= nil then
  2487. Thing[3] = 0
  2488. if Thing[8] == 1 or Thing[8] == 3 then
  2489. Damage(hit, hit, Thing[5], Thing[6], Thing[7], "Normal", RootPart, 0, "", 1)
  2490. else
  2491. if Thing[8] == 2 then
  2492. Damage(hit, hit, Thing[5], Thing[6], Thing[7], "Normal", RootPart, 0, "", 1)
  2493. if (hit.Parent:FindFirstChildOfClass("Humanoid")) ~= nil or (hit.Parent.Parent:FindFirstChildOfClass("Humanoid")) ~= nil then
  2494. ref = CFuncs.Part.Create(workspace, "Neon", 0, 1, BrickColor.new("Really red"), "Reference", Vector3.new())
  2495. ref.Anchored = true
  2496. ref.CFrame = CFrame.new(pos)
  2497. CFuncs["Sound"].Create("161006093", ref, 1, 1.2)
  2498. game:GetService("Debris"):AddItem(ref, 0.2)
  2499. Effects["Block"].Create(Torso.BrickColor, CFrame.new(ref.Position) * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)), 1, 1, 1, 10, 10, 10, 0.1, 2)
  2500. Effects["Ring"].Create(BrickColor.new("Bright yellow"), CFrame.new(ref.Position) * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)), 1, 1, 0.1, 4, 4, 0.1, 0.1)
  2501. MagnitudeDamage(ref, 15, Thing[5] / 1.5, Thing[6] / 1.5, 0, "Normal", "", 1)
  2502. end
  2503. end
  2504. end
  2505. ref = CFuncs.Part.Create(workspace, "Neon", 0, 1, BrickColor.new("Really red"), "Reference", Vector3.new())
  2506. ref.Anchored = true
  2507. ref.CFrame = CFrame.new(pos)
  2508. Effects["Sphere"].Create(Torso.BrickColor, CFrame.new(pos), 5, 5, 5, 1, 1, 1, 0.07)
  2509. game:GetService("Debris"):AddItem(ref, 1)
  2510. end
  2511. if Thing[3] <= 0 then
  2512. table.remove(Effects, e)
  2513. end
  2514. end
  2515. do
  2516. do
  2517. if Thing[2] == "FireWave" then
  2518. if Thing[3] <= Thing[4] then
  2519. Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(0, 1, 0)
  2520. Thing[3] = Thing[3] + 1
  2521. Thing[6].Scale = Thing[6].Scale + Vector3.new(Thing[5], 0, Thing[5])
  2522. else
  2523. Part.Parent = nil
  2524. table.remove(Effects, e)
  2525. end
  2526. end
  2527. if Thing[2] ~= "Shoot" and Thing[2] ~= "Wave" and Thing[2] ~= "FireWave" then
  2528. if Thing[1].Transparency <= 1 then
  2529. if Thing[2] == "Block1" then
  2530. Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  2531. Mesh = Thing[7]
  2532. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  2533. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  2534. else
  2535. if Thing[2] == "Block2" then
  2536. Thing[1].CFrame = Thing[1].CFrame
  2537. Mesh = Thing[7]
  2538. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  2539. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  2540. else
  2541. if Thing[2] == "Fire" then
  2542. Thing[1].CFrame = CFrame.new(Thing[1].Position) + Vector3.new(0, 0.2, 0)
  2543. Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  2544. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  2545. else
  2546. if Thing[2] == "Cylinder" then
  2547. Mesh = Thing[7]
  2548. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  2549. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  2550. else
  2551. if Thing[2] == "Blood" then
  2552. Mesh = Thing[7]
  2553. Thing[1].CFrame = Thing[1].CFrame * CFrame.new(0, 0.5, 0)
  2554. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  2555. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  2556. else
  2557. if Thing[2] == "Elec" then
  2558. Mesh = Thing[10]
  2559. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[7], Thing[8], Thing[9])
  2560. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  2561. else
  2562. if Thing[2] == "Disappear" then
  2563. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  2564. else
  2565. if Thing[2] == "Shatter" then
  2566. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  2567. Thing[4] = Thing[4] * CFrame.new(0, Thing[7], 0)
  2568. Thing[1].CFrame = Thing[4] * CFrame.fromEulerAnglesXYZ(Thing[6], 0, 0)
  2569. Thing[6] = Thing[6] + Thing[5]
  2570. end
  2571. end
  2572. end
  2573. end
  2574. end
  2575. end
  2576. end
  2577. end
  2578. else
  2579. Part.Parent = nil
  2580. table.remove(Effects, e)
  2581. end
  2582. end
  2583. end
  2584. end
  2585. end
  2586. end
  2587. end
  2588. end
  2589. end
  2590. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement