SHOW:
|
|
- or go back to the newest paste.
1 | - | --[[ Created By Draconix ]]-- |
1 | + | if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end |
2 | local Player,game,owner = owner,game | |
3 | local RealPlayer = Player | |
4 | do | |
5 | print("FE Compatibility code by Mokiros") | |
6 | local rp = RealPlayer | |
7 | script.Parent = rp.Character | |
8 | ||
9 | --RemoteEvent for communicating | |
10 | local Event = Instance.new("RemoteEvent") | |
11 | Event.Name = "UserInput_Event" | |
12 | ||
13 | --Fake event to make stuff like Mouse.KeyDown work | |
14 | local function fakeEvent() | |
15 | local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end} | |
16 | t.connect = t.Connect | |
17 | return t | |
18 | end | |
19 | ||
20 | --Creating fake input objects with fake variables | |
21 | local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()} | |
22 | local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()} | |
23 | local CAS = {Actions={},BindAction=function(self,name,fun,touch,...) | |
24 | CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil | |
25 | end} | |
26 | --Merged 2 functions into one by checking amount of arguments | |
27 | CAS.UnbindAction = CAS.BindAction | |
28 | ||
29 | --This function will trigger the events that have been :Connect()'ed | |
30 | local function te(self,ev,...) | |
31 | local t = m[ev] | |
32 | if t and t._fakeEvent then | |
33 | for _,f in pairs(t.Functions) do | |
34 | f(...) | |
35 | end | |
36 | end | |
37 | end | |
38 | m.TrigEvent = te | |
39 | UIS.TrigEvent = te | |
40 | ||
41 | Event.OnServerEvent:Connect(function(plr,io) | |
42 | if plr~=rp then return end | |
43 | m.Target = io.Target | |
44 | m.Hit = io.Hit | |
45 | if not io.isMouse then | |
46 | local b = io.UserInputState == Enum.UserInputState.Begin | |
47 | if io.UserInputType == Enum.UserInputType.MouseButton1 then | |
48 | return m:TrigEvent(b and "Button1Down" or "Button1Up") | |
49 | end | |
50 | if io.UserInputType == Enum.UserInputType.MouseButton2 then | |
51 | return m:TrigEvent(b and "Button2Down" or "Button2Up") | |
52 | end | |
53 | for _,t in pairs(CAS.Actions) do | |
54 | for _,k in pairs(t.Keys) do | |
55 | if k==io.KeyCode then | |
56 | t.Function(t.Name,io.UserInputState,io) | |
57 | end | |
58 | end | |
59 | end | |
60 | m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower()) | |
61 | UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false) | |
62 | end | |
63 | end) | |
64 | Event.Parent = NLS([==[ | |
65 | local Player = game:GetService("Players").LocalPlayer | |
66 | local Event = script:WaitForChild("UserInput_Event") | |
67 | local Mouse = Player:GetMouse() | |
68 | local UIS = game:GetService("UserInputService") | |
69 | local input = function(io,a) | |
70 | if a then return end | |
71 | --Since InputObject is a client-side instance, we create and pass table instead | |
72 | Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target}) | |
73 | end | |
74 | UIS.InputBegan:Connect(input) | |
75 | UIS.InputEnded:Connect(input) | |
76 | local h,t | |
77 | --Give the server mouse data 30 times every second, but only if the values changed | |
78 | --If player is not moving their mouse, client won't fire events | |
79 | while wait(1/30) do | |
80 | if h~=Mouse.Hit or t~=Mouse.Target then | |
81 | h,t=Mouse.Hit,Mouse.Target | |
82 | Event:FireServer({isMouse=true,Target=t,Hit=h}) | |
83 | end | |
84 | end]==],Player.Character) | |
85 | ||
86 | ----Sandboxed game object that allows the usage of client-side methods and services | |
87 | --Real game object | |
88 | local _rg = game | |
89 | ||
90 | --Metatable for fake service | |
91 | local fsmt = { | |
92 | __index = function(self,k) | |
93 | local s = rawget(self,"_RealService") | |
94 | if s then | |
95 | return typeof(s[k])=="function" | |
96 | and function(_,...)return s[k](s,...)end or s[k] | |
97 | end | |
98 | end, | |
99 | __newindex = function(self,k,v) | |
100 | local s = rawget(self,"_RealService") | |
101 | if s then s[k]=v end | |
102 | end | |
103 | } | |
104 | local function FakeService(t,RealService) | |
105 | t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService | |
106 | return setmetatable(t,fsmt) | |
107 | end | |
108 | ||
109 | --Fake game object | |
110 | local g = { | |
111 | GetService = function(self,s) | |
112 | return rawget(self,s) or _rg:GetService(s) | |
113 | end, | |
114 | Players = FakeService({ | |
115 | LocalPlayer = FakeService({GetMouse=function(self)return m end},Player) | |
116 | },"Players"), | |
117 | UserInputService = FakeService(UIS,"UserInputService"), | |
118 | ContextActionService = FakeService(CAS,"ContextActionService"), | |
119 | RunService = FakeService({ | |
120 | _btrs = {}, | |
121 | RenderStepped = _rg:GetService("RunService").Heartbeat, | |
122 | BindToRenderStep = function(self,name,_,fun) | |
123 | self._btrs[name] = self.Heartbeat:Connect(fun) | |
124 | end, | |
125 | UnbindFromRenderStep = function(self,name) | |
126 | self._btrs[name]:Disconnect() | |
127 | end, | |
128 | },"RunService") | |
129 | } | |
130 | rawset(g.Players,"localPlayer",g.Players.LocalPlayer) | |
131 | g.service = g.GetService | |
132 | FakeService(g,game) | |
133 | --Changing owner to fake player object to support owner:GetMouse() | |
134 | game,owner = g,g.Players.LocalPlayer | |
135 | end | |
136 | ||
137 | maincolor = game.Players.LocalPlayer.Character.Torso.BrickColor.Name | |
138 | secondcolor = "Really black" | |
139 | ||
140 | wait(1 / 60) | |
141 | Effects = { } | |
142 | local Player = game.Players.localPlayer | |
143 | local Character = Player.Character | |
144 | local Humanoid = Character.Humanoid | |
145 | local mouse = Player:GetMouse() | |
146 | local LeftArm = Character["Left Arm"] | |
147 | local RightArm = Character["Right Arm"] | |
148 | local LeftLeg = Character["Left Leg"] | |
149 | local RightLeg = Character["Right Leg"] | |
150 | local Head = Character.Head | |
151 | local Torso = Character.Torso | |
152 | local cam = game.Workspace.CurrentCamera | |
153 | local RootPart = Character.HumanoidRootPart | |
154 | local RootJoint = RootPart.RootJoint | |
155 | local equipped = true | |
156 | local attack = false | |
157 | local Anim = 'Idle' | |
158 | local idle = 0 | |
159 | local attacktype = 1 | |
160 | local Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude | |
161 | local velocity = RootPart.Velocity.y | |
162 | local sine = 0 | |
163 | local change = 1 | |
164 | local grabbed = false | |
165 | local cn = CFrame.new | |
166 | local mr = math.rad | |
167 | local angles = CFrame.Angles | |
168 | local ud = UDim2.new | |
169 | local c3 = Color3.new | |
170 | local dir = {w = 0, s = 0, a = 0, d = 0} | |
171 | Climbanim = false | |
172 | Runkey=false | |
173 | firemode = false | |
174 | inair = false | |
175 | blocking=false | |
176 | humHsave=0 | |
177 | humDsave=0 | |
178 | extralock=true | |
179 | lasthit = nil | |
180 | IKM = false | |
181 | HMDX = Humanoid.MoveDirection.X/3 | |
182 | HMDZ = Humanoid.MoveDirection.Z/3 | |
183 | local s = Instance.new("Sound",Character) | |
184 | s.Name = "BumperCarSound" | |
185 | s.SoundId = "http://www.roblox.com/asset/?id=532147820" | |
186 | s.Pitch = .7 | |
187 | s.Volume = .5 | |
188 | s.Looped = true | |
189 | s.archivable = false | |
190 | s.Parent = Character | |
191 | s:play() | |
192 | ||
193 | sflon = true | |
194 | bg2 = Instance.new("BodyGyro", game.Players.LocalPlayer.Character.HumanoidRootPart) | |
195 | game:GetService("RunService"):BindToRenderStep("ew", 0, function() | |
196 | if attack == true then | |
197 | bg2.D = 0 | |
198 | bg2.P = 0 | |
199 | bg2.maxTorque = Vector3.new(0,0,0) | |
200 | end | |
201 | if attack == false then | |
202 | bg2.D = 100 | |
203 | bg2.P = 9999 | |
204 | bg2.maxTorque = Vector3.new(1e+005,1e+000,1e+005)*math.huge | |
205 | bg2.CFrame = CFrame.new(game.Players.LocalPlayer.Character.HumanoidRootPart.Position ,Vector3.new(game.Workspace.CurrentCamera.CoordinateFrame.p.x,game.Players.LocalPlayer.Character.HumanoidRootPart.Position.y,game.Workspace.CurrentCamera.CoordinateFrame.p.z)) * CFrame.Angles(0,math.rad(180),0) | |
206 | ||
207 | end | |
208 | end)--]] | |
209 | ||
210 | ||
211 | New = function(Object, Parent, Name, Data) | |
212 | local Object = Instance.new(Object) | |
213 | for Index, Value in pairs(Data or {}) do | |
214 | Object[Index] = Value | |
215 | end | |
216 | Object.Parent = Parent | |
217 | Object.Name = Name | |
218 | return Object | |
219 | end | |
220 | ||
221 | BumperCar = New("Model",Workspace,"BumperCar",{}) | |
222 | Wedge = New("WedgePart",BumperCar,"Wedge",{BrickColor = BrickColor.new("Maroon"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(0.099999845, 0.199999988, 0.299999952),CFrame = CFrame.new(-5.95999956, 9.90000057, -36.2131157, 1, 7.64274186e-15, 0, 7.64274186e-15, -1, -8.74227766e-08, 0, 8.74227766e-08, -1),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.458824, 0, 0),}) | |
223 | Part = New("Part",BumperCar,"Part",{BrickColor = BrickColor.new("Really black"),Material = Enum.Material.SmoothPlastic,Shape = Enum.PartType.Cylinder,Size = Vector3.new(1.5, 0.100000001, 0.100000001),CFrame = CFrame.new(-4.02177143, 11.8595181, -40.6349945, -0.466506243, -0.129409313, 0.87500006, -0.741025686, -0.482962549, -0.466506183, 0.482962519, -0.866025567, 0.129409432),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.0666667, 0.0666667, 0.0666667),}) | |
224 | Part = New("Part",BumperCar,"Part",{BrickColor = BrickColor.new("Dark stone grey"),Material = Enum.Material.SmoothPlastic,Shape = Enum.PartType.Cylinder,Size = Vector3.new(0.099999994, 3.9000001, 3.9000001),CFrame = CFrame.new(-5.16500664, 8.05000019, -38.9131165, -4.37113883e-08, -1, 0, 1, -4.37113883e-08, 0, 0, 0, 0.999999821),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.388235, 0.372549, 0.384314),}) | |
225 | Part = New("Part",BumperCar,"Part",{BrickColor = BrickColor.new("Black"),Material = Enum.Material.SmoothPlastic,Shape = Enum.PartType.Cylinder,Size = Vector3.new(2.79999995, 0.800000072, 0.800000072),CFrame = CFrame.new(-5.81500626, 8.5, -34.7631149, -2.08616257e-07, 0, 1, 0, 1, 0, -1, 0, -2.08616257e-07),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.105882, 0.164706, 0.207843),}) | |
226 | SwHandle = New("Part",BumperCar,"Handle",{BrickColor = BrickColor.new("Really black"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(4, 0.899999976, 4),CFrame = CFrame.new(-5.16500664, 7.55000019, -36.9631157, 1, 0, 0, 0, 1, 0, 0, 0, 1),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.0666667, 0.0666667, 0.0666667),}) | |
227 | Part = New("Part",BumperCar,"Part",{BrickColor = BrickColor.new("Olive"),Material = Enum.Material.Neon,Shape = Enum.PartType.Cylinder,Size = Vector3.new(0.099999845, 0.699999988, 0.699999988),CFrame = CFrame.new(-5.81500578, 8.5, -33.4031143, -2.08616257e-07, 0, 1, 0, 1, 0, -1, 0, -2.08616257e-07),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.756863, 0.745098, 0.258824),}) | |
228 | Part = New("Part",BumperCar,"Part",{BrickColor = BrickColor.new("Really black"),Material = Enum.Material.SmoothPlastic,Shape = Enum.PartType.Cylinder,Size = Vector3.new(0.899999976, 4, 4),CFrame = CFrame.new(-5.16500664, 7.55000019, -34.9631157, -4.37113883e-08, -1, 0, 1, -4.37113883e-08, 0, 0, 0, 0.999999821),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.0666667, 0.0666667, 0.0666667),}) | |
229 | Wedge = New("WedgePart",BumperCar,"Wedge",{BrickColor = BrickColor.new("Black"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(0.799999952, 0.599999964, 1.49999952),CFrame = CFrame.new(-6.46000004, 8.85000038, -39.5131149, 4.37113883e-08, -1, -1.19248771e-08, 8.74227695e-08, 1.19248798e-08, -0.99999994, 1, 4.37113883e-08, 8.74227766e-08),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.105882, 0.164706, 0.207843),}) | |
230 | Wedge = New("WedgePart",BumperCar,"Wedge",{BrickColor = BrickColor.new("Maroon"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(0.099999845, 1, 0.299999952),CFrame = CFrame.new(-4.35999966, 9.60000038, -36.2131157, -1, 0, -8.74227766e-08, 0, 1, 0, 8.74227766e-08, 0, -1),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.458824, 0, 0),}) | |
231 | Wedge = New("WedgePart",BumperCar,"Wedge",{BrickColor = BrickColor.new("Maroon"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(0.199999958, 1, 0.999999523),CFrame = CFrame.new(-3.50999951, 8.60000038, -36.8631134, 1, 0, 1.74845553e-07, 0, 1, 0, -1.74845553e-07, 0, 1),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.458824, 0, 0),}) | |
232 | Part = New("Part",BumperCar,"Part",{BrickColor = BrickColor.new("Maroon"),Material = Enum.Material.SmoothPlastic,Shape = Enum.PartType.Cylinder,Size = Vector3.new(2.89999986, 1.99999988, 1.99999988),CFrame = CFrame.new(-5.15999985, 8.5, -34.9000015, -2.08616257e-07, 0, 1, 0, 1, 0, -1, 0, -2.08616257e-07),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.458824, 0, 0),}) | |
233 | Wedge = New("WedgePart",BumperCar,"Wedge",{BrickColor = BrickColor.new("Maroon"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(1.49999976, 0.0999999866, 0.109999947),CFrame = CFrame.new(-5.15999985, 9.95000076, -36.4081154, -1, -1.52854837e-14, 8.74227766e-08, 7.64274186e-15, -1, -8.74227766e-08, 8.74227766e-08, -8.74227766e-08, 1),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.458824, 0, 0),}) | |
234 | Wedge = New("WedgePart",BumperCar,"Wedge",{BrickColor = BrickColor.new("Maroon"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(0.199999958, 1, 0.999999523),CFrame = CFrame.new(-6.80999947, 8.60000038, -36.8631134, 1, 0, 1.74845553e-07, 0, 1, 0, -1.74845553e-07, 0, 1),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.458824, 0, 0),}) | |
235 | Wedge = New("WedgePart",BumperCar,"Wedge",{BrickColor = BrickColor.new("Maroon"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(0.200000048, 1.60000002, 0.999999523),CFrame = CFrame.new(-6.80999947, 8.90000057, -38.5631142, -1, 0, -8.74227766e-08, 0, 1, 0, 8.74227766e-08, 0, -1),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.458824, 0, 0),}) | |
236 | Part = New("Part",BumperCar,"Part",{BrickColor = BrickColor.new("Really black"),Material = Enum.Material.SmoothPlastic,Shape = Enum.PartType.Cylinder,Size = Vector3.new(1.49999988, 0.200000003, 0.200000003),CFrame = CFrame.new(-4.52999973, 10.6799994, -40.1199951, -0.258819044, 3.08638382e-09, 0.965925813, -0.933012724, -0.258818835, -0.25, 0.249999776, -0.965925872, 0.0669872463),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.0666667, 0.0666667, 0.0666667),}) | |
237 | Part = New("Part",BumperCar,"Part",{BrickColor = BrickColor.new("Really black"),Material = Enum.Material.SmoothPlastic,Shape = Enum.PartType.Cylinder,Size = Vector3.new(0.899999976, 4, 4),CFrame = CFrame.new(-5.16500664, 7.55000019, -38.9631157, -4.37113883e-08, -1, 0, 1, -4.37113883e-08, 0, 0, 0, 0.999999821),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.0666667, 0.0666667, 0.0666667),}) | |
238 | Wedge = New("WedgePart",BumperCar,"Wedge",{BrickColor = BrickColor.new("Maroon"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(1.69999993, 0.100000024, 0.0999999493),CFrame = CFrame.new(-5.15999985, 10.0500002, -36.4131165, 1, 0, 1.74845553e-07, 0, 1, 0, -1.74845553e-07, 0, 1),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.458824, 0, 0),}) | |
239 | Wedge = New("WedgePart",BumperCar,"Wedge",{BrickColor = BrickColor.new("Maroon"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(0.200000048, 1.60000002, 0.999999523),CFrame = CFrame.new(-3.50999975, 8.90000057, -38.5631142, -1, 0, -8.74227766e-08, 0, 1, 0, 8.74227766e-08, 0, -1),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.458824, 0, 0),}) | |
240 | Wedge = New("WedgePart",BumperCar,"Wedge",{BrickColor = BrickColor.new("Maroon"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(0.200000048, 1, 3.89999962),CFrame = CFrame.new(-3.50999975, 8.60000038, -37.1131134, -1, 0, -8.74227766e-08, 0, 1, 0, 8.74227766e-08, 0, -1),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.458824, 0, 0),}) | |
241 | Part = New("Part",BumperCar,"Part",{BrickColor = BrickColor.new("Really black"),Material = Enum.Material.SmoothPlastic,Shape = Enum.PartType.Cylinder,Size = Vector3.new(0.399999857, 0.300000012, 0.300000012),CFrame = CFrame.new(-4.67235041, 10.1668425, -39.9824944, -0.258819044, 3.08638382e-09, 0.965925813, -0.933012724, -0.258818835, -0.25, 0.249999776, -0.965925872, 0.0669872463),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.0666667, 0.0666667, 0.0666667),}) | |
242 | Part = New("Part",BumperCar,"Part",{BrickColor = BrickColor.new("Really black"),Material = Enum.Material.SmoothPlastic,Shape = Enum.PartType.Cylinder,Size = Vector3.new(1.5, 0.0500000007, 0.0500000007),CFrame = CFrame.new(-3.11038089, 12.7026892, -41.3446198, -0.774519205, -0.353553116, 0.524519026, -0.408493787, -0.353553116, -0.841506362, 0.482962519, -0.866025567, 0.129409432),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.0666667, 0.0666667, 0.0666667),}) | |
243 | Part = New("Part",BumperCar,"Part",{BrickColor = BrickColor.new("Maroon"),Material = Enum.Material.SmoothPlastic,Shape = Enum.PartType.Cylinder,Size = Vector3.new(0.999999881, 2.0999999, 2.0999999),CFrame = CFrame.new(-5.15999985, 8.69999981, -40.1499977, -2.08616257e-07, 0, 1, 0, 1, 0, -1, 0, -2.08616257e-07),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.458824, 0, 0),}) | |
244 | Wedge = New("WedgePart",BumperCar,"Wedge",{BrickColor = BrickColor.new("Black"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(0.799999952, 0.600000024, 0.299999565),CFrame = CFrame.new(-5.85999918, 9.45000076, -39.5131149, 4.37113883e-08, 1, 1.19248771e-08, 7.10542736e-15, -1.19248762e-08, 0.99999994, 1, -4.37113883e-08, 6.06292123e-15),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.105882, 0.164706, 0.207843),}) | |
245 | Part = New("Part",BumperCar,"Part",{BrickColor = BrickColor.new("Maroon"),Material = Enum.Material.SmoothPlastic,Shape = Enum.PartType.Cylinder,Size = Vector3.new(0.899999857, 2.20000005, 2.20000005),CFrame = CFrame.new(-5.15999985, 8.69999981, -40.0999985, -2.08616257e-07, 0, 1, 0, 1, 0, -1, 0, -2.08616257e-07),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.458824, 0, 0),}) | |
246 | Wedge = New("WedgePart",BumperCar,"Wedge",{BrickColor = BrickColor.new("Black"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(0.799999952, 0.600000024, 0.199999571),CFrame = CFrame.new(-4.46000051, 9.70000076, -39.5131149, -1.31134158e-07, 1, 1.19248691e-08, 8.74227695e-08, 1.19248798e-08, -0.99999994, -1, -1.31134158e-07, -8.74227766e-08),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.105882, 0.164706, 0.207843),}) | |
247 | Wedge = New("WedgePart",BumperCar,"Wedge",{BrickColor = BrickColor.new("Black"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(0.400000006, 0.300000012, 2.9000001),CFrame = CFrame.new(-5.15999985, 9.55000019, -34.9131165, 1, 0, 1.74845553e-07, 0, 1, 0, -1.74845553e-07, 0, 1),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.105882, 0.164706, 0.207843),}) | |
248 | Wedge = New("WedgePart",BumperCar,"Wedge",{BrickColor = BrickColor.new("Maroon"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(0.0999999046, 1, 0.299999952),CFrame = CFrame.new(-5.96000004, 9.60000038, -36.2131157, -1, 0, -8.74227766e-08, 0, 1, 0, 8.74227766e-08, 0, -1),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.458824, 0, 0),}) | |
249 | Wedge = New("WedgePart",BumperCar,"Wedge",{BrickColor = BrickColor.new("Black"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(0.799999952, 0.600000024, 1.49999952),CFrame = CFrame.new(-3.8599999, 8.85000038, -39.5131149, -1.31134158e-07, 1, 1.19248691e-08, 8.74227695e-08, 1.19248798e-08, -0.99999994, -1, -1.31134158e-07, -8.74227766e-08),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.105882, 0.164706, 0.207843),}) | |
250 | Wedge = New("WedgePart",BumperCar,"Wedge",{BrickColor = BrickColor.new("Black"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(0.799999952, 0.600000024, 0.199999571),CFrame = CFrame.new(-5.85999918, 9.70000076, -39.5131149, 4.37113883e-08, -1, -1.19248771e-08, 8.74227695e-08, 1.19248798e-08, -0.99999994, 1, 4.37113883e-08, 8.74227766e-08),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.105882, 0.164706, 0.207843),}) | |
251 | Part = New("Part",BumperCar,"Part",{BrickColor = BrickColor.new("Maroon"),Material = Enum.Material.SmoothPlastic,Shape = Enum.PartType.Cylinder,Size = Vector3.new(2.5999999, 1.20000005, 1.20000005),CFrame = CFrame.new(-4.51500654, 8.19999981, -34.8631134, -2.08616257e-07, 0, 1, 0, 1, 0, -1, 0, -2.08616257e-07),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.458824, 0, 0),}) | |
252 | Part = New("Part",BumperCar,"Part",{BrickColor = BrickColor.new("Black"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(3.34999967, 0.0999999866, 2.69999981),CFrame = CFrame.new(-5.1150074, 8.15000057, -37.7131157, 1, 0, 0, 0, 1, 0, 0, 0, 1),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.105882, 0.164706, 0.207843),}) | |
253 | Part = New("Part",BumperCar,"Part",{BrickColor = BrickColor.new("Maroon"),Material = Enum.Material.SmoothPlastic,Shape = Enum.PartType.Cylinder,Size = Vector3.new(2.5999999, 1.20000005, 1.20000005),CFrame = CFrame.new(-5.81500626, 8.19999981, -34.8631134, -2.08616257e-07, 0, 1, 0, 1, 0, -1, 0, -2.08616257e-07),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.458824, 0, 0),}) | |
254 | Wedge = New("WedgePart",BumperCar,"Wedge",{BrickColor = BrickColor.new("Black"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(0.400000006, 0.300000012, 0.200000092),CFrame = CFrame.new(-5.15999985, 9.55000019, -33.3631172, -1, 0, -2.62268316e-07, 0, 1, 0, 2.62268316e-07, 0, -1),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.105882, 0.164706, 0.207843),}) | |
255 | Wedge = New("WedgePart",BumperCar,"Wedge",{BrickColor = BrickColor.new("Maroon"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(0.099999845, 0.199999988, 0.299999952),CFrame = CFrame.new(-4.35999966, 9.90000057, -36.2131157, 1, 7.64274186e-15, 0, 7.64274186e-15, -1, -8.74227766e-08, 0, 8.74227766e-08, -1),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.458824, 0, 0),}) | |
256 | Wedge = New("WedgePart",BumperCar,"Wedge",{BrickColor = BrickColor.new("Medium blue"),Material = Enum.Material.SmoothPlastic,Transparency = 0.5,Transparency = 0.5,Size = Vector3.new(1.49999988, 0.980000019, 0.279999942),CFrame = CFrame.new(-5.16000032, 9.59000015, -36.2031174, -1, 0, -8.74227766e-08, 0, 1, 0, 8.74227766e-08, 0, -1),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.431373, 0.6, 0.792157),}) | |
257 | Part = New("Part",BumperCar,"Part",{BrickColor = BrickColor.new("Dark stone grey"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(3.8499999, 0.099999994, 4),CFrame = CFrame.new(-5.16500711, 8.05000019, -36.9631157, 1, 0, 0, 0, 1, 0, 0, 0, 1),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.388235, 0.372549, 0.384314),}) | |
258 | Wedge = New("WedgePart",BumperCar,"Wedge",{BrickColor = BrickColor.new("Black"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(0.799999952, 0.600000024, 0.299999565),CFrame = CFrame.new(-4.45999908, 9.45000076, -39.5131149, -1.31134158e-07, -1, -1.19248771e-08, 7.10542736e-15, -1.19248762e-08, 0.99999994, -1, 1.31134158e-07, -5.0204151e-15),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.105882, 0.164706, 0.207843),}) | |
259 | Wedge = New("WedgePart",BumperCar,"Wedge",{BrickColor = BrickColor.new("Maroon"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(1.69999993, 0.100000024, 0.299999952),CFrame = CFrame.new(-5.15999985, 10.0500002, -36.2131157, -1, 0, -8.74227766e-08, 0, 1, 0, 8.74227766e-08, 0, -1),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.458824, 0, 0),}) | |
260 | Wedge = New("WedgePart",BumperCar,"Wedge",{BrickColor = BrickColor.new("Black"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(0.400000006, 1.4000001, 0.200000092),CFrame = CFrame.new(-5.15999985, 8.69999981, -33.3631172, 1, 8.74227766e-08, 2.62268316e-07, 8.74227766e-08, -1, 2.29282247e-14, 2.62268316e-07, 0, -1),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.105882, 0.164706, 0.207843),}) | |
261 | Wedge = New("WedgePart",BumperCar,"Wedge",{BrickColor = BrickColor.new("Maroon"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(1, 1, 2),CFrame = CFrame.new(-4.15999985, 8.60000038, -35.3631172, -1.19248806e-08, 1, -1.04250613e-15, 1, 1.19248806e-08, 8.74227766e-08, 8.74227766e-08, 0, -1),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.458824, 0, 0),}) | |
262 | Part = New("Part",BumperCar,"Part",{BrickColor = BrickColor.new("Dark stone grey"),Material = Enum.Material.SmoothPlastic,Shape = Enum.PartType.Cylinder,Size = Vector3.new(0.099999994, 3.9000001, 3.9000001),CFrame = CFrame.new(-5.16500664, 8.05000019, -35.0131149, -4.37113883e-08, -1, 0, 1, -4.37113883e-08, 0, 0, 0, 0.999999821),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.388235, 0.372549, 0.384314),}) | |
263 | Wedge = New("WedgePart",BumperCar,"Wedge",{BrickColor = BrickColor.new("Maroon"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(0.199999958, 1, 3.89999962),CFrame = CFrame.new(-6.80999994, 8.60000038, -37.1131134, -1, 0, -8.74227766e-08, 0, 1, 0, 8.74227766e-08, 0, -1),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.458824, 0, 0),}) | |
264 | Wedge = New("WedgePart",BumperCar,"Wedge",{BrickColor = BrickColor.new("Maroon"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(0.099999845, 0.199999988, 0.0999999493),CFrame = CFrame.new(-4.35999966, 9.90000057, -36.4131165, -1, -1.52854837e-14, 8.74227766e-08, 7.64274186e-15, -1, -8.74227766e-08, 8.74227766e-08, -8.74227766e-08, 1),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.458824, 0, 0),}) | |
265 | Wedge = New("WedgePart",BumperCar,"Wedge",{BrickColor = BrickColor.new("Maroon"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(3.5, 1, 1.19999993),CFrame = CFrame.new(-5.15999985, 8.60000038, -35.7631149, -1, 0, -8.74227766e-08, 0, 1, 0, 8.74227766e-08, 0, -1),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.458824, 0, 0),}) | |
266 | Wedge = New("WedgePart",BumperCar,"Wedge",{BrickColor = BrickColor.new("Maroon"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(1, 1, 2),CFrame = CFrame.new(-6.15999985, 8.60000038, -35.3631172, 9.9347659e-08, -1, 8.68524799e-15, -1, -9.9347659e-08, -8.74227766e-08, 8.74227766e-08, 0, -1),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.458824, 0, 0),}) | |
267 | Wedge = New("WedgePart",BumperCar,"Wedge",{BrickColor = BrickColor.new("Black"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(3, 1, 1.99000001),CFrame = CFrame.new(-5.15999985, 8.60000038, -35.3581161, -1, 0, -8.74227766e-08, 0, 1, 0, 8.74227766e-08, 0, -1),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.105882, 0.164706, 0.207843),}) | |
268 | Wedge = New("WedgePart",BumperCar,"Wedge",{BrickColor = BrickColor.new("Maroon"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(3.5, 0.600000024, 1.59999955),CFrame = CFrame.new(-5.15999985, 8.90000057, -39.3631134, -1, 0, -8.74227766e-08, 8.74227766e-08, 1.19248806e-08, -1, 1.04250613e-15, -1, -1.19248806e-08),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.458824, 0, 0),}) | |
269 | Part = New("Part",BumperCar,"Part",{BrickColor = BrickColor.new("Maroon"),Material = Enum.Material.SmoothPlastic,Shape = Enum.PartType.Cylinder,Size = Vector3.new(0.799999833, 2.29999995, 2.29999995),CFrame = CFrame.new(-5.15999985, 8.69999981, -40.0499992, -2.08616257e-07, 0, 1, 0, 1, 0, -1, 0, -2.08616257e-07),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.458824, 0, 0),}) | |
270 | Part = New("Part",BumperCar,"Part",{BrickColor = BrickColor.new("Olive"),Material = Enum.Material.Neon,Shape = Enum.PartType.Cylinder,Size = Vector3.new(0.099999845, 0.699999988, 0.699999988),CFrame = CFrame.new(-4.51500607, 8.5, -33.4031143, -2.08616257e-07, 0, 1, 0, 1, 0, -1, 0, -2.08616257e-07),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.756863, 0.745098, 0.258824),}) | |
271 | Part = New("Part",BumperCar,"Part",{BrickColor = BrickColor.new("Maroon"),Material = Enum.Material.SmoothPlastic,Shape = Enum.PartType.Cylinder,Size = Vector3.new(0.899999857, 2.39999986, 2.39999986),CFrame = CFrame.new(-5.15999985, 8.69999981, -39.5, -2.08616257e-07, 0, 1, 0, 1, 0, -1, 0, -2.08616257e-07),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.458824, 0, 0),}) | |
272 | Part = New("Part",BumperCar,"Part",{BrickColor = BrickColor.new("Maroon"),Material = Enum.Material.SmoothPlastic,Shape = Enum.PartType.Cylinder,Size = Vector3.new(1.99999988, 1.60000002, 1.60000002),CFrame = CFrame.new(-5.15999985, 9.05000019, -39.9999962, -2.08616257e-07, 0, 1, -1, 1.19248806e-08, -2.08616257e-07, -1.19248806e-08, -1, -2.48772391e-15),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.458824, 0, 0),}) | |
273 | Part = New("Part",BumperCar,"Part",{BrickColor = BrickColor.new("Maroon"),Material = Enum.Material.SmoothPlastic,Shape = Enum.PartType.Cylinder,Size = Vector3.new(0.699999809, 2.0999999, 2.0999999),CFrame = CFrame.new(-5.15999985, 8.55000019, -35.5999985, -2.08616257e-07, 0, 1, 0, 1, 0, -1, 0, -2.08616257e-07),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.458824, 0, 0),}) | |
274 | Part = New("Part",BumperCar,"Part",{BrickColor = BrickColor.new("Maroon"),Material = Enum.Material.SmoothPlastic,Shape = Enum.PartType.Cylinder,Size = Vector3.new(0.71999979, 2.19999981, 2.19999981),CFrame = CFrame.new(-5.15999985, 8.60000038, -36.0099983, -2.08616257e-07, 0, 1, 0, 1, 0, -1, 0, -2.08616257e-07),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.458824, 0, 0),}) | |
275 | Part = New("Part",BumperCar,"Part",{BrickColor = BrickColor.new("Black"),Material = Enum.Material.SmoothPlastic,Shape = Enum.PartType.Cylinder,Size = Vector3.new(2.79999995, 0.800000072, 0.800000072),CFrame = CFrame.new(-4.51500654, 8.5, -34.7631149, -2.08616257e-07, 0, 1, 0, 1, 0, -1, 0, -2.08616257e-07),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.105882, 0.164706, 0.207843),}) | |
276 | Wedge = New("WedgePart",BumperCar,"Wedge",{BrickColor = BrickColor.new("Maroon"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(0.099999845, 0.199999988, 0.0999999493),CFrame = CFrame.new(-5.95999956, 9.90000057, -36.4131165, -1, -1.52854837e-14, 8.74227766e-08, 7.64274186e-15, -1, -8.74227766e-08, 8.74227766e-08, -8.74227766e-08, 1),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.458824, 0, 0),}) | |
277 | ||
278 | ||
279 | ||
280 | ||
281 | FrontPart = New("Part",BumperCar,"Part",{BrickColor = BrickColor.new("Really black"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(6, 6, 6),CFrame = CFrame.new(-5.16500664, 7.55000019, -34.9631157, -4.37113883e-08, -1, 0, 1, -4.37113883e-08, 0, 0, 0, 0.999999821),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.0666667, 0.0666667, 0.0666667),Transparency = 1,}) | |
282 | ||
283 | ||
284 | ||
285 | ||
286 | ||
287 | ||
288 | ||
289 | ||
290 | ||
291 | ||
292 | ||
293 | ||
294 | ||
295 | ||
296 | ||
297 | ||
298 | local all,last = {} | |
299 | function scan(p) | |
300 | for _,v in pairs(p:GetChildren()) do | |
301 | if (v:IsA("BasePart")) then | |
302 | if (last) then | |
303 | local w = Instance.new("Weld") | |
304 | w.Part0,w.Part1 = last,v | |
305 | w.C0 = v.CFrame:toObjectSpace(last.CFrame):inverse() | |
306 | w.Parent = last | |
307 | end | |
308 | table.insert(all,v) | |
309 | last = v | |
310 | end | |
311 | scan(v) | |
312 | end | |
313 | end | |
314 | scan(BumperCar) | |
315 | ||
316 | ||
317 | for _,v in pairs(all) do v.Anchored = false v.CanCollide = false end | |
318 | BumperCar.Parent = Character | |
319 | ||
320 | ||
321 | local Services = { | |
322 | ||
323 | ||
324 | SoundService = game:GetService("SoundService"); | |
325 | Players = game:GetService("Players"); | |
326 | Debris = game:GetService("Debris"); | |
327 | Workspace = game:GetService("Workspace"); | |
328 | Lighting = game:GetService("Lighting"); | |
329 | HttpService = game:GetService("HttpService"); | |
330 | InsertService = game:GetService("InsertService"); | |
331 | ||
332 | } | |
333 | ||
334 | local NeckCF = cn(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) | |
335 | Humanoid.Animator:Destroy() | |
336 | Character.Animate:Destroy() | |
337 | ||
338 | local RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14) | |
339 | local RHCF = CFrame.fromEulerAnglesXYZ(0, 1.6, 0) | |
340 | local LHCF = CFrame.fromEulerAnglesXYZ(0, -1.6, 0) | |
341 | ||
342 | ||
343 | ||
344 | SWW = Instance.new("Weld") | |
345 | SWW.Name = "SWW" | |
346 | SWW.Part0 = Torso | |
347 | SWW.C0 = cn(0, -2.6, -1)*angles(math.rad(-0),math.rad(-180),math.rad(0)) | |
348 | SWW.C1 = cn(0, 0, 0) | |
349 | SWW.Part1 = SwHandle | |
350 | SWW.Parent = Torso | |
351 | ||
352 | RSH, LSH = nil, nil | |
353 | ||
354 | RW = Instance.new("Weld") | |
355 | LW = Instance.new("Weld") | |
356 | ||
357 | RH = Torso["Right Hip"] | |
358 | LH = Torso["Left Hip"] | |
359 | ||
360 | RSH = Torso["Right Shoulder"] | |
361 | LSH = Torso["Left Shoulder"] | |
362 | ||
363 | RSH.Parent = nil | |
364 | LSH.Parent = nil | |
365 | ||
366 | RW.Name = "RW" | |
367 | RW.Part0 = Torso | |
368 | RW.C0 = cn(1.5, 0.5, 0) | |
369 | RW.C1 = cn(0, 0.5, 0) | |
370 | RW.Part1 = RightArm | |
371 | RW.Parent = Torso | |
372 | ||
373 | LW.Name = "LW" | |
374 | LW.Part0 = Torso | |
375 | LW.C0 = cn(-1.5, 0.5, 0) | |
376 | LW.C1 = cn(0, 0.5, 0) | |
377 | LW.Part1 = LeftArm | |
378 | LW.Parent = Torso | |
379 | ||
380 | function clerp(a, b, t) | |
381 | local qa = { | |
382 | QuaternionFromCFrame(a) | |
383 | } | |
384 | local qb = { | |
385 | QuaternionFromCFrame(b) | |
386 | } | |
387 | local ax, ay, az = a.x, a.y, a.z | |
388 | local bx, by, bz = b.x, b.y, b.z | |
389 | local _t = 1 - t | |
390 | return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t)) | |
391 | end | |
392 | ||
393 | function QuaternionFromCFrame(cf) | |
394 | local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components() | |
395 | local trace = m00 + m11 + m22 | |
396 | if trace > 0 then | |
397 | local s = math.sqrt(1 + trace) | |
398 | local recip = 0.5 / s | |
399 | return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5 | |
400 | else | |
401 | local i = 0 | |
402 | if m11 > m00 then | |
403 | i = 1 | |
404 | end | |
405 | if m22 > (i == 0 and m00 or m11) then | |
406 | i = 2 | |
407 | end | |
408 | if i == 0 then | |
409 | local s = math.sqrt(m00 - m11 - m22 + 1) | |
410 | local recip = 0.5 / s | |
411 | return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip | |
412 | elseif i == 1 then | |
413 | local s = math.sqrt(m11 - m22 - m00 + 1) | |
414 | local recip = 0.5 / s | |
415 | return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip | |
416 | elseif i == 2 then | |
417 | local s = math.sqrt(m22 - m00 - m11 + 1) | |
418 | local recip = 0.5 / s | |
419 | return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip | |
420 | end | |
421 | end | |
422 | end | |
423 | ||
424 | function QuaternionToCFrame(px, py, pz, x, y, z, w) | |
425 | local xs, ys, zs = x + x, y + y, z + z | |
426 | local wx, wy, wz = w * xs, w * ys, w * zs | |
427 | local xx = x * xs | |
428 | local xy = x * ys | |
429 | local xz = x * zs | |
430 | local yy = y * ys | |
431 | local yz = y * zs | |
432 | local zz = z * zs | |
433 | return CFrame.new(px, py, pz, 1 - (yy + zz), xy - wz, xz + wy, xy + wz, 1 - (xx + zz), yz - wx, xz - wy, yz + wx, 1 - (xx + yy)) | |
434 | end | |
435 | ||
436 | function QuaternionSlerp(a, b, t) | |
437 | local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4] | |
438 | local startInterp, finishInterp; | |
439 | if cosTheta >= 0.0001 then | |
440 | if (1 - cosTheta) > 0.0001 then | |
441 | local theta = math.acos(cosTheta) | |
442 | local invSinTheta = 1 / math.sin(theta) | |
443 | startInterp = math.sin((1 - t) * theta) * invSinTheta | |
444 | finishInterp = math.sin(t * theta) * invSinTheta | |
445 | else | |
446 | startInterp = 1 - t | |
447 | finishInterp = t | |
448 | end | |
449 | else | |
450 | if (1 + cosTheta) > 0.0001 then | |
451 | local theta = math.acos(-cosTheta) | |
452 | local invSinTheta = 1 / math.sin(theta) | |
453 | startInterp = math.sin((t - 1) * theta) * invSinTheta | |
454 | finishInterp = math.sin(t * theta) * invSinTheta | |
455 | else | |
456 | startInterp = t - 1 | |
457 | finishInterp = t | |
458 | end | |
459 | end | |
460 | return a[1] * startInterp + b[1] * finishInterp, a[2] * startInterp + b[2] * finishInterp, a[3] * startInterp + b[3] * finishInterp, a[4] * startInterp + b[4] * finishInterp | |
461 | end | |
462 | ||
463 | function swait(num) | |
464 | if num == 0 or num == nil then | |
465 | game:service'RunService'.RenderStepped:wait(0) | |
466 | else | |
467 | for i = 0, num do | |
468 | game:service'RunService'.RenderStepped:wait(0) | |
469 | end | |
470 | end | |
471 | end | |
472 | ||
473 | local RbxUtility = LoadLibrary("RbxUtility") | |
474 | local Create = RbxUtility.Create | |
475 | ||
476 | function RemoveOutlines(part) | |
477 | part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10 | |
478 | end | |
479 | ||
480 | function CreatePart(FormFactor, Parent, Material, Reflectance, Transparency, BColor, Name, Size) | |
481 | local Part = Create("Part"){ | |
482 | formFactor = FormFactor, | |
483 | Parent = Parent, | |
484 | Reflectance = Reflectance, | |
485 | Transparency = Transparency, | |
486 | CanCollide = false, | |
487 | Locked = true, | |
488 | BrickColor = BrickColor.new(tostring(BColor)), | |
489 | Name = Name, | |
490 | Size = Size, | |
491 | Material = Material, | |
492 | } | |
493 | RemoveOutlines(Part) | |
494 | return Part | |
495 | end | |
496 | ||
497 | function CreateMesh(Mesh, Part, MeshType, MeshId, OffSet, Scale) | |
498 | local Msh = Create(Mesh){ | |
499 | Parent = Part, | |
500 | Offset = OffSet, | |
501 | Scale = Scale, | |
502 | } | |
503 | if Mesh == "SpecialMesh" then | |
504 | Msh.MeshType = MeshType | |
505 | Msh.MeshId = MeshId | |
506 | end | |
507 | return Msh | |
508 | end | |
509 | ||
510 | function CreateWeld(Parent, Part0, Part1, C0, C1) | |
511 | local Weld = Create("Weld"){ | |
512 | Parent = Parent, | |
513 | Part0 = Part0, | |
514 | Part1 = Part1, | |
515 | C0 = C0, | |
516 | C1 = C1, | |
517 | } | |
518 | return Weld | |
519 | end | |
520 | ||
521 | function rayCast(Position, Direction, Range, Ignore) | |
522 | return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore) | |
523 | end | |
524 | ||
525 | function CreateSound(id, par, vol, pit) | |
526 | coroutine.resume(coroutine.create(function() | |
527 | local sou = Instance.new("Sound", par or workspace) | |
528 | sou.Volume = vol | |
529 | sou.Pitch = pit or 1 | |
530 | sou.SoundId = id | |
531 | wait() | |
532 | sou:play() | |
533 | game:GetService("Debris"):AddItem(sou, 6) | |
534 | end)) | |
535 | end | |
536 | function CreateSong(id, par, vol, pit) | |
537 | coroutine.resume(coroutine.create(function() | |
538 | sou2 = Instance.new("Sound", par or workspace) | |
539 | sou2.Volume = vol | |
540 | sou2.Pitch = 1 | |
541 | sou2.SoundId = id | |
542 | wait() | |
543 | sou2:play() | |
544 | sou2.Looped = true | |
545 | end)) | |
546 | end | |
547 | ||
548 | local function getclosest(obj, distance) | |
549 | local last, lastx = distance + 1 | |
550 | for i, v in pairs(workspace:GetChildren()) do | |
551 | if v:IsA'Model' and v ~= Character and v:findFirstChild('Humanoid') and v:findFirstChild('Torso') and v:findFirstChild('Humanoid').Health > 0 then | |
552 | local t = v.Torso | |
553 | local dist = (t.Position - obj.Position).magnitude | |
554 | if dist <= distance then | |
555 | if dist < last then | |
556 | last = dist | |
557 | lastx = v | |
558 | end | |
559 | end | |
560 | end | |
561 | end | |
562 | return lastx | |
563 | end | |
564 | ||
565 | function Damage(hit, damage, cooldown, Color1, Color2, HSound, HPitch) | |
566 | for i, v in pairs(hit:GetChildren()) do | |
567 | if v:IsA("Humanoid") and hit.Name ~= Character.Name then | |
568 | local find = v:FindFirstChild("Hitz") | |
569 | if not find then | |
570 | if v.Parent:findFirstChild("Head") then | |
571 | local BillG = Create("BillboardGui"){ | |
572 | Parent = v.Parent.Head, | |
573 | Size = UDim2.new(1, 0, 1, 0), | |
574 | Adornee = v.Parent.Head, | |
575 | StudsOffset = Vector3.new(math.random(-3, 3), math.random(3, 5), math.random(-3, 3)), | |
576 | } | |
577 | local TL = Create("TextLabel"){ | |
578 | Parent = BillG, | |
579 | Size = UDim2.new(3, 3, 3, 3), | |
580 | BackgroundTransparency = 1, | |
581 | Text = tostring(damage).."-", | |
582 | TextColor3 = Color1.Color, | |
583 | TextStrokeColor3 = Color2.Color, | |
584 | TextStrokeTransparency = 0, | |
585 | TextXAlignment = Enum.TextXAlignment.Center, | |
586 | TextYAlignment = Enum.TextYAlignment.Center, | |
587 | FontSize = Enum.FontSize.Size18, | |
588 | Font = "ArialBold", | |
589 | } | |
590 | coroutine.resume(coroutine.create(function() | |
591 | wait(1) | |
592 | for i = 0, 1, .1 do | |
593 | wait(.1) | |
594 | BillG.StudsOffset = BillG.StudsOffset + Vector3.new(0, .1, 0) | |
595 | end | |
596 | BillG:Destroy() | |
597 | end)) | |
598 | end | |
599 | v.Health = v.Health - damage | |
600 | local bool = Create("BoolValue"){ | |
601 | Parent = v, | |
602 | Name = 'Hitz', | |
603 | } | |
604 | if HSound ~= nil and HPitch ~= nil then | |
605 | CreateSound(HSound, hit, 1, HPitch) | |
606 | end | |
607 | game:GetService("Debris"):AddItem(bool, cooldown) | |
608 | end | |
609 | end | |
610 | end | |
611 | end | |
612 | ||
613 | ||
614 | function BlockEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, Type) | |
615 | local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new()) | |
616 | prt.Anchored = true | |
617 | prt.CFrame = cframe | |
618 | local msh = CreateMesh("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
619 | game:GetService("Debris"):AddItem(prt, 10) | |
620 | if Type == 1 or Type == nil then | |
621 | table.insert(Effects, { | |
622 | prt, | |
623 | "Block1", | |
624 | delay, | |
625 | x3, | |
626 | y3, | |
627 | z3, | |
628 | msh | |
629 | }) | |
630 | elseif Type == 2 then | |
631 | table.insert(Effects, { | |
632 | prt, | |
633 | "Block2", | |
634 | delay, | |
635 | x3, | |
636 | y3, | |
637 | z3, | |
638 | msh | |
639 | }) | |
640 | elseif Type == 3 then | |
641 | table.insert(Effects, { | |
642 | prt, | |
643 | "Block3", | |
644 | delay, | |
645 | x3, | |
646 | y3, | |
647 | z3, | |
648 | msh | |
649 | }) | |
650 | end | |
651 | end | |
652 | ||
653 | function SphereEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
654 | local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new()) | |
655 | prt.Anchored = true | |
656 | prt.CFrame = cframe | |
657 | local msh = CreateMesh("SpecialMesh", prt, "Sphere", "nil", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
658 | game:GetService("Debris"):AddItem(prt, 10) | |
659 | table.insert(Effects, { | |
660 | prt, | |
661 | "Cylinder", | |
662 | delay, | |
663 | x3, | |
664 | y3, | |
665 | z3, | |
666 | msh | |
667 | }) | |
668 | end | |
669 | ||
670 | function RingEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
671 | local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5)) | |
672 | prt.Anchored = true | |
673 | prt.CFrame = cframe * CFrame.new(x1, y1, z1) | |
674 | local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "264766957", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
675 | game:GetService("Debris"):AddItem(prt, 10) | |
676 | table.insert(Effects, { | |
677 | prt, | |
678 | "Cylinder", | |
679 | delay, | |
680 | x3, | |
681 | y3, | |
682 | z3, | |
683 | msh | |
684 | }) | |
685 | end | |
686 | ||
687 | function CylinderEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
688 | local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new()) | |
689 | prt.Anchored = true | |
690 | prt.CFrame = cframe | |
691 | local msh = CreateMesh("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
692 | game:GetService("Debris"):AddItem(prt, 10) | |
693 | table.insert(Effects, { | |
694 | prt, | |
695 | "Cylinder", | |
696 | delay, | |
697 | x3, | |
698 | y3, | |
699 | z3, | |
700 | msh | |
701 | }) | |
702 | end | |
703 | ||
704 | function WaveEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
705 | local prt = CreatePart(3, workspace,"Neon", 0, 0, brickcolor, "Effect", Vector3.new()) | |
706 | prt.Anchored = true | |
707 | prt.CFrame = cframe | |
708 | local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "264766957", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
709 | game:GetService("Debris"):AddItem(prt, 10) | |
710 | table.insert(Effects, { | |
711 | prt, | |
712 | "Cylinder", | |
713 | delay, | |
714 | x3, | |
715 | y3, | |
716 | z3, | |
717 | msh | |
718 | }) | |
719 | end | |
720 | ||
721 | function SpecialEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
722 | local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new()) | |
723 | prt.Anchored = true | |
724 | prt.CFrame = cframe | |
725 | local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "24388358", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
726 | game:GetService("Debris"):AddItem(prt, 10) | |
727 | table.insert(Effects, { | |
728 | prt, | |
729 | "Cylinder", | |
730 | delay, | |
731 | x3, | |
732 | y3, | |
733 | z3, | |
734 | msh | |
735 | }) | |
736 | end | |
737 | ||
738 | function BreakEffect(brickcolor, cframe, x1, y1, z1) | |
739 | local prt = CreatePart(3, workspace, "Neon", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5)) | |
740 | prt.Anchored = true | |
741 | prt.CFrame = cframe * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)) | |
742 | local msh = CreateMesh("SpecialMesh", prt, "Sphere", "nil", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
743 | local num = math.random(10, 50) / 1000 | |
744 | game:GetService("Debris"):AddItem(prt, 10) | |
745 | table.insert(Effects, { | |
746 | prt, | |
747 | "Shatter", | |
748 | num, | |
749 | prt.CFrame, | |
750 | math.random() - math.random(), | |
751 | 0, | |
752 | math.random(50, 100) / 100 | |
753 | }) | |
754 | end | |
755 | ||
756 | ||
757 | ||
758 | ||
759 | for i = 0, 1, 0.05 do | |
760 | swait() | |
761 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .1) | |
762 | Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(5), math.rad(0), math.rad(0)), .1) | |
763 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -.1) * angles(math.rad(5), math.rad(0), math.rad(5)), 0.1) | |
764 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(20), math.rad(0), math.rad(-10)), 0.3) | |
765 | if Torsovelocity > 2 then | |
766 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-50 * math.cos(sine / 4)), math.rad(0), math.rad(4 * math.cos(sine / 4))), .2) | |
767 | RH.C0 = clerp(RH.C0, cn(1, -1 + .1 * math.cos(sine / 5), 0) * RHCF * angles(math.rad(-2), math.rad(0), math.rad(30 * math.cos(sine / 4))), .3) | |
768 | LH.C0 = clerp(LH.C0, cn(-1, -1 + .1 * math.cos(sine / 5), 0) * LHCF * angles(math.rad(-2), math.rad(0), math.rad(30 * math.cos(sine / 4))), .3) | |
769 | elseif Torsovelocity < 1 then | |
770 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -.1) * angles(math.rad(5), math.rad(0), math.rad(5)), 0.1) | |
771 | RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(-2), math.rad(5), math.rad(0)), .1) | |
772 | LH.C0 = clerp(LH.C0, cn(-1, -1, 0) * LHCF * angles(math.rad(-2), math.rad(5), math.rad(0)), .1) | |
773 | end | |
774 | end | |
775 | attack = false | |
776 | ||
777 | ||
778 | ||
779 | game:GetService'RunService'.Stepped:connect(function() | |
780 | Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude | |
781 | velocity = RootPart.Velocity.y | |
782 | sine = sine + change | |
783 | local hit, pos = rayCast(RootPart.Position, (CFrame.new(RootPart.Position, RootPart.Position - Vector3.new(0, 1, 0))).lookVector, 4, Character) | |
784 | if equipped == true or equipped == false then | |
785 | if RootPart.Velocity.y > -1 and hit == nil then | |
786 | Anim = "Jump" | |
787 | inair = true | |
788 | if attack == false then | |
789 | s.Pitch = 1 | |
790 | s.Volume = 1 | |
791 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0.05, 0, -1.1) * angles(math.rad(15), math.rad(0), math.rad(0)), .1) | |
792 | Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-1 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(-0)), .1) | |
793 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5 - 0.01 * math.cos(sine / 8), -.0) * angles(math.rad(45 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(-15)), 0.1) | |
794 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5 - 0.01 * math.cos(sine / 8) , -.0) * angles(math.rad(45 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(15)), 0.1) | |
795 | RH.C0 = clerp(RH.C0, cn(1, -1 - 0.1 * math.cos(sine / 8), 0) * RHCF * angles(math.rad(-6), math.rad(0), math.rad(90 + .05 * math.cos(sine / 25))), .1) | |
796 | LH.C0 = clerp(LH.C0, cn(-1, -1 - 0.1 * math.cos(sine / 8), -.0) * LHCF * angles(math.rad(6), math.rad(-0), math.rad(-90 + .05 * math.cos(sine / 25))), .1) | |
797 | SWW.C0 = clerp(SWW.C0, CFrame.new(0,-1.5,-.8) * angles(math.rad(-0),math.rad(-180),math.rad(0)), 0.1) | |
798 | end | |
799 | ||
800 | elseif RootPart.Velocity.y < -1 and hit == nil then | |
801 | Anim = "Fall" | |
802 | inair = true | |
803 | if attack == false then | |
804 | s.Pitch = .7 | |
805 | s.Volume = .5 | |
806 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0.05, 0, -1.1) * angles(math.rad(-5), math.rad(0), math.rad(0)), .1) | |
807 | Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-1 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(-0)), .1) | |
808 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5 - 0.01 * math.cos(sine / 8), -.0) * angles(math.rad(180 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(45)), 0.05) | |
809 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5 - 0.01 * math.cos(sine / 8) , -.0) * angles(math.rad(180 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(-45)), 0.05) | |
810 | RH.C0 = clerp(RH.C0, cn(1, -1 - 0.1 * math.cos(sine / 8), 0) * RHCF * angles(math.rad(-6), math.rad(0), math.rad(90 + .05 * math.cos(sine / 25))), .1) | |
811 | LH.C0 = clerp(LH.C0, cn(-1, -1 - 0.1 * math.cos(sine / 8), -.0) * LHCF * angles(math.rad(6), math.rad(-0), math.rad(-90 + .05 * math.cos(sine / 25))), .1) | |
812 | SWW.C0 = clerp(SWW.C0, CFrame.new(0,-1.5,-.8) * angles(math.rad(-0),math.rad(-180),math.rad(0)), 0.1) | |
813 | end | |
814 | elseif Torsovelocity < 1 and hit ~= nil then | |
815 | Anim = "Idle" | |
816 | ||
817 | inair = false | |
818 | if attack == false then | |
819 | s.Pitch = .7 | |
820 | s.Volume = .5 | |
821 | change = 0.8 | |
822 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0.05, 0, -1.1) * angles(math.rad(0), math.rad(0), math.rad(0)), .1) | |
823 | Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-1 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(-0)), .1) | |
824 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5 - 0.01 * math.cos(sine / 8), -.0) * angles(math.rad(45 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(0)), 0.1) | |
825 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5 - 0.01 * math.cos(sine / 8) , -.0) * angles(math.rad(45 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(0)), 0.1) | |
826 | RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(-6), math.rad(0), math.rad(90 + .05 * math.cos(sine / 25))), .1) | |
827 | LH.C0 = clerp(LH.C0, cn(-1, -1, -.0) * LHCF * angles(math.rad(6), math.rad(-0), math.rad(-90 + .05 * math.cos(sine / 25))), .1) | |
828 | SWW.C0 = clerp(SWW.C0, CFrame.new(0,-1.5,-.8) * angles(math.rad(-0),math.rad(-180),math.rad(0)), 0.1) | |
829 | end --]] | |
830 | ||
831 | elseif Torsovelocity > 1 and hit ~= nil then | |
832 | Anim = "Walk" | |
833 | inair = false | |
834 | ||
835 | if attack == false and Runkey == true then | |
836 | s.Pitch = 1 | |
837 | s.Volume = .9 | |
838 | ||
839 | change = 1 | |
840 | Humanoid.WalkSpeed = 30 | |
841 | Humanoid.JumpPower = 55 | |
842 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0.05, 0, -1.1) * angles(math.rad(-45), math.rad(0) + RootPart.RotVelocity.Y/40, math.rad(2 * math.cos(sine / 1))), .4) | |
843 | Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(35 - 1 * math.cos(sine / 4)), math.rad(0), math.rad(-0) + RootPart.RotVelocity.Y/20), .2) | |
844 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5 - 0.01 * math.cos(sine / 8), -.0) * angles(math.rad(25 - 1 * math.cos(sine / 4)), math.rad(0), math.rad(-45)), 0.2) | |
845 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5 - 0.01 * math.cos(sine / 8) , -.0) * angles(math.rad(25 + 1 * math.cos(sine / 4)), math.rad(0), math.rad(45)), 0.2) | |
846 | RH.C0 = clerp(RH.C0, cn(.6, -1, 0) * RHCF * angles(math.rad(6), math.rad(0), math.rad(45 + .05 * math.cos(sine / 25))), .4) | |
847 | LH.C0 = clerp(LH.C0, cn(-.6, -1, -.0) * LHCF * angles(math.rad(6), math.rad(-0), math.rad(-45 + .05 * math.cos(sine / 25))), .4) | |
848 | SWW.C0 = clerp(SWW.C0, CFrame.new(0,-1,1) * angles(math.rad(-45),math.rad(-180),math.rad(0)), 0.4) | |
849 | end | |
850 | if attack == false and Runkey == false then | |
851 | s.Pitch = .8 | |
852 | s.Volume = .6 | |
853 | change = 0.65 | |
854 | Humanoid.WalkSpeed = 13 --* math.cos(sine / 2) | |
855 | Humanoid.JumpPower = 50 | |
856 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0.05, 0, -1.1) * angles(math.rad(0), math.rad(0), math.rad(.5 * math.cos(sine / 1))), .3) | |
857 | Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-1 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(-0) + RootPart.RotVelocity.Y/20), .1) | |
858 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5 - 0.01 * math.cos(sine / 8), -.0) * angles(math.rad(45 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(0)), 0.1) | |
859 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5 - 0.01 * math.cos(sine / 8) , -.0) * angles(math.rad(45 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(0)), 0.1) | |
860 | RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(-6), math.rad(0), math.rad(90 + .05 * math.cos(sine / 25))), .1) | |
861 | LH.C0 = clerp(LH.C0, cn(-1, -1, -.0) * LHCF * angles(math.rad(6), math.rad(-0), math.rad(-90 + .05 * math.cos(sine / 25))), .1) | |
862 | SWW.C0 = clerp(SWW.C0, CFrame.new(0,-1.5,-.8) * angles(math.rad(-0),math.rad(-180),math.rad(0)), 0.1) | |
863 | end | |
864 | ||
865 | ||
866 | ||
867 | ||
868 | function onClimbing(speed) | |
869 | if attack == false then | |
870 | attack = true | |
871 | Climbanim= true | |
872 | Humanoid.WalkSpeed = 14 | |
873 | while Climbanim == true do | |
874 | for i = 0, 0, 0.1 do | |
875 | swait() | |
876 | ||
877 | change = 0.5 | |
878 | ||
879 | ||
880 | ||
881 | if RootPart.Velocity.y > .01 then | |
882 | s.Pitch = .9 | |
883 | s.Volume = .5 | |
884 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0.05, 1, -1.1) * angles(math.rad(-90), math.rad(0), math.rad(0)), .3) | |
885 | Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-1 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(-0)), .1) | |
886 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5 - 0.01 * math.cos(sine / 8), -.0) * angles(math.rad(45 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(0)), 0.1) | |
887 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5 - 0.01 * math.cos(sine / 8) , -.0) * angles(math.rad(45 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(0)), 0.1) | |
888 | RH.C0 = clerp(RH.C0, cn(1, -1 - 0.1 * math.cos(sine / 8), 0) * RHCF * angles(math.rad(-6), math.rad(0), math.rad(90 + .05 * math.cos(sine / 25))), .1) | |
889 | LH.C0 = clerp(LH.C0, cn(-1, -1 - 0.1 * math.cos(sine / 8), -.0) * LHCF * angles(math.rad(6), math.rad(-0), math.rad(-90 + .05 * math.cos(sine / 25))), .1) | |
890 | SWW.C0 = clerp(SWW.C0, CFrame.new(0,-1.5,-.8) * angles(math.rad(-0),math.rad(-180),math.rad(0)), 0.1) | |
891 | end | |
892 | ||
893 | ||
894 | ||
895 | ||
896 | if RootPart.Velocity.y < .5 and RootPart.Velocity.y > -0.5 then | |
897 | s.Pitch = .7 | |
898 | s.Volume = .5 | |
899 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0.05, 1, -1.1) * angles(math.rad(-90), math.rad(0), math.rad(0)), .1) | |
900 | Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-1 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(-0)), .1) | |
901 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5 - 0.01 * math.cos(sine / 8), -.0) * angles(math.rad(45 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(0)), 0.1) | |
902 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5 - 0.01 * math.cos(sine / 8) , -.0) * angles(math.rad(45 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(0)), 0.1) | |
903 | RH.C0 = clerp(RH.C0, cn(1, -1 - 0.1 * math.cos(sine / 8), 0) * RHCF * angles(math.rad(-6), math.rad(0), math.rad(90 + .05 * math.cos(sine / 25))), .1) | |
904 | LH.C0 = clerp(LH.C0, cn(-1, -1 - 0.1 * math.cos(sine / 8), -.0) * LHCF * angles(math.rad(6), math.rad(-0), math.rad(-90 + .05 * math.cos(sine / 25))), .1) | |
905 | SWW.C0 = clerp(SWW.C0, CFrame.new(0,-1.5,-.8) * angles(math.rad(-0),math.rad(-180),math.rad(0)), 0.1) | |
906 | end | |
907 | ||
908 | ||
909 | if RootPart.Velocity.y < -1 then | |
910 | s.Pitch = .9 | |
911 | s.Volume = .5 | |
912 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0.05, 1, -1.1) * angles(math.rad(-90), math.rad(0), math.rad(180)), .3) | |
913 | Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-1 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(-0)), .1) | |
914 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5 - 0.01 * math.cos(sine / 8), -.0) * angles(math.rad(45 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(0)), 0.1) | |
915 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5 - 0.01 * math.cos(sine / 8) , -.0) * angles(math.rad(45 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(0)), 0.1) | |
916 | RH.C0 = clerp(RH.C0, cn(1, -1 - 0.1 * math.cos(sine / 8), 0) * RHCF * angles(math.rad(-6), math.rad(0), math.rad(90 + .05 * math.cos(sine / 25))), .1) | |
917 | LH.C0 = clerp(LH.C0, cn(-1, -1 - 0.1 * math.cos(sine / 8), -.0) * LHCF * angles(math.rad(6), math.rad(-0), math.rad(-90 + .05 * math.cos(sine / 25))), .1) | |
918 | SWW.C0 = clerp(SWW.C0, CFrame.new(0,-1.5,-.8) * angles(math.rad(-0),math.rad(-180),math.rad(0)), 0.1) end | |
919 | ||
920 | end | |
921 | if Torsovelocity > 1 then | |
922 | Climbanim = false | |
923 | end | |
924 | end | |
925 | attack = false | |
926 | end | |
927 | end | |
928 | Humanoid.Climbing:connect(onClimbing) | |
929 | ||
930 | ||
931 | ||
932 | end | |
933 | end | |
934 | ||
935 | ||
936 | if #Effects > 0 then | |
937 | for e = 1, #Effects do | |
938 | if Effects[e] ~= nil then | |
939 | local Thing = Effects[e] | |
940 | if Thing ~= nil then | |
941 | local Part = Thing[1] | |
942 | local Mode = Thing[2] | |
943 | local Delay = Thing[3] | |
944 | local IncX = Thing[4] | |
945 | local IncY = Thing[5] | |
946 | local IncZ = Thing[6] | |
947 | if Thing[1].Transparency <= 1 then | |
948 | if Thing[2] == "Block1" then | |
949 | Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)) | |
950 | local Mesh = Thing[1].Mesh | |
951 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
952 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
953 | elseif Thing[2] == "Block2" then | |
954 | Thing[1].CFrame = Thing[1].CFrame+Vector3.new(0,-.0,0) | |
955 | local Mesh = Thing[7] | |
956 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
957 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
958 | elseif Thing[2] == "Block3" then | |
959 | Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))+Vector3.new(0,.15,0) | |
960 | local Mesh = Thing[7] | |
961 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
962 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
963 | elseif Thing[2] == "Cylinder" then | |
964 | local Mesh = Thing[1].Mesh | |
965 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
966 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
967 | elseif Thing[2] == "Blood" then | |
968 | local Mesh = Thing[7] | |
969 | Thing[1].CFrame = Thing[1].CFrame * Vector3.new(0, .5, 0) | |
970 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
971 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
972 | elseif Thing[2] == "Elec" then | |
973 | local Mesh = Thing[1].Mesh | |
974 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[7], Thing[8], Thing[9]) | |
975 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
976 | elseif Thing[2] == "Disappear" then | |
977 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
978 | elseif Thing[2] == "Shatter" then | |
979 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
980 | Thing[4] = Thing[4] * CFrame.new(0, Thing[7], 0) | |
981 | Thing[1].CFrame = Thing[4] * CFrame.fromEulerAnglesXYZ(Thing[6], 0, 0) | |
982 | Thing[6] = Thing[6] + Thing[5] | |
983 | end | |
984 | else | |
985 | Part.Parent = nil | |
986 | table.remove(Effects, e) | |
987 | end | |
988 | end | |
989 | end | |
990 | end | |
991 | end | |
992 | end) | |
993 | ||
994 | ||
995 | Effects = { | |
996 | Block = {Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, Type) | |
997 | ||
998 | local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new()) | |
999 | prt.Anchored = true | |
1000 | prt.CFrame = cframe | |
1001 | local msh = CFuncs.Mesh.Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
1002 | game:GetService("Debris"):AddItem(prt, 10) | |
1003 | if Type == 1 or Type == nil then | |
1004 | table.insert(Effects, {prt, "Block1", delay, x3, y3, z3, msh}) | |
1005 | else | |
1006 | if Type == 2 then | |
1007 | table.insert(Effects, {prt, "Block2", delay, x3, y3, z3, msh}) | |
1008 | else | |
1009 | table.insert(Effects, {prt, "Block3", delay, x3, y3, z3, msh}) | |
1010 | end | |
1011 | end | |
1012 | end | |
1013 | } | |
1014 | , | |
1015 | Sphere = {Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
1016 | ||
1017 | local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new()) | |
1018 | prt.Anchored = true | |
1019 | prt.CFrame = cframe | |
1020 | local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
1021 | game:GetService("Debris"):AddItem(prt, 10) | |
1022 | table.insert(Effects, {prt, "Cylinder", delay, x3, y3, z3, msh}) | |
1023 | end | |
1024 | } | |
1025 | , | |
1026 | Cylinder = {Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
1027 | ||
1028 | local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new()) | |
1029 | prt.Anchored = true | |
1030 | prt.CFrame = cframe | |
1031 | local msh = CFuncs.Mesh.Create("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
1032 | game:GetService("Debris"):AddItem(prt, 10) | |
1033 | table.insert(Effects, {prt, "Cylinder", delay, x3, y3, z3, msh}) | |
1034 | end | |
1035 | } | |
1036 | , | |
1037 | Wave = {Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
1038 | ||
1039 | local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new()) | |
1040 | prt.Anchored = true | |
1041 | prt.CFrame = cframe | |
1042 | local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "rbxassetid://431164262", Vector3.new(0, 0, 0), Vector3.new(x1/60, y1/60, z1/60)) | |
1043 | game:GetService("Debris"):AddItem(prt, 10) | |
1044 | table.insert(Effects, {prt, "Cylinder", delay, x3/60, y3/60, z3/60, msh}) | |
1045 | end | |
1046 | } | |
1047 | , | |
1048 | Ring = {Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
1049 | ||
1050 | local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new()) | |
1051 | prt.Anchored = true | |
1052 | prt.CFrame = cframe | |
1053 | local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "rbxassetid://3270017", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
1054 | game:GetService("Debris"):AddItem(prt, 10) | |
1055 | table.insert(Effects, {prt, "Cylinder", delay, x3, y3, z3, msh}) | |
1056 | end | |
1057 | } | |
1058 | , | |
1059 | Break = {Create = function(brickcolor, cframe, x1, y1, z1) | |
1060 | ||
1061 | local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5)) | |
1062 | prt.Anchored = true | |
1063 | prt.CFrame = cframe * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)) | |
1064 | local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
1065 | local num = math.random(10, 50) / 1000 | |
1066 | game:GetService("Debris"):AddItem(prt, 10) | |
1067 | table.insert(Effects, {prt, "Shatter", num, prt.CFrame, math.random() - math.random(), 0, math.random(50, 100) / 100}) | |
1068 | end | |
1069 | } | |
1070 | } | |
1071 | ||
1072 | ||
1073 | ||
1074 | RemoveOutlines = function(part) | |
1075 | ||
1076 | part.TopSurface = 10 | |
1077 | end | |
1078 | ||
1079 | CreatePart = function(Parent, Material, Reflectance, Transparency, BColor, Name, Size) | |
1080 | ||
1081 | local Part = Create("Part")({Parent = Parent, Reflectance = Reflectance, Transparency = Transparency, CanCollide = false, Locked = true, BrickColor = BrickColor.new(tostring(BColor)), Name = Name, Size = Size, Material = Material}) | |
1082 | RemoveOutlines(Part) | |
1083 | return Part | |
1084 | end | |
1085 | ||
1086 | CreateMesh = function(Mesh, Part, MeshType, MeshId, OffSet, Scale) | |
1087 | ||
1088 | local Msh = Create(Mesh)({Parent = Part, Offset = OffSet, Scale = Scale}) | |
1089 | if Mesh == "SpecialMesh" then | |
1090 | Msh.MeshType = MeshType | |
1091 | Msh.MeshId = MeshId | |
1092 | end | |
1093 | return Msh | |
1094 | end | |
1095 | ||
1096 | CreateWeld = function(Parent, Part0, Part1, C0, C1) | |
1097 | ||
1098 | local Weld = Create("Weld")({Parent = Parent, Part0 = Part0, Part1 = Part1, C0 = C0, C1 = C1}) | |
1099 | return Weld | |
1100 | end | |
1101 | ||
1102 | ||
1103 | ||
1104 | ||
1105 | WSHM = {'White',"Pastel light red"} | |
1106 | WSH = WSHM[math.random(1,#WSHM)] | |
1107 | ||
1108 | ||
1109 | IcePartFunk = function(HPart,aria,Min,Max) | |
1110 | ||
1111 | IcePart = Instance.new("Part",HPart) | |
1112 | IcePart.Size = Vector3.new(math.random(Min, Max),math.random(Min, Max),math.random(Min, Max)) | |
1113 | IcePart.CanCollide = false | |
1114 | IuW = Instance.new("Weld") | |
1115 | IuW.Name = "GuW" | |
1116 | IuW.Part0 = HPart | |
1117 | IuW.C0 = cn(math.random(-aria, aria),math.random(-aria, aria),math.random(-aria, aria))*angles( math.random(-180, 180),math.random(-180, 180),math.random(-180, 180)) | |
1118 | IuW.C1 = cn(0, math.random(-aria/2, aria/2), 0) | |
1119 | IuW.Part1 = IcePart | |
1120 | IuW.Parent = HPart | |
1121 | IcePart.Transparency = .85 | |
1122 | IcePart.Material= "Neon" | |
1123 | WSH = WSHM[math.random(1,#WSHM)] | |
1124 | IcePart.BrickColor = BrickColor.new(""..WSH) | |
1125 | ||
1126 | RemoveOutlines(IcePart) | |
1127 | game:GetService("Debris"):AddItem(IuW, 4) | |
1128 | game:GetService("Debris"):AddItem(IcePart, 6) | |
1129 | ||
1130 | ||
1131 | end | |
1132 | --[[ | |
1133 | GroundPartFunk2 = function(Hit,HPart,color,aria,Min,Max) | |
1134 | ||
1135 | IcePart2 = Instance.new("Part",HPart) | |
1136 | IcePart2.Size = Vector3.new(math.random(Min, Max),math.random(Min, Max),math.random(Min, Max)) | |
1137 | IcePart2.CanCollide = false | |
1138 | RemoveOutlines(IcePart2) | |
1139 | IcePart2.Anchored = true | |
1140 | ||
1141 | ||
1142 | ||
1143 | IcePart2.CFrame=CFrame.new(Hit.Position* Vector3.new(math.random(-aria, aria),math.random(-aria, aria),math.random(-aria, aria))) | |
1144 | ||
1145 | ||
1146 | ||
1147 | ||
1148 | ||
1149 | ||
1150 | IcePart2.Transparency = .85 | |
1151 | IcePart2.Material= "Neon" | |
1152 | ||
1153 | IcePart2.BrickColor = BrickColor.new(""..color) | |
1154 | ||
1155 | ||
1156 | ||
1157 | game:GetService("Debris"):AddItem(IcePart2, 6) | |
1158 | ||
1159 | ||
1160 | end | |
1161 | --]] | |
1162 | GroundPartFunk2 = function(Hit,HPart,color,aria,Min,Max,num) | |
1163 | ||
1164 | IcePart2 = Instance.new("Part",HPart) | |
1165 | IcePart2.Size = Vector3.new(math.random(Min, Max),math.random(Min, Max),math.random(Min, Max)) | |
1166 | IcePart2.CanCollide = false | |
1167 | RemoveOutlines(IcePart2) | |
1168 | IcePart2.Anchored = true | |
1169 | game:GetService("Debris"):AddItem(IcePart2, .4) | |
1170 | IcePart2.Transparency = .3 | |
1171 | IcePart2.Material= "Neon" | |
1172 | IcePart2.BrickColor = BrickColor.new(""..color) | |
1173 | ||
1174 | IcePart2.CFrame=CFrame.new(Hit.Position+ Vector3.new(math.random(-aria, aria),math.random(-aria, 0),math.random(-aria, aria)))*angles(math.rad(math.random(-45, 45)),math.rad(math.random(-45, 45)),math.rad(math.random(-45, 45))) | |
1175 | for i = 0,num do | |
1176 | if num > 1 then | |
1177 | GroundPartFunk2(Hit,HPart,color,aria,Min,Max,0) | |
1178 | end | |
1179 | end | |
1180 | ||
1181 | ||
1182 | ||
1183 | ||
1184 | ||
1185 | ||
1186 | ||
1187 | ||
1188 | ||
1189 | ||
1190 | ||
1191 | end | |
1192 | ||
1193 | ||
1194 | ||
1195 | ||
1196 | ||
1197 | SpikeMeshId = 1033714 | |
1198 | local CreateSpike = function(Parent, Name, Color, Size, Material, Transparency, Scale) | |
1199 | ||
1200 | ||
1201 | local Part = Instance.new("Part", Parent) | |
1202 | Part.Name = Name | |
1203 | Part.BrickColor = BrickColor.new(Color) | |
1204 | Part.Size = Size | |
1205 | Part.Material = Material | |
1206 | Part.Transparency = Transparency | |
1207 | Part.CanCollide = false | |
1208 | RemoveOutlines(Part) | |
1209 | ||
1210 | local Mesh = Instance.new("SpecialMesh", Part) | |
1211 | Mesh.MeshType = "Sphere" | |
1212 | Mesh.Scale = Scale | |
1213 | ||
1214 | return Mesh and Part | |
1215 | ||
1216 | end | |
1217 | ||
1218 | ||
1219 | ||
1220 | ||
1221 | ||
1222 | ||
1223 | ||
1224 | ||
1225 | CFuncs = { | |
1226 | Part = {Create = function(Parent, Material, Reflectance, Transparency, BColor, Name, Size) | |
1227 | ||
1228 | local Part = Create("Part")({Parent = Parent, Reflectance = Reflectance, Transparency = Transparency, CanCollide = false, Locked = true, BrickColor = BrickColor.new(tostring(BColor)), Name = Name, Size = Size, Material = Material}) | |
1229 | RemoveOutlines(Part) | |
1230 | return Part | |
1231 | end | |
1232 | } | |
1233 | , | |
1234 | Mesh = {Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale) | |
1235 | ||
1236 | local Msh = Create(Mesh)({Parent = Part, Offset = OffSet, Scale = Scale}) | |
1237 | if Mesh == "SpecialMesh" then | |
1238 | Msh.MeshType = MeshType | |
1239 | Msh.MeshId = MeshId | |
1240 | end | |
1241 | return Msh | |
1242 | end | |
1243 | } | |
1244 | , | |
1245 | Mesh = {Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale) | |
1246 | ||
1247 | local Msh = Create(Mesh)({Parent = Part, Offset = OffSet, Scale = Scale}) | |
1248 | if Mesh == "SpecialMesh" then | |
1249 | Msh.MeshType = MeshType | |
1250 | Msh.MeshId = MeshId | |
1251 | end | |
1252 | return Msh | |
1253 | end | |
1254 | } | |
1255 | , | |
1256 | Weld = {Create = function(Parent, Part0, Part1, C0, C1) | |
1257 | ||
1258 | local Weld = Create("Weld")({Parent = Parent, Part0 = Part0, Part1 = Part1, C0 = C0, C1 = C1}) | |
1259 | return Weld | |
1260 | end | |
1261 | } | |
1262 | , | |
1263 | Sound = {Create = function(id, par, vol, pit) | |
1264 | ||
1265 | coroutine.resume(coroutine.create(function() | |
1266 | ||
1267 | local S = Create("Sound")({Volume = vol, Pitch = pit or 1, SoundId = id, Parent = par or workspace}) | |
1268 | wait() | |
1269 | S:play() | |
1270 | game:GetService("Debris"):AddItem(S, 6) | |
1271 | end | |
1272 | )) | |
1273 | end | |
1274 | } | |
1275 | , | |
1276 | ParticleEmitter = {Create = function(Parent, Color1, Color2, LightEmission, Size, Texture, Transparency, ZOffset, Accel, Drag, LockedToPart, VelocityInheritance, EmissionDirection, Enabled, LifeTime, Rate, Rotation, RotSpeed, Speed, VelocitySpread) | |
1277 | ||
1278 | local fp = Create("ParticleEmitter")({Parent = Parent, Color = ColorSequence.new(Color1, Color2), LightEmission = LightEmission, Size = Size, Texture = Texture, Transparency = Transparency, ZOffset = ZOffset, Acceleration = Accel, Drag = Drag, LockedToPart = LockedToPart, VelocityInheritance = VelocityInheritance, EmissionDirection = EmissionDirection, Enabled = Enabled, Lifetime = LifeTime, Rate = Rate, Rotation = Rotation, RotSpeed = RotSpeed, Speed = Speed, VelocitySpread = VelocitySpread}) | |
1279 | return fp | |
1280 | end | |
1281 | } | |
1282 | } | |
1283 | ||
1284 | ||
1285 | ||
1286 | ||
1287 | ||
1288 | Damagefunc = function(Part, hit, minim, maxim, knockback, Type, Property, Delay, HitSound, HitPitch) | |
1289 | ||
1290 | if hit.Parent == nil then | |
1291 | return | |
1292 | end | |
1293 | local h = hit.Parent:FindFirstChild("Humanoid") | |
1294 | for _,v in pairs(hit.Parent:children()) do | |
1295 | if v:IsA("Humanoid") then | |
1296 | h = v | |
1297 | end | |
1298 | end | |
1299 | if h ~= nil and hit.Parent.Name ~= Character.Name and hit.Parent:FindFirstChild("Torso") ~= nil then | |
1300 | if hit.Parent:findFirstChild("DebounceHit") ~= nil and hit.Parent.DebounceHit.Value == true then | |
1301 | return | |
1302 | end | |
1303 | local c = Create("ObjectValue")({Name = "creator", Value = game:service("Players").LocalPlayer, Parent = h}) | |
1304 | game:GetService("Debris"):AddItem(c, 0.5) | |
1305 | if HitSound ~= nil and HitPitch ~= nil then | |
1306 | CreateSound(HitSound, hit, 1, HitPitch) | |
1307 | end | |
1308 | local Damage = math.random(minim, maxim) | |
1309 | local blocked = false | |
1310 | local block = hit.Parent:findFirstChild("Block") | |
1311 | if block ~= nil and block.className == "IntValue" and block.Value > 0 then | |
1312 | blocked = true | |
1313 | block.Value = block.Value - 1 | |
1314 | print(block.Value) | |
1315 | end | |
1316 | if blocked == false then | |
1317 | h.Health = h.Health - Damage | |
1318 | ShowDamage(Part.CFrame * CFrame.new(0, 0, Part.Size.Z / 2).p + Vector3.new(0, 1.5, 0), -Damage, 1.5, Part.BrickColor.Color) | |
1319 | else | |
1320 | h.Health = h.Health - Damage / 2 | |
1321 | ShowDamage(Part.CFrame * CFrame.new(0, 0, Part.Size.Z / 2).p + Vector3.new(0, 1.5, 0), -Damage, 1.5, Part.BrickColor.Color) | |
1322 | end | |
1323 | if hit.Parent:FindFirstChild("Torso") ~= nil then | |
1324 | lasthit = hit.Parent.Torso | |
1325 | end | |
1326 | if Type == "Knockdown" then | |
1327 | local hum = hit.Parent.Humanoid | |
1328 | hum.PlatformStand = true | |
1329 | coroutine.resume(coroutine.create(function(HHumanoid) | |
1330 | ||
1331 | swait(.2) | |
1332 | HHumanoid.PlatformStand = false | |
1333 | end | |
1334 | ), hum) | |
1335 | local angle = hit.Position - (Property.Position + Vector3.new(0, 0, 0)).unit | |
1336 | local bodvol = Create("BodyVelocity")({velocity = angle * knockback, P = 50, maxForce = Vector3.new(80000, 80000, 80000), Parent = hit}) | |
1337 | local rl = Create("BodyAngularVelocity")({P = 3000, maxTorque = Vector3.new(5000, 5000, 5000) * 50, angularvelocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10)), Parent = hit}) | |
1338 | game:GetService("Debris"):AddItem(bodvol, 0.1) | |
1339 | game:GetService("Debris"):AddItem(rl, 0.1) | |
1340 | elseif Type == "Normal" then | |
1341 | local vp = Create("BodyVelocity")({P = 500, maxForce = Vector3.new(math.huge, 0, math.huge), velocity = Property.CFrame.lookVector * knockback}) | |
1342 | if knockback > 0 then | |
1343 | vp.Parent = hit.Parent.Torso | |
1344 | end | |
1345 | game:GetService("Debris"):AddItem(vp, 0.5) | |
1346 | elseif Type == "Impale" then | |
1347 | ||
1348 | local Spike = CreateSpike(Services.Workspace, "Ice Spike", "Really red", Vector3.new(1,2,1), "Neon", .2, Vector3.new(.5,25,.5)) | |
1349 | Spike.Anchored = true | |
1350 | Spike.Rotation = Vector3.new(math.random(-45,45), 0 , math.random(-45,45)) | |
1351 | Spike.Position = hit.Parent.Torso.Position | |
1352 | ||
1353 | Services.Debris:AddItem(Spike, 4) | |
1354 | ||
1355 | ||
1356 | ||
1357 | ||
1358 | ||
1359 | ||
1360 | CFuncs.Sound.Create("http://www.roblox.com/asset/?id=268249319", Spike, .8, 2) | |
1361 | hit.Parent.Humanoid.PlatformStand = true | |
1362 | ||
1363 | ||
1364 | swait(1) | |
1365 | hit.Parent.Humanoid.PlatformStand = false | |
1366 | elseif Type == "Up" then | |
1367 | local bodyVelocity = Create("BodyVelocity")({velocity = Vector3.new(0, 20, 0), P = 5000, maxForce = Vector3.new(8000, 8000, 8000), Parent = hit}) | |
1368 | game:GetService("Debris"):AddItem(bodyVelocity, 0.1) | |
1369 | local bodyVelocity = Create("BodyVelocity")({velocity = Vector3.new(0, 20, 0), P = 5000, maxForce = Vector3.new(8000, 8000, 8000), Parent = hit}) | |
1370 | game:GetService("Debris"):AddItem(bodyVelocity, .1) | |
1371 | ||
1372 | ||
1373 | ||
1374 | elseif Type == "UltSlice" then | |
1375 | ||
1376 | BlockEffect( BrickColor.new("Really red"), SwHandle.CFrame * cn(0, 1.8, 0), 16, 141, .5, 0,0,0, 0.01,2) | |
1377 | BlockEffect( BrickColor.new("Really red"), Head.CFrame, 21, 21, 21, 0,0,0, 0.01,2) | |
1378 | BlockEffect( BrickColor.new("Really red"), Torso.CFrame, 41, 41, 21, 0,0,0, 0.01,2) | |
1379 | BlockEffect( BrickColor.new("Really red"), RightArm.CFrame, 21, 41, 21, 0,0,0, 0.01,2) | |
1380 | BlockEffect( BrickColor.new("Really red"), LeftArm.CFrame, 21, 41, 21, 0,0,0, 0.01,2) | |
1381 | BlockEffect( BrickColor.new("Really red"), RightLeg.CFrame, 21, 41, 21, 0,0,0, 0.01,2) | |
1382 | BlockEffect( BrickColor.new("Really red"), LeftLeg.CFrame, 21, 41, 21, 0,0,0, 0.01,2) | |
1383 | ||
1384 | ||
1385 | elseif Type == "Slice" then | |
1386 | local bp2 = Create("BodyPosition")({P = 900, D = 1000, maxForce = Vector3.new(math.huge, math.huge, math.huge), position = hit.Parent.Head.Position, Parent = hit.Parent.Torso}) | |
1387 | game:GetService("Debris"):AddItem(bp2, 1) | |
1388 | ||
1389 | if hit.Parent:FindFirstChild("HumanoidRootPart") ~= nil then | |
1390 | for i = 1,10 do | |
1391 | Effects.Break.Create (BrickColor.new("Really red"), hit.Parent.HumanoidRootPart.CFrame, 10, .5, .5) | |
1392 | ||
1393 | ||
1394 | end | |
1395 | end | |
1396 | ||
1397 | ||
1398 | ||
1399 | ||
1400 | elseif Type == "Snare" then | |
1401 | local bp = Create("BodyPosition")({P = 900, D = 1000, maxForce = Vector3.new(math.huge, math.huge, math.huge), position = hit.Parent.Torso.Position, Parent = hit.Parent.Torso}) | |
1402 | game:GetService("Debris"):AddItem(bp, 1) | |
1403 | elseif Type == "Slowness" then | |
1404 | local SpeedSave=hit.Parent.Humanoid.WalkSpeed | |
1405 | ||
1406 | for i = 1,25 do | |
1407 | hit.Parent.Humanoid.WalkSpeed = 4 | |
1408 | IcePartFunk(hit.Parent.Torso,.55,0.1,1) | |
1409 | end | |
1410 | wait(4) | |
1411 | hit.Parent.Humanoid.WalkSpeed = SpeedSave | |
1412 | elseif Type == "Firedmg" then | |
1413 | ||
1414 | for i = 1,math.random(1, 6) do | |
1415 | if hit.Parent:FindFirstChild("Torso") ~= nil then | |
1416 | BlockEffect( BrickColor.new("Really red"), hit.Parent.Torso.CFrame, 20, 20, 20, 1.5, 1.5, 1.5, 0.05,3) | |
1417 | BlockEffect(BrickColor.new("Gold"), hit.Parent.Torso.CFrame, 20, 20, 20, 2, 2, 2, 0.05,3) | |
1418 | BlockEffect(BrickColor.new("Really black"), hit.Parent.Torso.CFrame, 0, 0, 0, 2, 2, 2, 0.035,3) | |
1419 | ||
1420 | ||
1421 | ||
1422 | wait(.1) | |
1423 | end | |
1424 | end | |
1425 | ||
1426 | elseif Type == "Freeze" then | |
1427 | local bp = Create("BodyPosition")({P = 900, D = 1000, maxForce = Vector3.new(math.huge, math.huge, math.huge), position = hit.Parent.Torso.Position, Parent = hit.Parent.Torso}) | |
1428 | game:GetService("Debris"):AddItem(bp, 4) | |
1429 | for i=1,25 do | |
1430 | IcePartFunk(hit.Parent.Torso,1,1.5,2) | |
1431 | end | |
1432 | elseif Type == "Freeze2" then | |
1433 | local BodPos = Create("BodyPosition")({P = 50000, D = 1000, maxForce = Vector3.new(math.huge, math.huge, math.huge), position = hit.Parent.Torso.Position, Parent = hit.Parent.Torso}) | |
1434 | local BodGy = Create("BodyGyro")({maxTorque = Vector3.new(400000, 400000, 400000) * math.huge, P = 20000, Parent = hit.Parent.Torso, cframe = hit.Parent.Torso.CFrame}) | |
1435 | hit.Parent.Torso.Anchored = true | |
1436 | coroutine.resume(coroutine.create(function(Part) | |
1437 | ||
1438 | swait(1.5) | |
1439 | Part.Anchored = false | |
1440 | end | |
1441 | ), hit.Parent.Torso) | |
1442 | game:GetService("Debris"):AddItem(BodPos, 3) | |
1443 | game:GetService("Debris"):AddItem(BodGy, 3) | |
1444 | end | |
1445 | local debounce = Create("BoolValue")({Name = "DebounceHit", Parent = hit.Parent, Value = true}) | |
1446 | game:GetService("Debris"):AddItem(debounce, Delay) | |
1447 | c = Instance.new("ObjectValue") | |
1448 | c.Name = "creator" | |
1449 | c.Value = Player | |
1450 | c.Parent = h | |
1451 | game:GetService("Debris"):AddItem(c, 0.5) | |
1452 | end | |
1453 | end | |
1454 | ||
1455 | ShowDamage = function(Pos, Text, Time, Color) | |
1456 | ||
1457 | local Rate = 0.033333333333333 | |
1458 | if not Pos then | |
1459 | local Pos = Vector3.new(0, 0, 0) | |
1460 | end | |
1461 | local Text = Text or "" | |
1462 | local Time = Time or 2 | |
1463 | if not Color then | |
1464 | local Color = Color3.new(1, 0, 1) | |
1465 | end | |
1466 | local EffectPart = CreatePart(workspace, "SmoothPlastic", 0, 1, BrickColor.new(Color), "Effect", Vector3.new(0, 0, 0)) | |
1467 | EffectPart.Anchored = true | |
1468 | local BillboardGui = Create("BillboardGui")({Size = UDim2.new(3, 0, 3, 0), Adornee = EffectPart, Parent = EffectPart}) | |
1469 | local TextLabel = Create("TextLabel")({BackgroundTransparency = 1, Size = UDim2.new(1, 0, 1, 0), Text = Text, TextColor3 = Color, TextScaled = true, Font = Enum.Font.ArialBold, Parent = BillboardGui}) | |
1470 | game.Debris:AddItem(EffectPart, Time + 0.1) | |
1471 | EffectPart.Parent = game:GetService("Workspace") | |
1472 | delay(0, function() | |
1473 | ||
1474 | local Frames = Time / Rate | |
1475 | for Frame = 1, Frames do | |
1476 | wait(Rate) | |
1477 | local Percent = Frame / Frames | |
1478 | EffectPart.CFrame = CFrame.new(Pos) + Vector3.new(0, Percent, 0) | |
1479 | TextLabel.TextTransparency = Percent | |
1480 | end | |
1481 | if EffectPart and EffectPart.Parent then | |
1482 | EffectPart:Destroy() | |
1483 | end | |
1484 | end | |
1485 | ) | |
1486 | end | |
1487 | ||
1488 | MagniDamage = function(Part, magni, mindam, maxdam, knock, Type) | |
1489 | ||
1490 | for _,c in pairs(workspace:children()) do | |
1491 | local hum = c:findFirstChild("Humanoid") | |
1492 | if hum ~= nil then | |
1493 | local head = c:findFirstChild("Head") | |
1494 | if head ~= nil then | |
1495 | local targ = head.Position - Part.Position | |
1496 | local mag = targ.magnitude | |
1497 | if mag <= magni and c.Name ~= Player.Name then | |
1498 | Damagefunc(head, head, mindam, maxdam, knock, Type, RootPart, 0.1, "http://www.roblox.com/asset/?id=231917784", 1.2) | |
1499 | end | |
1500 | end | |
1501 | end | |
1502 | end | |
1503 | end | |
1504 | MagniKILL = function(Part, magni, knock, Type) | |
1505 | ||
1506 | for _,c in pairs(workspace:children()) do | |
1507 | local hum = c:findFirstChild("Humanoid") | |
1508 | if hum ~= nil then | |
1509 | local head = c:findFirstChild("Head") | |
1510 | if head ~= nil then | |
1511 | local targ = head.Position - Part.Position | |
1512 | local mag = targ.magnitude | |
1513 | if mag <= magni and c.Name ~= Player.Name then | |
1514 | hum.Health = 0 | |
1515 | end | |
1516 | end | |
1517 | end | |
1518 | end | |
1519 | end | |
1520 | EffectModel = Instance.new("Model", Character) | |
1521 | EffectModel.Name = "Effects" | |
1522 | ||
1523 | BlockEffect = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, Type) | |
1524 | ||
1525 | local prt = CreatePart(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new()) | |
1526 | prt.Anchored = true | |
1527 | prt.CFrame = cframe | |
1528 | local msh = CreateMesh("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
1529 | game:GetService("Debris"):AddItem(prt, 10) | |
1530 | if Type == 1 or Type == nil then | |
1531 | table.insert(Effects, {prt, "Block1", delay, x3, y3, z3, msh}) | |
1532 | else | |
1533 | if Type == 2 then | |
1534 | table.insert(Effects, {prt, "Block2", delay, x3, y3, z3, msh}) | |
1535 | else | |
1536 | if Type == 3 then | |
1537 | table.insert(Effects, {prt, "Block3", delay, x3, y3, z3, msh}) | |
1538 | end | |
1539 | end | |
1540 | end | |
1541 | end | |
1542 | CreateSound = function(id, par, vol, pit) | |
1543 | ||
1544 | coroutine.resume(coroutine.create(function() | |
1545 | ||
1546 | local sou = Instance.new("Sound", par or workspace) | |
1547 | sou.Volume = vol | |
1548 | sou.Pitch = pit or 1 | |
1549 | sou.SoundId = id | |
1550 | swait() | |
1551 | sou:play() | |
1552 | game:GetService("Debris"):AddItem(sou, 6) | |
1553 | end | |
1554 | )) | |
1555 | end | |
1556 | ||
1557 | Laser = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
1558 | ||
1559 | local prt = CreatePart(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5)) | |
1560 | prt.Anchored = true | |
1561 | prt.CFrame = cframe | |
1562 | prt.Material = "Neon" | |
1563 | local msh = CreateMesh("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
1564 | game:GetService("Debris"):AddItem(prt, 10) | |
1565 | coroutine.resume(coroutine.create(function(Part, Mesh) | |
1566 | ||
1567 | for i = 0, 6, delay do | |
1568 | swait() | |
1569 | Part.Transparency = i | |
1570 | Mesh.Scale = Mesh.Scale + Vector3.new(x3, y3, z3) | |
1571 | end | |
1572 | Part.Parent = nil | |
1573 | end | |
1574 | ), prt, msh) | |
1575 | end | |
1576 | ||
1577 | shoottraildd = function(mouse, partt, SpreadAmount) | |
1578 | ||
1579 | local SpreadVectors = Vector3.new(math.random(-SpreadAmount, SpreadAmount), math.random(-SpreadAmount/10, SpreadAmount/10), math.random(-SpreadAmount, SpreadAmount)) | |
1580 | local MainPos = mouse + Vector3.new(0, 6, 0)+RootPart.CFrame.lookVector*-2 | |
1581 | local MainPos2 = mouse + SpreadVectors | |
1582 | local MouseLook = CFrame.new((MainPos + MainPos2) / 2, MainPos2) | |
1583 | local speed = 100 | |
1584 | local num = 1 | |
1585 | coroutine.resume(coroutine.create(function() | |
1586 | ||
1587 | repeat | |
1588 | swait() | |
1589 | local hit, pos = rayCast(MainPos, MouseLook.lookVector, speed, RootPart.Parent) | |
1590 | local mag = (MainPos - pos).magnitude | |
1591 | Laser(BrickColor.new("Really red"), CFrame.new((MainPos + pos) / 2, pos) * angles(1.57, 0, 0), 0, mag * (speed / (speed / 2)), 0, -0, 0, -0, 10) | |
1592 | MainPos = MainPos + MouseLook.lookVector * speed | |
1593 | num = num - 1 | |
1594 | MouseLook = MouseLook * angles(math.rad(-1), 0, 0) | |
1595 | if hit ~= nil then | |
1596 | num = 0 | |
1597 | local refpart = CreatePart(EffectModel, "Neon", 0, 1, BrickColor.new("Really black"), "Effect", Vector3.new()) | |
1598 | refpart.Anchored = true | |
1599 | refpart.CFrame = CFrame.new(pos) | |
1600 | game:GetService("Debris"):AddItem(refpart, 2) | |
1601 | end | |
1602 | do | |
1603 | if num <= 0 then | |
1604 | local refpart = CreatePart(EffectModel, "Neon", 0, 1, BrickColor.new("Really black"), "Effect", Vector3.new()) | |
1605 | refpart.Anchored = true | |
1606 | refpart.CFrame = CFrame.new(pos) | |
1607 | if hit ~= nil then | |
1608 | ||
1609 | ||
1610 | ||
1611 | GroundPartFunk2(refpart,EffectModel,"Really red",1,.1,2,2) | |
1612 | BlockEffect( BrickColor.new("Really red"), refpart.CFrame, 70, 70, 70, -.5, -.5, -.5, 0.05) | |
1613 | -- BlockEffect(BrickColor.new("Gold"), refpart.CFrame, 1, 1, 1, 7, 7, 7, 0.07) | |
1614 | -- BlockEffect(BrickColor.new("Gold"), refpart.CFrame, 1, 1, 1, 7, 7, 7, 0.07) | |
1615 | MagniDamage(refpart, 6, 10, 25, 0, "Slice") | |
1616 | end | |
1617 | game:GetService("Debris"):AddItem(refpart, 0) | |
1618 | end | |
1619 | end | |
1620 | until num <= 0 | |
1621 | end | |
1622 | )) | |
1623 | end | |
1624 | ||
1625 | shoottraildd2 = function(mouse, partt, SpreadAmount) | |
1626 | ||
1627 | local SpreadVectors = Vector3.new(math.random(-SpreadAmount, SpreadAmount), math.random(-SpreadAmount, SpreadAmount), math.random(-SpreadAmount, SpreadAmount)) | |
1628 | local MainPos = partt.Position | |
1629 | local MainPos2 = mouse + SpreadVectors | |
1630 | local MouseLook = CFrame.new((MainPos + MainPos2) / 2, MainPos2) | |
1631 | local speed = 1000 | |
1632 | local num = 1 | |
1633 | coroutine.resume(coroutine.create(function() | |
1634 | ||
1635 | repeat | |
1636 | swait() | |
1637 | local hit, pos = rayCast(MainPos, MouseLook.lookVector, speed, RootPart.Parent) | |
1638 | local mag = (MainPos - pos).magnitude | |
1639 | Laser(BrickColor.new("Gold"), CFrame.new((MainPos + pos) / 2, pos) * angles(1.57, 0, 0), 1, mag * (speed / (speed / 2)), 1, -8.175, 0, -8.175, 0.15) | |
1640 | MainPos = MainPos + MouseLook.lookVector * speed | |
1641 | num = num - 1 | |
1642 | MouseLook = MouseLook * angles(math.rad(-1), 0, 0) | |
1643 | if hit ~= nil then | |
1644 | num = 0 | |
1645 | local refpart = CreatePart(EffectModel, "Neon", 0, 1, BrickColor.new("Really black"), "Effect", Vector3.new()) | |
1646 | refpart.Anchored = true | |
1647 | refpart.CFrame = CFrame.new(pos) | |
1648 | game:GetService("Debris"):AddItem(refpart, 2) | |
1649 | end | |
1650 | do | |
1651 | if num <= 0 then | |
1652 | local refpart = CreatePart(EffectModel, "Neon", 0, 1, BrickColor.new("Really black"), "Effect", Vector3.new()) | |
1653 | refpart.Anchored = true | |
1654 | refpart.CFrame = CFrame.new(pos) | |
1655 | if hit ~= nil then | |
1656 | CreateSound("http://www.roblox.com/asset/?id=514867425", refpart, 2, 1) | |
1657 | BlockEffect( BrickColor.new("Really red"), refpart.CFrame, 1, 1, 1, 86.5, 86.5, 86.5, 0.05) | |
1658 | BlockEffect(BrickColor.new("Gold"), refpart.CFrame, 1, 1, 1, 87, 87, 87, 0.05) | |
1659 | BlockEffect(BrickColor.new("Gold"), refpart.CFrame, 1, 1, 1, 87, 87, 87, 0.05) | |
1660 | MagniKILL(refpart, 80, 0, "Normal") | |
1661 | end | |
1662 | game:GetService("Debris"):AddItem(refpart, 0) | |
1663 | end | |
1664 | end | |
1665 | until num <= 0 | |
1666 | end | |
1667 | )) | |
1668 | end | |
1669 | ||
1670 | shoottraildd3 = function(mouse, partt, SpreadAmount, dmg) | |
1671 | ||
1672 | local SpreadVectors = Vector3.new(math.random(-SpreadAmount, SpreadAmount), math.random(-SpreadAmount, SpreadAmount), math.random(-SpreadAmount, SpreadAmount)) | |
1673 | local MainPos = partt.Position | |
1674 | local MainPos2 = mouse + SpreadVectors | |
1675 | local MouseLook = CFrame.new((MainPos + MainPos2) / 2, MainPos2) | |
1676 | local speed = 200 | |
1677 | local num = 0 | |
1678 | coroutine.resume(coroutine.create(function() | |
1679 | ||
1680 | repeat | |
1681 | swait() | |
1682 | local hit, pos = rayCast(MainPos, MouseLook.lookVector, speed, RootPart.Parent) | |
1683 | local mag = (MainPos - pos).magnitude | |
1684 | Laser(BrickColor.new("White"), CFrame.new((MainPos + pos) / 2, pos) * angles(1.57, 0, 0), 1, mag * (speed / (speed / 2)), 1, -0.375, 0, -0.375, 0.05) | |
1685 | MainPos = MainPos + MouseLook.lookVector * speed | |
1686 | num = num - 1 | |
1687 | MouseLook = MouseLook * angles(math.rad(-1), 0, 0) | |
1688 | if hit ~= nil then | |
1689 | num = 0 | |
1690 | local refpart = CreatePart(EffectModel, "Neon", 0, 1, BrickColor.new("Really black"), "Effect", Vector3.new()) | |
1691 | refpart.Anchored = true | |
1692 | refpart.CFrame = CFrame.new(pos) | |
1693 | BlockEffect(BrickColor.new("Pastel light red"), refpart.CFrame, 1, 1, 1, 7, 7, 7, 0.05) | |
1694 | game:GetService("Debris"):AddItem(refpart, 2) | |
1695 | end | |
1696 | do | |
1697 | if num <= 0 then | |
1698 | local refpart = CreatePart(EffectModel, "Neon", 0, 1, BrickColor.new("Really black"), "Effect", Vector3.new()) | |
1699 | refpart.Anchored = true | |
1700 | refpart.CFrame = CFrame.new(pos) | |
1701 | if hit ~= nil then | |
1702 | CreateSound("http://www.roblox.com/asset/?id=514867425", refpart, 2, 1) | |
1703 | BlockEffect(BrickColor.new("White"), refpart.CFrame, 1, 1, 1, 6.5, 6.5, 6.5, 0.05) | |
1704 | BlockEffect(BrickColor.new("Pastel light red"), refpart.CFrame, 1, 1, 1, 7, 7, 7, 0.05) | |
1705 | ||
1706 | ||
1707 | MagniDamage(refpart, 6, dmg, dmg, 0, "Slowness") | |
1708 | ||
1709 | end | |
1710 | game:GetService("Debris"):AddItem(refpart, 0) | |
1711 | end | |
1712 | end | |
1713 | until num <= 0 | |
1714 | end | |
1715 | )) | |
1716 | end | |
1717 | ||
1718 | shoottraildd4 = function(mouse, partt, SpreadAmount, dmg) | |
1719 | ||
1720 | local SpreadVectors = Vector3.new(math.random(-SpreadAmount, SpreadAmount), math.random(-SpreadAmount, SpreadAmount), math.random(-SpreadAmount, SpreadAmount)) | |
1721 | local MainPos = partt.Position | |
1722 | local MainPos2 = mouse + SpreadVectors | |
1723 | local MouseLook = CFrame.new((MainPos + MainPos2) / 2, MainPos2) | |
1724 | local speed = 150 | |
1725 | local num = 1 | |
1726 | coroutine.resume(coroutine.create(function() | |
1727 | ||
1728 | repeat | |
1729 | swait() | |
1730 | local hit, pos = rayCast(MainPos, MouseLook.lookVector, speed, RootPart.Parent) | |
1731 | local mag = (MainPos - pos).magnitude | |
1732 | Laser(BrickColor.new("Gold"), CFrame.new((MainPos + pos) / 2, pos) * angles(1.57, 0, 0), 1, mag * (speed / (speed / 2)), 1, -1.175, 0, -1.175, 0.15) | |
1733 | MainPos = MainPos + MouseLook.lookVector * speed | |
1734 | num = num - 1 | |
1735 | MouseLook = MouseLook * angles(math.rad(-1), 0, 0) | |
1736 | if hit ~= nil then | |
1737 | num = 0 | |
1738 | local refpart = CreatePart(EffectModel, "Neon", 0, 1, BrickColor.new("Really black"), "Effect", Vector3.new()) | |
1739 | refpart.Anchored = true | |
1740 | refpart.CFrame = CFrame.new(pos) | |
1741 | game:GetService("Debris"):AddItem(refpart, 2) | |
1742 | end | |
1743 | do | |
1744 | if num <= 0 then | |
1745 | local refpart = CreatePart(EffectModel, "Neon", 0, 1, BrickColor.new("Really black"), "Effect", Vector3.new()) | |
1746 | refpart.Anchored = true | |
1747 | refpart.CFrame = CFrame.new(pos) | |
1748 | if hit ~= nil then | |
1749 | CreateSound("http://www.roblox.com/asset/?id=514867425", refpart, 2, 1) | |
1750 | BlockEffect( BrickColor.new("Really red"), refpart.CFrame, 1, 1, 1, 6.5, 6.5, 6.5, 0.05) | |
1751 | BlockEffect(BrickColor.new("Gold"), refpart.CFrame, 1, 1, 1, 7, 7, 7, 0.05) | |
1752 | BlockEffect(BrickColor.new("Gold"), refpart.CFrame, 1, 1, 1, 7, 7, 7, 0.05) | |
1753 | MagniDamage(refpart, 6, dmg, dmg, 0, "Normal") | |
1754 | end | |
1755 | game:GetService("Debris"):AddItem(refpart, 0) | |
1756 | end | |
1757 | end | |
1758 | until num <= 0 | |
1759 | end | |
1760 | )) | |
1761 | end | |
1762 | ||
1763 | ||
1764 | ||
1765 | ||
1766 | ||
1767 | ||
1768 | ||
1769 | HitpartFunk3 = function(HPart3,Xv,Yv,Zv) | |
1770 | ||
1771 | Hitpart3 = Instance.new("Part",HPart3) | |
1772 | RemoveOutlines(Hitpart3) | |
1773 | Hitpart3.Size = Vector3.new(1,1,1) | |
1774 | Hitpart3.CanCollide = false | |
1775 | HuW3 = Instance.new("Weld") | |
1776 | HuW3.Name = "GuW" | |
1777 | HuW3.Part0 = HPart3 | |
1778 | HuW3.C0 = cn(Xv, Yv, Zv) | |
1779 | HuW3.C1 = cn(0, 0, 0) | |
1780 | HuW3.Part1 = Hitpart3 | |
1781 | HuW3.Parent = HPart3 | |
1782 | Hitpart3.Transparency = 1 | |
1783 | game:GetService("Debris"):AddItem(Hitpart3, 20) | |
1784 | end | |
1785 | ||
1786 | HitpartFunk2 = function(HPart2,Xv,Yv,Zv) | |
1787 | ||
1788 | Hitpart2 = Instance.new("Part",HPart2) | |
1789 | RemoveOutlines(Hitpart2) | |
1790 | Hitpart2.Size = Vector3.new(1,1,1) | |
1791 | Hitpart2.CanCollide = false | |
1792 | HuW2 = Instance.new("Weld") | |
1793 | HuW2.Name = "GuW" | |
1794 | HuW2.Part0 = HPart2 | |
1795 | HuW2.C0 = cn(Xv, Yv, Zv) | |
1796 | HuW2.C1 = cn(0, 0, 0) | |
1797 | HuW2.Part1 = Hitpart2 | |
1798 | HuW2.Parent = HPart2 | |
1799 | Hitpart2.Transparency = 1 | |
1800 | game:GetService("Debris"):AddItem(Hitpart2, 20) | |
1801 | end | |
1802 | ||
1803 | ||
1804 | HitpartFunk = function(HPart,Min,Max,Xv,Yv,Zv,atype,kb) | |
1805 | ||
1806 | Hitpart = Instance.new("Part",HPart) | |
1807 | RemoveOutlines(Hitpart) | |
1808 | Hitpart.Size = Vector3.new(1,1,1) | |
1809 | Hitpart.CanCollide = false | |
1810 | HuW = Instance.new("Weld") | |
1811 | HuW.Name = "GuW" | |
1812 | HuW.Part0 = HPart | |
1813 | HuW.C0 = cn(Xv, Yv, Zv) | |
1814 | HuW.C1 = cn(0, 0, 0) | |
1815 | HuW.Part1 = Hitpart | |
1816 | HuW.Parent = HPart | |
1817 | Hitpart.Transparency = 1 | |
1818 | game:GetService("Debris"):AddItem(Hitpart2, 20) | |
1819 | MagniDamage(Hitpart, 4.5, Min, Max, kb, atype) | |
1820 | ||
1821 | end | |
1822 | HitpartFunk4 = function(HPart,Min,Max,Xv,Yv,Zv,atype,kb) | |
1823 | ||
1824 | Hitpart4 = Instance.new("Part",HPart) | |
1825 | RemoveOutlines(Hitpart4) | |
1826 | Hitpart4.Size = Vector3.new(1,1,1) | |
1827 | Hitpart4.CanCollide = false | |
1828 | HuW4 = Instance.new("Weld") | |
1829 | HuW4.Name = "HuW4" | |
1830 | HuW4.Part0 = HPart | |
1831 | HuW4.C0 = cn(Xv, Yv, Zv) | |
1832 | HuW4.C1 = cn(0, 0, 0) | |
1833 | HuW4.Part1 = Hitpart4 | |
1834 | HuW4.Parent = HPart | |
1835 | Hitpart4.Transparency = 1 | |
1836 | game:GetService("Debris"):AddItem(Hitpart4, 1.5) | |
1837 | MagniDamage(Hitpart4, 6.5, Min, Max, kb, atype) | |
1838 | ||
1839 | end | |
1840 | ||
1841 | ||
1842 | HitboxFunction = function(Pose,lifetime,siz1,siz2,siz3,Radie,Min,Max,kb,atype) | |
1843 | ||
1844 | Hitboxpart = Instance.new("Part",Character) | |
1845 | RemoveOutlines(Hitboxpart) | |
1846 | Hitboxpart.Size = Vector3.new(siz1,siz2,siz3) | |
1847 | Hitboxpart.CanCollide = false | |
1848 | Hitboxpart.Transparency = 1 | |
1849 | Hitboxpart.Anchored = true | |
1850 | Hitboxpart.CFrame = Pose | |
1851 | game:GetService("Debris"):AddItem(Hitboxpart, lifetime) | |
1852 | MagniDamage(Hitboxpart, Radie, Min, Max, kb, atype) | |
1853 | ||
1854 | end | |
1855 | ||
1856 | ||
1857 | wait2 = false | |
1858 | ||
1859 | ||
1860 | combo = 1 | |
1861 | ||
1862 | ||
1863 | ||
1864 | ||
1865 | duljump = false | |
1866 | duljump2 = false | |
1867 | jumpatck = false | |
1868 | mouse.KeyDown:connect(function(k) | |
1869 | if k == "0" then | |
1870 | ||
1871 | Runkey = true | |
1872 | ||
1873 | end | |
1874 | ||
1875 | ||
1876 | ||
1877 | ||
1878 | ||
1879 | ||
1880 | ||
1881 | ||
1882 | ||
1883 | ||
1884 | if k == "e" and attack == false then | |
1885 | attack = true | |
1886 | ||
1887 | Humanoid.WalkSpeed = 0 | |
1888 | ||
1889 | CreateSound("http://www.roblox.com/asset/?id=135305162", Torso, 2, 1) | |
1890 | ||
1891 | for i = 0, 2, 0.1 do | |
1892 | swait() | |
1893 | ||
1894 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0.05, 0, -1.1) * angles(math.rad(0), math.rad(0), math.rad(0)), .1) | |
1895 | Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-30 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(-0)), .1) | |
1896 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5 - 0.01 * math.cos(sine / 8), -.0) * angles(math.rad(135 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(0)), 0.2) | |
1897 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5 - 0.01 * math.cos(sine / 8) , -.0) * angles(math.rad(135 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(0)), 0.2) | |
1898 | RH.C0 = clerp(RH.C0, cn(1, -1 - 0.1 * math.cos(sine / 8), 0) * RHCF * angles(math.rad(-6), math.rad(0), math.rad(90 + .05 * math.cos(sine / 25))), .1) | |
1899 | LH.C0 = clerp(LH.C0, cn(-1, -1 - 0.1 * math.cos(sine / 8), -.0) * LHCF * angles(math.rad(6), math.rad(-0), math.rad(-90 + .05 * math.cos(sine / 25))), .1) | |
1900 | SWW.C0 = clerp(SWW.C0, CFrame.new(0,-1.5,-.8) * angles(math.rad(-0),math.rad(-180),math.rad(0)), 0.1) | |
1901 | ||
1902 | ||
1903 | ||
1904 | end | |
1905 | ||
1906 | for i = 0, 4, 0.1 do | |
1907 | swait() | |
1908 | ||
1909 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0.05, 0, -1.1) * angles(math.rad(0), math.rad(0), math.rad(0)), .1) | |
1910 | Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-0 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(-0)), .1) | |
1911 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5 - 0.01 * math.cos(sine / 8), -.0) * angles(math.rad(45 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(25)), 0.05) | |
1912 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5 - 0.01 * math.cos(sine / 8) , -.0) * angles(math.rad(45 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(-25)), 0.05) | |
1913 | RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(-6), math.rad(0), math.rad(90 + .05 * math.cos(sine / 25))), .1) | |
1914 | LH.C0 = clerp(LH.C0, cn(-1, -1, -.0) * LHCF * angles(math.rad(6), math.rad(-0), math.rad(-90 + .05 * math.cos(sine / 25))), .1) | |
1915 | SWW.C0 = clerp(SWW.C0, CFrame.new(0,-1.5,-.8) * angles(math.rad(-0),math.rad(-180),math.rad(0)), 0.1) | |
1916 | ||
1917 | ||
1918 | ||
1919 | end | |
1920 | for i = 0, 1 do | |
1921 | for i = 0, 1, 0.1 do | |
1922 | swait() | |
1923 | ||
1924 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0.05, 0, -1.1) * angles(math.rad(0), math.rad(0), math.rad(0)), .1) | |
1925 | Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-30 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(-0)), .1) | |
1926 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5 - 0.01 * math.cos(sine / 8), -.0) * angles(math.rad(45 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(0)), 0.1) | |
1927 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5 - 0.01 * math.cos(sine / 8) , -.0) * angles(math.rad(45 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(0)), 0.1) | |
1928 | RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(-6), math.rad(0), math.rad(90 + .05 * math.cos(sine / 25))), .1) | |
1929 | LH.C0 = clerp(LH.C0, cn(-1, -1 ,0)* LHCF * angles(math.rad(6), math.rad(-0), math.rad(-90 + .05 * math.cos(sine / 25))), .1) | |
1930 | SWW.C0 = clerp(SWW.C0, CFrame.new(0,-1.5,-.8) * angles(math.rad(-0),math.rad(-180),math.rad(0)), 0.1) | |
1931 | ||
1932 | ||
1933 | ||
1934 | end | |
1935 | for i = 0, 1, 0.1 do | |
1936 | swait() | |
1937 | ||
1938 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0.05, 0, -1.1) * angles(math.rad(0), math.rad(0), math.rad(0)), .1) | |
1939 | Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-15 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(-0)), .1) | |
1940 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5 - 0.01 * math.cos(sine / 8), -.0) * angles(math.rad(45 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(0)), 0.1) | |
1941 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5 - 0.01 * math.cos(sine / 8) , -.0) * angles(math.rad(45 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(0)), 0.1) | |
1942 | RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(-6), math.rad(0), math.rad(90 + .05 * math.cos(sine / 25))), .1) | |
1943 | LH.C0 = clerp(LH.C0, cn(-1, -1, -.0) * LHCF * angles(math.rad(6), math.rad(-0), math.rad(-90 + .05 * math.cos(sine / 25))), .1) | |
1944 | SWW.C0 = clerp(SWW.C0, CFrame.new(0,-1.5,-.8) * angles(math.rad(-0),math.rad(-180),math.rad(0)), 0.1) | |
1945 | ||
1946 | ||
1947 | ||
1948 | end | |
1949 | end | |
1950 | ||
1951 | Humanoid.WalkSpeed = 16 | |
1952 | ||
1953 | attack = false | |
1954 | ||
1955 | ||
1956 | ||
1957 | ||
1958 | end | |
1959 | ||
1960 | ||
1961 | ||
1962 | ||
1963 | ||
1964 | ||
1965 | ||
1966 | ||
1967 | ||
1968 | ||
1969 | ||
1970 | ||
1971 | ||
1972 | ||
1973 | ||
1974 | ||
1975 | ||
1976 | end) | |
1977 | hitwait = false | |
1978 | function onTouch(part) | |
1979 | ||
1980 | local humanoid = part.Parent:findFirstChild("Humanoid") | |
1981 | local model = part.Parent | |
1982 | local torso = part.Parent:FindFirstChild("Torso") | |
1983 | local head = part.Parent:findFirstChild("Head") | |
1984 | local leftleg = part.Parent:findFirstChild("Left Leg") | |
1985 | local rightleg = part.Parent:findFirstChild("Right Leg") | |
1986 | local leftarm = part.Parent:findFirstChild("Left Arm") | |
1987 | local rightarm = part.Parent:findFirstChild("Right Arm") | |
1988 | ||
1989 | if hitwait == false and attack == false and model.Name == "Effects" == false and Runkey == true then | |
1990 | ||
1991 | hitwait = true | |
1992 | ||
1993 | ||
1994 | ||
1995 | ||
1996 | if (humanoid ~=nil) and humanoid.Health >0.01 and Torsovelocity > 1 then | |
1997 | ||
1998 | if IKM == true then | |
1999 | Effects.Sphere.Create(BrickColor.new("Really black"), FrontPart.CFrame * cn(0, -0, 0), 50, 50, 50, 40,40,40, 0.1) | |
2000 | Effects.Sphere.Create(BrickColor.new("Really red"), FrontPart.CFrame * cn(0, -0, 0), 50, 50, 50, 20,20,20, 0.05) | |
2001 | model:BreakJoints() | |
2002 | ||
2003 | else | |
2004 | Effects.Sphere.Create(BrickColor.new("White"), FrontPart.CFrame * cn(0, -0, 2), 100, 100, .1, 12,12,0, 0.1) | |
2005 | Effects.Sphere.Create(BrickColor.new("White"), FrontPart.CFrame * cn(0, -0, 2), 100, 100, 20, 1,1,1, 0.08) | |
2006 | MagniDamage(FrontPart, 6.5, 6, 6, .3, "Knockdown") | |
2007 | ||
2008 | end | |
2009 | ||
2010 | attack = true | |
2011 | Humanoid.WalkSpeed = 0 | |
2012 | local bodyVelocity2 = Create("BodyVelocity")({velocity = Vector3.new(0, 1, 0)-RootPart.CFrame.lookVector*1500, P = 50000, maxForce = Vector3.new(80000, 80000, 80000), Parent = Torso}) | |
2013 | ||
2014 | game:GetService("Debris"):AddItem(bodyVelocity2, 0.11) | |
2015 | ||
2016 | for i = 0, .5, 0.1 do | |
2017 | swait() | |
2018 | ||
2019 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0.05, 1, -0.5) * angles(math.rad(1), math.rad(0), math.rad(0)), .2) | |
2020 | Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-30 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(-0)), .1) | |
2021 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5 - 0.01 * math.cos(sine / 8), -.0) * angles(math.rad(45 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(0)), 0.2) | |
2022 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5 - 0.01 * math.cos(sine / 8) , -.0) * angles(math.rad(45 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(0)), 0.2) | |
2023 | RH.C0 = clerp(RH.C0, cn(1, -1 - 0.1 * math.cos(sine / 8), 0) * RHCF * angles(math.rad(-6), math.rad(0), math.rad(90 + .05 * math.cos(sine / 25))), .1) | |
2024 | LH.C0 = clerp(LH.C0, cn(-1, -1 - 0.1 * math.cos(sine / 8), -.0) * LHCF * angles(math.rad(6), math.rad(-0), math.rad(-90 + .05 * math.cos(sine / 25))), .1) | |
2025 | SWW.C0 = clerp(SWW.C0, CFrame.new(0,-1.5,-.3) * angles(math.rad(-0),math.rad(-180),math.rad(0)), 0.3) | |
2026 | ||
2027 | ||
2028 | ||
2029 | end | |
2030 | ||
2031 | ||
2032 | Humanoid.WalkSpeed = 16 | |
2033 | end | |
2034 | attack = false | |
2035 | wait(.08) | |
2036 | hitwait = false | |
2037 | end | |
2038 | ||
2039 | end | |
2040 | FrontPart.Touched:connect(onTouch) | |
2041 | ||
2042 | ||
2043 | ||
2044 | mouse.KeyUp:connect(function(k) | |
2045 | if k == "0"then | |
2046 | Runkey = false | |
2047 | ||
2048 | end | |
2049 | ||
2050 | ||
2051 | ||
2052 | ||
2053 | ||
2054 | ||
2055 | end) | |
2056 | ||
2057 | humHsave = Humanoid.Health | |
2058 | function GainCharge(Humanoid) | |
2059 | if Humanoid.Health == 0 then | |
2060 | equipped = false | |
2061 | end | |
2062 | if blocking == true then | |
2063 | ||
2064 | humDsave = Humanoid.Health | |
2065 | humDsave = humHsave - humDsave | |
2066 | if humDsave >0.01 then | |
2067 | ||
2068 | CFuncs.Sound.Create("http://www.roblox.com/asset/?id=260433850", Torso, 1, .5) | |
2069 | BlockEffect( BrickColor.new("Really red"), Torso.CFrame, 42, 42, 22, 0.1,0.1,0.1, 0.02,2) | |
2070 | BlockEffect( BrickColor.new("Really red"), RightArm.CFrame, 22, 42, 22, 0.1,0.1,0.1, 0.02,2) | |
2071 | BlockEffect( BrickColor.new("Really red"), LeftArm.CFrame, 22, 42, 22, 0.1,0.1,0.1, 0.02,2) | |
2072 | BlockEffect( BrickColor.new("Really red"), RightLeg.CFrame, 22, 42, 22, 0.1,0.1,0.1, 0.02,2) | |
2073 | BlockEffect( BrickColor.new("Really red"), LeftLeg.CFrame, 22, 42, 22, 0.1,0.1,0.1, 0.02,2) | |
2074 | humDsave = humDsave/3 | |
2075 | end | |
2076 | if humDsave <0 then | |
2077 | ||
2078 | ||
2079 | Effects.Sphere.Create(BrickColor.new("Lime green"), RootPart.CFrame * cn(0, -2.97, 0), 10, 5, 10, 15,-.1,15, 0.05) | |
2080 | --[[ | |
2081 | BlockEffect( BrickColor.new("Lime green"), Torso.CFrame, 41, 41, 21, 0,0,0, 0.1,2) | |
2082 | BlockEffect( BrickColor.new("Lime green"), RightArm.CFrame, 21, 41, 21, 0,0,0, 0.1,2) | |
2083 | BlockEffect( BrickColor.new("Lime green"), LeftArm.CFrame, 21, 41, 21, 0,0,0, 0.1,2) | |
2084 | BlockEffect( BrickColor.new("Lime green"), RightLeg.CFrame, 21, 41, 21, 0,0,0, 0.1,2) | |
2085 | BlockEffect( BrickColor.new("Lime green"), LeftLeg.CFrame, 21, 41, 21, 0,0,0, 0.1,2) | |
2086 | --]] | |
2087 | humDsave = humDsave*2.5 | |
2088 | end | |
2089 | ||
2090 | humHsave = humHsave - humDsave | |
2091 | ||
2092 | ||
2093 | ||
2094 | ||
2095 | end | |
2096 | ||
2097 | end | |
2098 | ||
2099 | Humanoid.HealthChanged:connect(function() GainCharge(Humanoid) end) | |
2100 | ||
2101 | ||
2102 | OnDeath = function() | |
2103 | ||
2104 | equipped = false | |
2105 | ||
2106 | ||
2107 | ||
2108 | end | |
2109 | ||
2110 | Humanoid.Died:connect(function()OnDeath(Character)end) | |
2111 | ||
2112 | ||
2113 | ||
2114 | print('Created By Draconix') |