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