SHOW:
|
|
- or go back to the newest paste.
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,Mouse,mouse,UserInputService,ContextActionService = owner | |
3 | local RealPlayer = Player | |
4 | do print("FE Compatibility code by Mokiros")local a=RealPlayer;script.Parent=a.Character;local b=Instance.new("RemoteEvent")b.Name="UserInput_Event"local function c()local d={_fakeEvent=true,Functions={},Connect=function(self,e)table.insert(self.Functions,e)end}d.connect=d.Connect;return d end;local f={Target=nil,Hit=CFrame.new(),KeyUp=c(),KeyDown=c(),Button1Up=c(),Button1Down=c(),Button2Up=c(),Button2Down=c()}local g={InputBegan=c(),InputEnded=c()}local CAS={Actions={},BindAction=function(self,h,i,j,...)CAS.Actions[h]=i and{Name=h,Function=i,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function k(self,l,...)local d=f[l]if d and d._fakeEvent then for m,e in pairs(d.Functions)do e(...)end end end;f.TrigEvent=k;g.TrigEvent=k;b.OnServerEvent:Connect(function(n,o)if n~=a then return end;f.Target=o.Target;f.Hit=o.Hit;if not o.isMouse then local p=o.UserInputState==Enum.UserInputState.Begin;if o.UserInputType==Enum.UserInputType.MouseButton1 then return f:TrigEvent(p and"Button1Down"or"Button1Up")end;if o.UserInputType==Enum.UserInputType.MouseButton2 then return f:TrigEvent(p and"Button2Down"or"Button2Up")end;for m,d in pairs(CAS.Actions)do for m,q in pairs(d.Keys)do if q==o.KeyCode then d.Function(d.Name,o.UserInputState,o)end end end;f:TrigEvent(p and"KeyDown"or"KeyUp",o.KeyCode.Name:lower())g:TrigEvent(p and"InputBegan"or"InputEnded",o,false)end end)b.Parent=NLS([==[local a=game:GetService("Players").LocalPlayer;local b=script:WaitForChild("UserInput_Event")local c=a:GetMouse()local d=game:GetService("UserInputService")local e=function(f,g)if g then return end;b:FireServer({KeyCode=f.KeyCode,UserInputType=f.UserInputType,UserInputState=f.UserInputState,Hit=c.Hit,Target=c.Target})end;d.InputBegan:Connect(e)d.InputEnded:Connect(e)local h,i;while wait(1/30)do if h~=c.Hit or i~=c.Target then h,i=c.Hit,c.Target;b:FireServer({isMouse=true,Target=i,Hit=h})end end]==],Player.Character)local r=game;local s={__index=function(self,q)local t=rawget(self,"_RealService")if t then return typeof(t[q])=="function"and function(m,...)return t[q](t,...)end or t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end}local function v(d,w)d._RealService=typeof(w)=="string"and r:GetService(w)or w;return setmetatable(d,s)end;local x={GetService=function(self,t)return rawget(self,t)or r:GetService(t)end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService"),RunService=v({_btrs={},RenderStepped=r:GetService("RunService").Heartbeat,BindToRenderStep=function(self,h,m,i)self._btrs[h]=self.Heartbeat:Connect(i)end,UnbindFromRenderStep=function(self,h)self._btrs[h]:Disconnect()end},"RunService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;v(x,game)game,owner=x,x.Players.LocalPlayer end | |
5 | ||
6 | ||
7 | local player = owner | |
8 | local Cha = player.Character | |
9 | local mouse = player:GetMouse() | |
10 | local henshine = false | |
11 | local RAC = Cha.Torso:WaitForChild("Right Shoulder") | |
12 | local LAC = Cha.Torso:WaitForChild("Left Shoulder") | |
13 | local RA = Cha:FindFirstChild("Right Arm") | |
14 | local LA = Cha:FindFirstChild("Left Arm") | |
15 | local Torso = Cha.Torso | |
16 | local Head = Cha.Head | |
17 | local RL = Cha:FindFirstChild("Right Leg") | |
18 | local LL = Cha:FindFirstChild("Left Leg") | |
19 | local Humanoid = Cha.Humanoid | |
20 | local guihead = Instance.new("BillboardGui") | |
21 | guihead.Parent = Head | |
22 | guihead.Adornee = Head | |
23 | guihead.MaxDistance = 100 | |
24 | guihead.Size = UDim2.new(3,0,3,0) | |
25 | guihead.StudsOffset = Vector3.new(0.5,2,0) | |
26 | local texthead = Instance.new("TextLabel") | |
27 | - | texthead.Text = "Mr Mystery" |
27 | + | texthead.Text = "Secret Agent" |
28 | texthead.Font = "Cartoon" | |
29 | texthead.TextColor3 = Color3.new(251, 255, 7) | |
30 | texthead.Size = UDim2.new(1,0,1,0) | |
31 | texthead.FontSize = 'Size32' | |
32 | texthead.Position = UDim2.new(-0.125,0,-0.25,0) | |
33 | texthead.BackgroundTransparency = 1 | |
34 | texthead.Parent = guihead | |
35 | ||
36 | if Cha:FindFirstChild("Shirt") then | |
37 | Cha["Shirt"]:remove() | |
38 | end | |
39 | if Cha:FindFirstChild("Pants") then | |
40 | Cha["Pants"]:remove() | |
41 | end | |
42 | wait(2) | |
43 | local shirt = Instance.new("Shirt",Cha) | |
44 | shirt.ShirtTemplate = "rbxassetid://361247795" | |
45 | local pants = Instance.new("Pants",Cha) | |
46 | pants.PantsTemplate = "rbxassetid://361247850" | |
47 | local headr = Instance.new("SpecialMesh") | |
48 | headr.MeshType = "FileMesh" | |
49 | headr.Parent = Head | |
50 | local hat = Instance.new("Part") | |
51 | hat.Parent = RA | |
52 | hat.CanCollide = false | |
53 | local Meshhat = Instance.new("SpecialMesh") | |
54 | Meshhat.MeshType = "FileMesh" | |
55 | Meshhat.MeshId = "rbxassetid://3473220812" | |
56 | Meshhat.TextureId = "rbxassetid://3473220854" | |
57 | Meshhat.Parent = hat | |
58 | local weld12 = Instance.new("Weld") | |
59 | weld12.Part0 = hat | |
60 | weld12.Part1 = Head | |
61 | - | weld12.C0 = RA.CFrame*CFrame.new(0,0.3,0) |
61 | + | weld12.C0 = Head.CFrame*CFrame.new(0,0.3,0) |
62 | weld12.Parent = Head | |
63 | local ArmourPart = Instance.new("Part") | |
64 | ArmourPart.Parent = Torso | |
65 | ArmourPart.CanCollide = false | |
66 | local Meshhat2 = Instance.new("SpecialMesh") | |
67 | Meshhat2.MeshType = "FileMesh" | |
68 | Meshhat2.MeshId = "rbxassetid://3473226799" | |
69 | Meshhat2.TextureId = "rbxassetid://3473220854" | |
70 | Meshhat2.Parent = ArmourPart | |
71 | local weld124 = Instance.new("Weld") | |
72 | weld124.Part0 = ArmourPart | |
73 | weld124.Part1 = Torso | |
74 | weld124.C0 = Torso.CFrame | |
75 | weld124.Parent = Head | |
76 | - | game:GetService('RunService').Stepped:Connect(function() |
76 | + | |
77 | - | hat.Color = Color3.new(math.random) |
77 | + | |
78 | a:Destroy() | |
79 | end | |
80 | end | |
81 | hen = true | |
82 | ||
83 | Head.face:Destroy() | |
84 | ||
85 | wait(1) | |
86 | local SongDriver15 = Instance.new("Sound") | |
87 | SongDriver15.Parent = Cha.Torso | |
88 | SongDriver15.SoundId = "rbxassetid://1873219898" | |
89 | SongDriver15.Volume = 3 | |
90 | SongDriver15:Play() | |
91 | Player = owner | |
92 | Mouse = Player:GetMouse() | |
93 | PlayerGui = Player.PlayerGui | |
94 | Cam = workspace.CurrentCamera | |
95 | Backpack = Player.Backpack | |
96 | Character = Player.Character | |
97 | Humanoid = Character.Humanoid | |
98 | RootPart = Character["HumanoidRootPart"] | |
99 | Torso = Character["Torso"] | |
100 | Head = Character["Head"] | |
101 | RightArm = Character["Right Arm"] | |
102 | LeftArm = Character["Left Arm"] | |
103 | RightLeg = Character["Right Leg"] | |
104 | LeftLeg = Character["Left Leg"] | |
105 | RootJoint = RootPart["RootJoint"] | |
106 | Neck = Torso["Neck"] | |
107 | RightShoulder = Torso["Right Shoulder"] | |
108 | LeftShoulder = Torso["Left Shoulder"] | |
109 | RightHip = Torso["Right Hip"] | |
110 | LeftHip = Torso["Left Hip"] | |
111 | local TIME = 0 | |
112 | local sick = Instance.new("Sound",Torso) | |
113 | ||
114 | IT = Instance.new | |
115 | CF = CFrame.new | |
116 | VT = Vector3.new | |
117 | RAD = math.rad | |
118 | C3 = Color3.new | |
119 | UD2 = UDim2.new | |
120 | BRICKC = BrickColor.new | |
121 | ANGLES = CFrame.Angles | |
122 | EULER = CFrame.fromEulerAnglesXYZ | |
123 | COS = math.cos | |
124 | ACOS = math.acos | |
125 | SIN = math.sin | |
126 | ASIN = math.asin | |
127 | ABS = math.abs | |
128 | MRANDOM = math.random | |
129 | FLOOR = math.floor | |
130 | ||
131 | --//=================================\\ | |
132 | --|| Value shit things | |
133 | --\\=================================// | |
134 | ||
135 | Animation_Speed = 3 | |
136 | local FORCERESET = false | |
137 | Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60) | |
138 | local SIZE = 1 | |
139 | local Speed = 24 | |
140 | local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) | |
141 | local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) | |
142 | local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) | |
143 | local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) | |
144 | local DAMAGEMULTIPLIER = 1 | |
145 | local ANIM = "Idle" | |
146 | local ATTACK = false | |
147 | local EQUIPPED = false | |
148 | local HOLD = false | |
149 | local COMBO = 1 | |
150 | local Rooted = false | |
151 | local SINE = 0 | |
152 | local KEYHOLD = false | |
153 | local CHANGE = 2 / Animation_Speed | |
154 | local WALKINGANIM = false | |
155 | local VALUE1 = false | |
156 | local VALUE2 = false | |
157 | local ROBLOXIDLEANIMATION = IT("Animation") | |
158 | ROBLOXIDLEANIMATION.Name = "Roblox Idle Animation" | |
159 | ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571" | |
160 | --ROBLOXIDLEANIMATION.Parent = Humanoid | |
161 | local WEAPONGUI = IT("ScreenGui", PlayerGui) | |
162 | WEAPONGUI.Name = "BanishV3Gui" | |
163 | local Weapon = IT("Model") | |
164 | Weapon.Name = "Adds" | |
165 | local Effects = IT("Folder", Weapon) | |
166 | Effects.Name = "Effects" | |
167 | local ANIMATOR = Humanoid.Animator | |
168 | local ANIMATE = Character:FindFirstChild("Animate") | |
169 | local UNANCHOR = true | |
170 | local TOBANISH = {} | |
171 | Player_Size = 1 | |
172 | local Mode = 1 | |
173 | local kan = Instance.new("Sound",Character) | |
174 | kan.Volume = 0 | |
175 | kan.TimePosition = 0 | |
176 | kan.PlaybackSpeed = 1 | |
177 | kan.Pitch = 1 | |
178 | kan.SoundId = "rbxassetid://614032233" | |
179 | kan.Name = "wrecked" | |
180 | kan.Looped = true | |
181 | kan:Play() | |
182 | local currentThemePlaying = kan.SoundId | |
183 | local currentPitch = kan.Pitch | |
184 | local currentVol = kan.Volume | |
185 | --//=================================\\ | |
186 | --\\=================================// | |
187 | for i,v in pairs(Character:children()) do | |
188 | if v:IsA("Accessory") then | |
189 | v:Destroy() | |
190 | end | |
191 | end | |
192 | ||
193 | warn("CREATED BY AlmightyToast#6465") | |
194 | warn("aka KrYn0MoRe or ShrekBenson") | |
195 | warn("DOnt rEm0vE tH1s 0r uR gAy") | |
196 | --//=================================\\ | |
197 | --|| SAZERENOS' ARTIFICIAL HEARTBEAT | |
198 | --\\=================================// | |
199 | ||
200 | ArtificialHB = Instance.new("BindableEvent", script) | |
201 | ArtificialHB.Name = "ArtificialHB" | |
202 | ||
203 | script:WaitForChild("ArtificialHB") | |
204 | ||
205 | frame = Frame_Speed | |
206 | tf = 0 | |
207 | allowframeloss = false | |
208 | tossremainder = false | |
209 | lastframe = tick() | |
210 | script.ArtificialHB:Fire() | |
211 | ||
212 | game:GetService("RunService").Heartbeat:connect(function(s, p) | |
213 | tf = tf + s | |
214 | if tf >= frame then | |
215 | if allowframeloss then | |
216 | script.ArtificialHB:Fire() | |
217 | lastframe = tick() | |
218 | else | |
219 | for i = 1, math.floor(tf / frame) do | |
220 | script.ArtificialHB:Fire() | |
221 | end | |
222 | lastframe = tick() | |
223 | end | |
224 | if tossremainder then | |
225 | tf = 0 | |
226 | else | |
227 | tf = tf - frame * math.floor(tf / frame) | |
228 | end | |
229 | end | |
230 | end) | |
231 | ||
232 | --//=================================\\ | |
233 | --\\=================================// | |
234 | ||
235 | --//=================================\\ | |
236 | --|| MOST FUNCTIONS | |
237 | --\\=================================// | |
238 | ||
239 | function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS) | |
240 | return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS) | |
241 | end | |
242 | ||
243 | function PositiveAngle(NUMBER) | |
244 | if NUMBER >= 0 then | |
245 | NUMBER = 0 | |
246 | end | |
247 | return NUMBER | |
248 | end | |
249 | ||
250 | function NegativeAngle(NUMBER) | |
251 | if NUMBER <= 0 then | |
252 | NUMBER = 0 | |
253 | end | |
254 | return NUMBER | |
255 | end | |
256 | ||
257 | function Swait(NUMBER) | |
258 | if NUMBER == 0 or NUMBER == nil then | |
259 | ArtificialHB.Event:wait() | |
260 | else | |
261 | for i = 1, NUMBER do | |
262 | ArtificialHB.Event:wait() | |
263 | end | |
264 | end | |
265 | end | |
266 | ||
267 | function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET) | |
268 | local NEWMESH = IT(MESH) | |
269 | if MESH == "SpecialMesh" then | |
270 | NEWMESH.MeshType = MESHTYPE | |
271 | if MESHID ~= "nil" and MESHID ~= "" then | |
272 | NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID | |
273 | end | |
274 | if TEXTUREID ~= "nil" and TEXTUREID ~= "" then | |
275 | NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID | |
276 | end | |
277 | end | |
278 | NEWMESH.Offset = OFFSET or VT(0, 0, 0) | |
279 | NEWMESH.Scale = SCALE | |
280 | NEWMESH.Parent = PARENT | |
281 | return NEWMESH | |
282 | end | |
283 | ||
284 | function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR) | |
285 | local NEWPART = IT("Part") | |
286 | NEWPART.formFactor = FORMFACTOR | |
287 | NEWPART.Reflectance = REFLECTANCE | |
288 | NEWPART.Transparency = TRANSPARENCY | |
289 | NEWPART.CanCollide = false | |
290 | NEWPART.Locked = true | |
291 | NEWPART.Anchored = true | |
292 | if ANCHOR == false then | |
293 | NEWPART.Anchored = false | |
294 | end | |
295 | NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR)) | |
296 | NEWPART.Name = NAME | |
297 | NEWPART.Size = SIZE | |
298 | NEWPART.Position = Torso.Position | |
299 | NEWPART.Material = MATERIAL | |
300 | NEWPART:BreakJoints() | |
301 | NEWPART.Parent = PARENT | |
302 | return NEWPART | |
303 | end | |
304 | ||
305 | local function weldBetween(a, b) | |
306 | local weldd = IT("Weld") | |
307 | weldd.Part0 = a | |
308 | weldd.Part1 = b | |
309 | weldd.C0 = CF() | |
310 | weldd.C1 = b.CFrame:inverse() * a.CFrame | |
311 | weldd.Parent = a | |
312 | return weldd | |
313 | end | |
314 | ||
315 | ||
316 | function QuaternionFromCFrame(cf) | |
317 | local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components() | |
318 | local trace = m00 + m11 + m22 | |
319 | if trace > 0 then | |
320 | local s = math.sqrt(1 + trace) | |
321 | local recip = 0.5 / s | |
322 | return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5 | |
323 | else | |
324 | local i = 0 | |
325 | if m11 > m00 then | |
326 | i = 1 | |
327 | end | |
328 | if m22 > (i == 0 and m00 or m11) then | |
329 | i = 2 | |
330 | end | |
331 | if i == 0 then | |
332 | local s = math.sqrt(m00 - m11 - m22 + 1) | |
333 | local recip = 0.5 / s | |
334 | return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip | |
335 | elseif i == 1 then | |
336 | local s = math.sqrt(m11 - m22 - m00 + 1) | |
337 | local recip = 0.5 / s | |
338 | return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip | |
339 | elseif i == 2 then | |
340 | local s = math.sqrt(m22 - m00 - m11 + 1) | |
341 | local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip | |
342 | end | |
343 | end | |
344 | end | |
345 | ||
346 | function QuaternionToCFrame(px, py, pz, x, y, z, w) | |
347 | local xs, ys, zs = x + x, y + y, z + z | |
348 | local wx, wy, wz = w * xs, w * ys, w * zs | |
349 | local xx = x * xs | |
350 | local xy = x * ys | |
351 | local xz = x * zs | |
352 | local yy = y * ys | |
353 | local yz = y * zs | |
354 | local zz = z * zs | |
355 | 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)) | |
356 | end | |
357 | ||
358 | function QuaternionSlerp(a, b, t) | |
359 | local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4] | |
360 | local startInterp, finishInterp; | |
361 | if cosTheta >= 0.0001 then | |
362 | if (1 - cosTheta) > 0.0001 then | |
363 | local theta = ACOS(cosTheta) | |
364 | local invSinTheta = 1 / SIN(theta) | |
365 | startInterp = SIN((1 - t) * theta) * invSinTheta | |
366 | finishInterp = SIN(t * theta) * invSinTheta | |
367 | else | |
368 | startInterp = 1 - t | |
369 | finishInterp = t | |
370 | end | |
371 | else | |
372 | if (1 + cosTheta) > 0.0001 then | |
373 | local theta = ACOS(-cosTheta) | |
374 | local invSinTheta = 1 / SIN(theta) | |
375 | startInterp = SIN((t - 1) * theta) * invSinTheta | |
376 | finishInterp = SIN(t * theta) * invSinTheta | |
377 | else | |
378 | startInterp = t - 1 | |
379 | finishInterp = t | |
380 | end | |
381 | end | |
382 | 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 | |
383 | end | |
384 | ||
385 | function Clerp(a, b, t) | |
386 | local qa = {QuaternionFromCFrame(a)} | |
387 | local qb = {QuaternionFromCFrame(b)} | |
388 | local ax, ay, az = a.x, a.y, a.z | |
389 | local bx, by, bz = b.x, b.y, b.z | |
390 | local _t = 1 - t | |
391 | return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t)) | |
392 | end | |
393 | ||
394 | function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME) | |
395 | local frame = IT("Frame") | |
396 | frame.BackgroundTransparency = TRANSPARENCY | |
397 | frame.BorderSizePixel = BORDERSIZEPIXEL | |
398 | frame.Position = POSITION | |
399 | frame.Size = SIZE | |
400 | frame.BackgroundColor3 = COLOR | |
401 | frame.BorderColor3 = BORDERCOLOR | |
402 | frame.Name = NAME | |
403 | frame.Parent = PARENT | |
404 | return frame | |
405 | end | |
406 | ||
407 | function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME) | |
408 | local label = IT("TextLabel") | |
409 | label.BackgroundTransparency = 1 | |
410 | label.Size = UD2(1, 0, 1, 0) | |
411 | label.Position = UD2(0, 0, 0, 0) | |
412 | label.TextColor3 = TEXTCOLOR | |
413 | label.TextStrokeTransparency = STROKETRANSPARENCY | |
414 | label.TextTransparency = TRANSPARENCY | |
415 | label.FontSize = TEXTFONTSIZE | |
416 | label.Font = TEXTFONT | |
417 | label.BorderSizePixel = BORDERSIZEPIXEL | |
418 | label.TextScaled = false | |
419 | label.Text = TEXT | |
420 | label.Name = NAME | |
421 | label.Parent = PARENT | |
422 | return label | |
423 | end | |
424 | ||
425 | function NoOutlines(PART) | |
426 | PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10 | |
427 | end | |
428 | ||
429 | function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1) | |
430 | local NEWWELD = IT(TYPE) | |
431 | NEWWELD.Part0 = PART0 | |
432 | NEWWELD.Part1 = PART1 | |
433 | NEWWELD.C0 = C0 | |
434 | NEWWELD.C1 = C1 | |
435 | NEWWELD.Parent = PARENT | |
436 | return NEWWELD | |
437 | end | |
438 | ||
439 | local S = IT("Sound") | |
440 | function CreateSound(ID, PARENT, VOLUME, PITCH, DOESLOOP) | |
441 | local NEWSOUND = nil | |
442 | coroutine.resume(coroutine.create(function() | |
443 | NEWSOUND = S:Clone() | |
444 | NEWSOUND.Parent = PARENT | |
445 | NEWSOUND.Volume = VOLUME | |
446 | NEWSOUND.Pitch = PITCH | |
447 | NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID | |
448 | NEWSOUND:play() | |
449 | if DOESLOOP == true then | |
450 | NEWSOUND.Looped = true | |
451 | else | |
452 | repeat wait(1) until NEWSOUND.Playing == false or NEWSOUND.Parent ~= PARENT | |
453 | NEWSOUND:remove() | |
454 | end | |
455 | end)) | |
456 | return NEWSOUND | |
457 | end | |
458 | ||
459 | function CFrameFromTopBack(at, top, back) | |
460 | local right = top:Cross(back) | |
461 | return CF(at.x, at.y, at.z, right.x, top.x, back.x, right.y, top.y, back.y, right.z, top.z, back.z) | |
462 | end | |
463 | ||
464 | --WACKYEFFECT({EffectType = "", Size = VT(1,1,1), Size2 = VT(0,0,0), Transparency = 0, Transparency2 = 1, CFrame = CF(), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(1,1,1), SoundID = nil, SoundPitch = nil, SoundVolume = nil}) | |
465 | function WACKYEFFECT(Table) | |
466 | local TYPE = (Table.EffectType or "Sphere") | |
467 | local SIZE = (Table.Size or VT(1,1,1)) | |
468 | local ENDSIZE = (Table.Size2 or VT(0,0,0)) | |
469 | local TRANSPARENCY = (Table.Transparency or 0) | |
470 | local ENDTRANSPARENCY = (Table.Transparency2 or 1) | |
471 | local CFRAME = (Table.CFrame or Torso.CFrame) | |
472 | local MOVEDIRECTION = (Table.MoveToPos or nil) | |
473 | local ROTATION1 = (Table.RotationX or 0) | |
474 | local ROTATION2 = (Table.RotationY or 0) | |
475 | local ROTATION3 = (Table.RotationZ or 0) | |
476 | local MATERIAL = (Table.Material or "Neon") | |
477 | local COLOR = (Table.Color or C3(1,1,1)) | |
478 | local TIME = (Table.Time or 45) | |
479 | local SOUNDID = (Table.SoundID or nil) | |
480 | local SOUNDPITCH = (Table.SoundPitch or nil) | |
481 | local SOUNDVOLUME = (Table.SoundVolume or nil) | |
482 | coroutine.resume(coroutine.create(function() | |
483 | local PLAYSSOUND = false | |
484 | local SOUND = nil | |
485 | local EFFECT = CreatePart(3, Effects, MATERIAL, 0, TRANSPARENCY, BRICKC("Pearl"), "Effect", VT(1,1,1), true) | |
486 | if SOUNDID ~= nil and SOUNDPITCH ~= nil and SOUNDVOLUME ~= nil then | |
487 | PLAYSSOUND = true | |
488 | SOUND = CreateSound(SOUNDID, EFFECT, SOUNDVOLUME, SOUNDPITCH, false) | |
489 | end | |
490 | EFFECT.Color = COLOR | |
491 | local MSH = nil | |
492 | if TYPE == "Sphere" then | |
493 | MSH = CreateMesh("SpecialMesh", EFFECT, "Sphere", "", "", SIZE, VT(0,0,0)) | |
494 | elseif TYPE == "Block" then | |
495 | MSH = IT("BlockMesh",EFFECT) | |
496 | MSH.Scale = VT(SIZE.X,SIZE.X,SIZE.X) | |
497 | elseif TYPE == "Wave" then | |
498 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "20329976", "", SIZE, VT(0,0,-SIZE.X/8)) | |
499 | elseif TYPE == "Ring" then | |
500 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "559831844", "", VT(SIZE.X,SIZE.X,0.1), VT(0,0,0)) | |
501 | elseif TYPE == "Slash" then | |
502 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662586858", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0)) | |
503 | elseif TYPE == "Round Slash" then | |
504 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662585058", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0)) | |
505 | elseif TYPE == "Swirl" then | |
506 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "1051557", "", SIZE, VT(0,0,0)) | |
507 | elseif TYPE == "Skull" then | |
508 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "4770583", "", SIZE, VT(0,0,0)) | |
509 | elseif TYPE == "Crystal" then | |
510 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "9756362", "", SIZE, VT(0,0,0)) | |
511 | end | |
512 | if MSH ~= nil then | |
513 | local MOVESPEED = nil | |
514 | if MOVEDIRECTION ~= nil then | |
515 | MOVESPEED = (CFRAME.p - MOVEDIRECTION).Magnitude/TIME | |
516 | end | |
517 | local GROWTH = SIZE - ENDSIZE | |
518 | local TRANS = TRANSPARENCY - ENDTRANSPARENCY | |
519 | if TYPE == "Block" then | |
520 | EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))) | |
521 | else | |
522 | EFFECT.CFrame = CFRAME | |
523 | end | |
524 | for LOOP = 1, TIME+1 do | |
525 | Swait() | |
526 | MSH.Scale = MSH.Scale - GROWTH/TIME | |
527 | if TYPE == "Wave" then | |
528 | MSH.Offset = VT(0,0,-MSH.Scale.X/8) | |
529 | end | |
530 | EFFECT.Transparency = EFFECT.Transparency - TRANS/TIME | |
531 | if TYPE == "Block" then | |
532 | EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))) | |
533 | else | |
534 | EFFECT.CFrame = EFFECT.CFrame*ANGLES(RAD(ROTATION1),RAD(ROTATION2),RAD(ROTATION3)) | |
535 | end | |
536 | if MOVEDIRECTION ~= nil then | |
537 | local ORI = EFFECT.Orientation | |
538 | EFFECT.CFrame = CF(EFFECT.Position,MOVEDIRECTION)*CF(0,0,-MOVESPEED) | |
539 | EFFECT.Orientation = ORI | |
540 | end | |
541 | end | |
542 | if PLAYSSOUND == false then | |
543 | EFFECT:remove() | |
544 | else | |
545 | SOUND.Stopped:Connect(function() | |
546 | EFFECT:remove() | |
547 | end) | |
548 | end | |
549 | else | |
550 | if PLAYSSOUND == false then | |
551 | EFFECT:remove() | |
552 | else | |
553 | repeat Swait() until SOUND.Playing == false | |
554 | EFFECT:remove() | |
555 | end | |
556 | end | |
557 | end)) | |
558 | end | |
559 | ||
560 | function MakeForm(PART,TYPE) | |
561 | if TYPE == "Cyl" then | |
562 | local MSH = IT("CylinderMesh",PART) | |
563 | elseif TYPE == "Ball" then | |
564 | local MSH = IT("SpecialMesh",PART) | |
565 | MSH.MeshType = "Sphere" | |
566 | elseif TYPE == "Wedge" then | |
567 | local MSH = IT("SpecialMesh",PART) | |
568 | MSH.MeshType = "Wedge" | |
569 | end | |
570 | end | |
571 | ||
572 | function SpawnTrail(FROM,TO,BIG) | |
573 | local TRAIL = CreatePart(3, Effects, "Neon", 0, 0.5, "New Yeller", "Trail", VT(0,0,0)) | |
574 | MakeForm(TRAIL,"Cyl") | |
575 | local DIST = (FROM - TO).Magnitude | |
576 | if BIG == true then | |
577 | TRAIL.Size = VT(0.5,DIST,0.5) | |
578 | else | |
579 | TRAIL.Size = VT(0.25,DIST,0.25) | |
580 | end | |
581 | TRAIL.CFrame = CF(FROM, TO) * CF(0, 0, -DIST/2) * ANGLES(RAD(90),RAD(0),RAD(0)) | |
582 | coroutine.resume(coroutine.create(function() | |
583 | for i = 1, 5 do | |
584 | Swait() | |
585 | TRAIL.Transparency = TRAIL.Transparency + 0.1 | |
586 | end | |
587 | TRAIL:remove() | |
588 | end)) | |
589 | end | |
590 | ||
591 | Debris = game:GetService("Debris") | |
592 | ||
593 | function CastProperRay(StartPos, EndPos, Distance, Ignore) | |
594 | local DIRECTION = CF(StartPos,EndPos).lookVector | |
595 | return Raycast(StartPos, DIRECTION, Distance, Ignore) | |
596 | end | |
597 | ||
598 | function turnto(position) | |
599 | RootPart.CFrame=CFrame.new(RootPart.CFrame.p,VT(position.X,RootPart.Position.Y,position.Z)) * CFrame.new(0, 0, 0) | |
600 | end | |
601 | local asd = Instance.new("ParticleEmitter") | |
602 | asd.Color = ColorSequence.new(Color3.new(0.5, 0, 0), Color3.new(.3, 0, 0)) | |
603 | asd.LightEmission = .1 | |
604 | asd.Texture = "http://www.roblox.com/asset/?ID=291880914" | |
605 | aaa = NumberSequence.new({NumberSequenceKeypoint.new(0, 0.6),NumberSequenceKeypoint.new(1, 2)}) | |
606 | bbb = NumberSequence.new({NumberSequenceKeypoint.new(0, 1),NumberSequenceKeypoint.new(0.0636, 0), NumberSequenceKeypoint.new(1, 1)}) | |
607 | asd.Transparency = bbb | |
608 | asd.Size = aaa | |
609 | asd.ZOffset = .9 | |
610 | asd.Acceleration = Vector3.new(0, -15, 0) | |
611 | asd.LockedToPart = false | |
612 | asd.EmissionDirection = "Back" | |
613 | asd.Lifetime = NumberRange.new(1, 2) | |
614 | asd.Rotation = NumberRange.new(-100, 100) | |
615 | asd.RotSpeed = NumberRange.new(-100, 100) | |
616 | asd.Speed = NumberRange.new(10) | |
617 | asd.Enabled = false | |
618 | asd.VelocitySpread = 999 | |
619 | ||
620 | function getbloody(victim,amount) | |
621 | local PART = CreatePart(3, Effects, "Neon", 0, 1, "New Yeller", "Blood", victim.Size) | |
622 | PART.CFrame = victim.CFrame | |
623 | local HITPLAYERSOUNDS = {"356551938","264486467"} | |
624 | Debris:AddItem(PART,5) | |
625 | CreateSound(HITPLAYERSOUNDS[MRANDOM(1, #HITPLAYERSOUNDS)], PART, 1, (math.random(8,12)/10)) | |
626 | CreateSound(HITPLAYERSOUNDS[MRANDOM(1, #HITPLAYERSOUNDS)], PART, 1, (math.random(8,12)/10)) | |
627 | CreateSound(HITPLAYERSOUNDS[MRANDOM(1, #HITPLAYERSOUNDS)], PART, 1, (math.random(8,12)/10)) | |
628 | local prtcl = asd:Clone() | |
629 | prtcl.Parent = PART | |
630 | prtcl:Emit(amount*10) | |
631 | end | |
632 | ||
633 | local Particle = IT("ParticleEmitter",nil) | |
634 | Particle.Enabled = false | |
635 | Particle.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,1),NumberSequenceKeypoint.new(0.3,0.95),NumberSequenceKeypoint.new(1,1)}) | |
636 | Particle.LightEmission = 0.5 | |
637 | Particle.Rate = 150 | |
638 | Particle.ZOffset = 1 | |
639 | Particle.Rotation = NumberRange.new(-180, 180) | |
640 | Particle.RotSpeed = NumberRange.new(-180, 180) | |
641 | Particle.Texture = "http://www.roblox.com/asset/?id=304437537" | |
642 | Particle.Color = ColorSequence.new(C3(0,1,0),C3(0.4,0,0)) | |
643 | ||
644 | --ParticleEmitter({Speed = 5, Drag = 0, Size1 = 1, Size2 = 5, Lifetime1 = 1, Lifetime2 = 1.5, Parent = Torso, Emit = 100, Offset = 360, Enabled = false}) | |
645 | function ParticleEmitter(Table) | |
646 | local PRTCL = Particle:Clone() | |
647 | local Speed = Table.Speed or 5 | |
648 | local Drag = Table.Drag or 0 | |
649 | local Size1 = Table.Size1 or 1 | |
650 | local Size2 = Table.Size2 or 5 | |
651 | local Lifetime1 = Table.Lifetime1 or 1 | |
652 | local Lifetime2 = Table.Lifetime2 or 1.5 | |
653 | local Parent = Table.Parent or Torso | |
654 | local Emit = Table.Emit or 100 | |
655 | local Offset = Table.Offset or 360 | |
656 | local Acel = Table.Acel or VT(0,0,0) | |
657 | local Enabled = Table.Enabled or false | |
658 | PRTCL.Parent = Parent | |
659 | PRTCL.Size = NumberSequence.new(Size1,Size2) | |
660 | PRTCL.Lifetime = NumberRange.new(Lifetime1,Lifetime2) | |
661 | PRTCL.Speed = NumberRange.new(Speed) | |
662 | PRTCL.VelocitySpread = Offset | |
663 | PRTCL.Drag = Drag | |
664 | PRTCL.Acceleration = Acel | |
665 | if Enabled == false then | |
666 | PRTCL:Emit(Emit) | |
667 | Debris:AddItem(PRTCL,Lifetime2) | |
668 | else | |
669 | PRTCL.Enabled = true | |
670 | end | |
671 | return PRTCL | |
672 | end | |
673 | ||
674 | function unanchor() | |
675 | if UNANCHOR == true then | |
676 | g = Character:GetChildren() | |
677 | for i = 1, #g do | |
678 | if g[i].ClassName == "Part" then | |
679 | g[i].Anchored = false | |
680 | end | |
681 | end | |
682 | end | |
683 | end | |
684 | ||
685 | function newTheme(ID,timepos,pitch,vol) | |
686 | local kanz = kan | |
687 | --kanz:Stop() | |
688 | kanz.Volume = vol | |
689 | --kanz.TimePosition = timepos | |
690 | kanz.PlaybackSpeed = pitch | |
691 | kanz.Pitch = pitch | |
692 | kanz.SoundId = ID | |
693 | kanz.Name = "wrecked" | |
694 | kanz.Looped = true | |
695 | currentThemePlaying = kanz.SoundId | |
696 | currentVol = kanz.Volume | |
697 | currentPitch = kanz.Pitch | |
698 | --kanz:Play() | |
699 | --coroutine.resume(coroutine.create(function() | |
700 | --wait(0.05) | |
701 | --end)) | |
702 | end | |
703 | ||
704 | --//=================================\\ | |
705 | --|| Attacks | |
706 | --\\=================================// | |
707 | function switch() | |
708 | ATTACK = true | |
709 | Rooted = true | |
710 | CreateSound("363808674",workspace,8,1,false) | |
711 | for i=0, 1.5, 0.1 / Animation_Speed do | |
712 | Swait() | |
713 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(18), RAD(0)), 1 / Animation_Speed) | |
714 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(180), RAD(0), RAD(-24)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
715 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(180), RAD(0), RAD(12)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
716 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(75), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
717 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-50), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
718 | end | |
719 | CreateSound("363808674",workspace,8,1,false) | |
720 | for i=0, 1.5, 0.1 / Animation_Speed do | |
721 | Swait() | |
722 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(-18), RAD(0)), 1 / Animation_Speed) | |
723 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(180), RAD(0), RAD(-12)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
724 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(180), RAD(0), RAD(24)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
725 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(75), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
726 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-50), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
727 | end | |
728 | if Mode == 1 and Mode ~= 2 then | |
729 | Mode = 2 | |
730 | Speed = 38 | |
731 | Humanoid.WalkSpeed = Speed | |
732 | elseif Mode == 2 and Mode ~= 1 then | |
733 | Mode = 1 | |
734 | Speed = 24 | |
735 | Humanoid.WalkSpeed = Speed | |
736 | end | |
737 | ATTACK = false | |
738 | Rooted = false | |
739 | end | |
740 | ||
741 | function Spinning_Attack() | |
742 | ATTACK = true | |
743 | CreatePart("Block",LeftArm,"Plastic",0,1,BrickColor.new(0,0,0),"HitBox",Vector3.new(1,2,1),false) | |
744 | local HitBox = LeftArm.HitBox | |
745 | weldBetween(HitBox, LeftArm) | |
746 | Humanoid.WalkSpeed = 3.01 | |
747 | for i = 0, 1.2, 0.1 do | |
748 | Swait() | |
749 | RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CFrame.new(0, -0.5, 0) * ANGLES(math.rad(0), math.rad(0), math.rad(-65)), 0.3) | |
750 | Torso.Neck.C0 = Clerp(Torso.Neck.C0, NECKC0 * ANGLES(math.rad(10), math.rad(0), math.rad(0)), 0.1) | |
751 | RightShoulder.C0 = Clerp(RightShoulder.C0, CFrame.new(1.5, 0.5, 0) * ANGLES(math.rad(0), math.rad(0), math.rad(10)), 0.1) | |
752 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CFrame.new(-1.5, 0.5, 0) * ANGLES(math.rad(-35), math.rad(0), math.rad(-10)), 0.3) | |
753 | RightHip.C0 = Clerp(RightHip.C0, CFrame.new(1, -1, 0) * RIGHTSHOULDERC0 * ANGLES(math.rad(-2.5), math.rad(-25), math.rad(-25)), 0.3) | |
754 | LeftHip.C0 = Clerp(LeftHip.C0, CFrame.new(-1, -1, 0) * LEFTSHOULDERC0 * ANGLES(math.rad(-2.5), math.rad(-0), math.rad(-20)), 0.3) | |
755 | end | |
756 | for i = 0, 4.6, 0.1 do | |
757 | Swait() | |
758 | CreateSound("2304904662",workspace,3,1,false) | |
759 | HitBox.Touched:connect(function(hit) | |
760 | if hit.Parent and hit.Parent ~= Character and hit.Parent:FindFirstChildOfClass('Humanoid') then | |
761 | hit.Parent:FindFirstChildOfClass('Humanoid').Health = 1 - 9999e+999 | |
762 | end | |
763 | end) | |
764 | RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CFrame.new(0, -0.5, 0) * ANGLES(math.rad(0), math.rad(0), math.rad(65 + 255.45 * i)), 0.3) | |
765 | Torso.Neck.C0 = Clerp(Torso.Neck.C0, NECKC0 * ANGLES(math.rad(10), math.rad(0), math.rad(0)), 0.1) | |
766 | RightShoulder.C0 = Clerp(RightShoulder.C0, CFrame.new(1.5, 0.5, 0) * ANGLES(math.rad(-90), math.rad(0), math.rad(47)), 0.1) | |
767 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CFrame.new(-1.5, 0.5, 0) * ANGLES(math.rad(-90), math.rad(-90), math.rad(-47)), 0.3) | |
768 | RightHip.C0 = Clerp(RightHip.C0, CFrame.new(1, -1, 0) * RIGHTSHOULDERC0 * ANGLES(math.rad(-2.5), math.rad(-25), math.rad(95)), 0.3) | |
769 | LeftHip.C0 = Clerp(LeftHip.C0, CFrame.new(-1, -1, 0) * LEFTSHOULDERC0 * ANGLES(math.rad(-4.5), math.rad(0), math.rad(30)), 0.3) | |
770 | end | |
771 | ATTACK = false | |
772 | Humanoid.WalkSpeed = 8 | |
773 | HitBox:Destroy() | |
774 | end | |
775 | ||
776 | --//=================================\\ | |
777 | --|| Key Functions | |
778 | --\\=================================// | |
779 | Mouse.KeyDown:connect(function(k) | |
780 | if(ATTACK)then return end | |
781 | if(k == 't')then | |
782 | switch() | |
783 | elseif(k == 'v')then | |
784 | Spinning_Attack() | |
785 | end | |
786 | end) | |
787 | --//=================================\\ | |
788 | --|| Animations | |
789 | --\\=================================// | |
790 | ||
791 | local CONNECT = nil | |
792 | ||
793 | while true do | |
794 | Swait() | |
795 | ANIMATE.Parent = nil | |
796 | if Character:FindFirstChildOfClass("Humanoid") == nil then | |
797 | Humanoid = IT("Humanoid",Character) | |
798 | end | |
799 | for _,v in next, Humanoid:GetPlayingAnimationTracks() do | |
800 | v:Stop(); | |
801 | end | |
802 | SINE = SINE + CHANGE | |
803 | local TORSOVELOCITY = (RootPart.Velocity * VT(1, 0, 1)).magnitude | |
804 | local TORSOVERTICALVELOCITY = RootPart.Velocity.y | |
805 | local HITFLOOR = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4, Character) | |
806 | local WALKSPEEDVALUE = 12 / (Humanoid.WalkSpeed / 12) | |
807 | if ANIM == "Walk" and TORSOVELOCITY > 1 then | |
808 | RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, -0.15 * COS(SINE / (WALKSPEEDVALUE / 2))) * ANGLES(RAD(0), RAD(0) - RootPart.RotVelocity.Y / 75, RAD(0)), 2 * (Humanoid.WalkSpeed / 16) / Animation_Speed) | |
809 | Neck.C1 = Clerp(Neck.C1, CF(0, -0.5, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) * ANGLES(RAD(2.5 * SIN(SINE / (WALKSPEEDVALUE / 2))), RAD(0), RAD(0) - Head.RotVelocity.Y / 30), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed) | |
810 | RightHip.C1 = Clerp(RightHip.C1, CF(0.5, 0.875 - 0.125 * SIN(SINE / WALKSPEEDVALUE) - 0.15 * COS(SINE / WALKSPEEDVALUE*2), -0.125 * COS(SINE / WALKSPEEDVALUE) +0.2+ 0.2 * COS(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0) - RightLeg.RotVelocity.Y / 75, RAD(0), RAD(76 * COS(SINE / WALKSPEEDVALUE))), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed) | |
811 | LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5, 0.875 + 0.125 * SIN(SINE / WALKSPEEDVALUE) - 0.15 * COS(SINE / WALKSPEEDVALUE*2), 0.125 * COS(SINE / WALKSPEEDVALUE) +0.2+ -0.2 * COS(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0) + LeftLeg.RotVelocity.Y / 75, RAD(0), RAD(76 * COS(SINE / WALKSPEEDVALUE))), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed) | |
812 | elseif (ANIM ~= "Walk") or (TORSOVELOCITY < 1) then | |
813 | RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
814 | Neck.C1 = Clerp(Neck.C1, CF(0, -0.5, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
815 | RightHip.C1 = Clerp(RightHip.C1, CF(0.5, 1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
816 | LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5, 1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
817 | end | |
818 | if TORSOVERTICALVELOCITY > 1 and HITFLOOR == nil then | |
819 | ANIM = "Jump" | |
820 | if ATTACK == false then | |
821 | RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
822 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-20), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
823 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(45), RAD(0), RAD(25))* RIGHTSHOULDERC0, 0.15 / Animation_Speed) | |
824 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-40), RAD(0), RAD(-20)) * LEFTSHOULDERC0, 0.2 / Animation_Speed) | |
825 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.3) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(-20)), 0.2 / Animation_Speed) | |
826 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.3) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(20)), 0.2 / Animation_Speed) | |
827 | end | |
828 | elseif TORSOVERTICALVELOCITY < -1 and HITFLOOR == nil then | |
829 | ANIM = "Fall" | |
830 | if ATTACK == false then | |
831 | RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0 ) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
832 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0 , 0 + ((1) - 1)) * ANGLES(RAD(20), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
833 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(45), RAD(0), RAD(25))* RIGHTSHOULDERC0, 0.15 / Animation_Speed) | |
834 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-60)) * LEFTSHOULDERC0, 0.2 / Animation_Speed) | |
835 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(20)), 0.2 / Animation_Speed) | |
836 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(10)), 0.2 / Animation_Speed) | |
837 | end | |
838 | elseif TORSOVELOCITY < 1 and HITFLOOR ~= nil then | |
839 | ANIM = "Idle" | |
840 | if ATTACK == false and Mode == 1 then | |
841 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(-45)), 0.15 / Animation_Speed) | |
842 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(45)), 0.15 / Animation_Speed) | |
843 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.35, 0.5 + 0.2 * COS(SINE / 12), -0.1 + 0.2) * ANGLES(RAD(220), RAD(45), RAD(-75))* RIGHTSHOULDERC0, 0.15 / Animation_Speed) | |
844 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5 + 0.2 * COS(SINE / 12), -0.1 + 0.2) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, 0.15 / Animation_Speed) | |
845 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.1 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(75), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
846 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.1 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-50), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
847 | end | |
848 | if Mode == 2 then | |
849 | ANIM = "Idle" | |
850 | RightHip.C0=Clerp(RightHip.C0,CF(1,-1 - 0.05 * math.cos(SINE / 32),0)*ANGLES(math.rad(0),math.rad(90),math.rad(0))*ANGLES(math.rad(-3),math.rad(0 - 1 * math.cos(SINE / 56)),math.rad(25 - 2 * math.cos(SINE / 32))),.1) | |
851 | LeftHip.C0=Clerp(LeftHip.C0,CF(-1,-1 - 0.05 * math.cos(SINE / 32),0)*ANGLES(math.rad(0),math.rad(-90),math.rad(0))*ANGLES(math.rad(-3),math.rad(0 - 1 * math.cos(SINE / 56)),math.rad(-25 + 2 * math.cos(SINE / 32))),.1) | |
852 | RootJoint.C0=Clerp(RootJoint.C0,ROOTC0*CF(0,-0.25 + 0.02 * math.cos(SINE / 32),-0.1 + 0.05 * math.cos(SINE / 32))*ANGLES(math.rad(25 - 2 * math.cos(SINE / 32)),math.rad(0),math.rad(0)),.1) | |
853 | Torso.Neck.C0=Clerp(Torso.Neck.C0,NECKC0*ANGLES(math.rad(25 + math.random(-1,1)),math.rad(math.random(-1,1)),math.rad(math.random(-1,1))),0.6) | |
854 | RightShoulder.C0=Clerp(RightShoulder.C0,CF(1.5,0.7 + 0.025 * math.cos(SINE / 45),-0.5)*ANGLES(math.rad(25 + 5 * math.cos(SINE / 74) + math.random(-1,1)),math.rad(1 - 3 * math.cos(SINE / 53)),math.rad(1 + 3 * math.cos(SINE / 45))),.1) | |
855 | LeftShoulder.C0=Clerp(LeftShoulder.C0,CF(-1.5,0.7 + 0.025 * math.cos(SINE / 45),-0.5)*ANGLES(math.rad(25 - 3 * math.cos(SINE / 73) + math.random(-1,1)),math.rad(2 - 1 * math.cos(SINE / 55)),math.rad(-3 - 3 * math.cos(SINE / 45))),.1) | |
856 | end | |
857 | elseif TORSOVELOCITY > 1 and HITFLOOR ~= nil then | |
858 | ANIM = "Walk" | |
859 | if ATTACK == false then | |
860 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.1) * ANGLES(RAD(5), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
861 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(5 - 8 * SIN(SINE / (WALKSPEEDVALUE / 2))), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
862 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(60 * COS(SINE / WALKSPEEDVALUE)), RAD(0), RAD(5)) * RIGHTSHOULDERC0, 0.35 / Animation_Speed) | |
863 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-60 * COS(SINE / WALKSPEEDVALUE)), RAD(0), RAD(-5)) * LEFTSHOULDERC0, 0.35 / Animation_Speed) | |
864 | RightHip.C0 = Clerp(RightHip.C0, CF(1 , -1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(-15)), 2 / Animation_Speed) | |
865 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(15)), 2 / Animation_Speed) | |
866 | end | |
867 | end | |
868 | unanchor() | |
869 | Humanoid.MaxHealth = "inf" | |
870 | Humanoid.Health = "inf" | |
871 | if Rooted == false then | |
872 | Disable_Jump = false | |
873 | Humanoid.WalkSpeed = Speed | |
874 | elseif Rooted == true then | |
875 | Disable_Jump = true | |
876 | Humanoid.WalkSpeed = 0 | |
877 | end | |
878 | end |