SHOW:
|
|
- or go back to the newest paste.
1 | - | ------------------------------------------------------------------------------------------------------------------- |
1 | + | --https://github.com/Mokiros/roblox-FE-compatibility |
2 | - | -- Compatibility Part |
2 | + | if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end |
3 | - | local CurrentUser = script:WaitForChild("Owner") local Detector = CurrentUser:WaitForChild("Detector") CurrentUser.Value = game.Players:GetPlayerFromCharacter(script.Parent) if (CurrentUser or Detector) == nil then print("Not Found Default Variables"); return end if game:GetService("RunService"):IsClient() then error("Not Found Client") end; print("FE Compatibility version LoadString: by basbas1234"); InternalData = {} do local Event = Instance.new("RemoteEvent"); Event.Name = "UserInput" local function NewFakeEvent() local Bind = Instance.new("BindableEvent") local Fake;Fake = {Connections = {}, fakeEvent=true; Connect=function(self,Func) Bind.Event:connect(Func) self.Connections[Bind] = true return setmetatable({Connected = true},{ __index = function (self,Index) if Index:lower() == "disconnect" then return function() Fake.Connections[Bind] = false;self.Connected = false end end return Fake[Index] end; __tostring = function() return "Connection" end; }) end} Fake.connect = Fake.Connect;return Fake; end local Mouse = {Target=nil,Hit=CFrame.new(),KeyUp=NewFakeEvent(),KeyDown=NewFakeEvent(),Button1Up=NewFakeEvent(),Button1Down=NewFakeEvent()} local UserInputService = {InputBegan=NewFakeEvent(),InputEnded=NewFakeEvent()} local ContextActionService = {Actions={},BindAction = function(self,actionName,Func,touch,...) self.Actions[actionName] = Func and {Name=actionName,Function=Func,Keys={...}} or nil end};ContextActionService.UnBindAction = ContextActionService.BindAction local function TriggerEvent(self,Event,...) local Trigger = Mouse[Event] if Trigger and Trigger.fakeEvent and Trigger.Connections then for Connection,Active in pairs(Trigger.Connections) do if Active then Connection:Fire(...) end end end end Mouse.TrigEvent = TriggerEvent;UserInputService.TrigEvent = TriggerEvent Event.OnServerEvent:Connect(function(FiredBy,Input) if FiredBy.Name ~= owner.Name then return end if Input.MouseEvent then Mouse.Target = Input.Target;Mouse.Hit = Input.Hit else local Begin = Input.UserInputState == Enum.UserInputState.Begin if Input.UserInputType == Enum.UserInputType.MouseButton1 then return Mouse:TrigEvent(Begin and "Button1Down" or "Button1Up") end for _,Action in pairs(ContextActionService.Actions) do for _,Key in pairs(Action.Keys) do if Key==Input.KeyCode then Action.Function(Action.Name,Input.UserInputState,Input) end end end Mouse:TrigEvent(Begin and "KeyDown" or "KeyUp",Input.KeyCode.Name:lower()) UserInputService:TrigEvent(Begin and "InputBegan" or "InputEnded",Input,false) end end) InternalData["Mouse"] = Mouse;InternalData["ContextActionService"] = ContextActionService;InternalData["UserInputService"] = UserInputService Event.Parent = Detector Detector.Disabled = false end RealGame = game;game = setmetatable({},{ __index = function (self,Index) local Sandbox = function (Thing) if Thing:IsA("Player") then local RealPlayer = Thing return setmetatable({},{ __index = function (self,Index) local Type = type(RealPlayer[Index]) if Type == "function" then if Index:lower() == "getmouse" or Index:lower() == "mouse" then return function (self)return InternalData["Mouse"] end end return function (self,...)return RealPlayer[Index](RealPlayer,...) end end return RealPlayer[Index] end; __tostring = function(self) return RealPlayer.Name end }) end end if RealGame[Index] then local Type = type(RealGame[Index]) if Type == "function" then if Index:lower() == "getservice" or Index:lower() == "service" then return function (self,Service) local FakeServices = { ["players"] = function() return setmetatable({},{ __index = function (self2,Index2) local RealService = RealGame:GetService(Service) local Type2 = type(Index2) if Type2 == "function" then return function (self,...) return RealService[Index2](RealService,...)end else if Index2:lower() == "localplayer" then return Sandbox(owner) end return RealService[Index2] end end; __tostring = function(self) return RealGame:GetService(Service).Name end }) end; ["contextactionservice"] = function() return InternalData["ContextActionService"] end; ["userinputservice"] = function() return InternalData["UserInputService"] end; ["runservice"] = function() return setmetatable({},{ __index = function(self2,Index2) local RealService = RealGame:GetService(Service) local Type2 = type(Index2) if Type2 == "function" then return function (self,...) return RealService[Index2](RealService,...) end else local RunServices = { ["bindtorenderstep"] = function() return function (self,Name,Priority,Function) return RealGame:GetService("RunService").Stepped:Connect(Function) end end; ["renderstepped"] = function() return RealService["Stepped"] end } if RunServices[Index2:lower()] then return RunServices[Index2:lower()]() end return RealService[Index2] end end }) end } if FakeServices[Service:lower()] then return FakeServices[Service:lower()]() end return RealGame:GetService(Service) end end return function (self,...) return RealGame[Index](RealGame,...) end else if game:GetService(Index) then return game:GetService(Index) end return RealGame[Index] end end return nil end });Game = game; owner = CurrentUser.Value; print("Complete! Running...") |
3 | + | local Player,game,owner = owner,game |
4 | - | ------------------------------------------------------------------------------------------------------------------- |
4 | + | local RealPlayer = Player |
5 | - | -- Script Here |
5 | + | do |
6 | print("FE Compatibility code V2 by Mokiros") | |
7 | local RealPlayer = RealPlayer | |
8 | script.Parent = RealPlayer.Character | |
9 | ||
10 | --Fake event to make stuff like Mouse.KeyDown work | |
11 | local Disconnect_Function = function(this) | |
12 | this[1].Functions[this[2]] = nil | |
13 | end | |
14 | local Disconnect_Metatable = {__index={disconnect=Disconnect_Function,Disconnect=Disconnect_Function}} | |
15 | local FakeEvent_Metatable = {__index={ | |
16 | Connect = function(this,f) | |
17 | local i = tostring(math.random(0,10000)) | |
18 | while this.Functions[i] do | |
19 | i = tostring(math.random(0,10000)) | |
20 | end | |
21 | this.Functions[i] = f | |
22 | return setmetatable({this,i},Disconnect_Metatable) | |
23 | end | |
24 | }} | |
25 | FakeEvent_Metatable.__index.connect = FakeEvent_Metatable.__index.Connect | |
26 | local function fakeEvent() | |
27 | return setmetatable({Functions={}},FakeEvent_Metatable) | |
28 | end | |
29 | ||
30 | --Creating fake input objects with fake variables | |
31 | local FakeMouse = {Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()} | |
32 | FakeMouse.keyUp = FakeMouse.KeyUp | |
33 | FakeMouse.keyDown = FakeMouse.KeyDown | |
34 | local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()} | |
35 | local CAS = {Actions={},BindAction=function(self,name,fun,touch,...) | |
36 | CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil | |
37 | end} | |
38 | --Merged 2 functions into one by checking amount of arguments | |
39 | CAS.UnbindAction = CAS.BindAction | |
40 | ||
41 | --This function will trigger the events that have been :Connect()'ed | |
42 | local function TriggerEvent(self,ev,...) | |
43 | for _,f in pairs(self[ev].Functions) do | |
44 | f(...) | |
45 | end | |
46 | end | |
47 | FakeMouse.TriggerEvent = TriggerEvent | |
48 | UIS.TriggerEvent = TriggerEvent | |
49 | ||
50 | --Client communication | |
51 | local Event = Instance.new("RemoteEvent") | |
52 | Event.Name = "UserInput_Event" | |
53 | Event.OnServerEvent:Connect(function(plr,io) | |
54 | if plr~=RealPlayer then return end | |
55 | FakeMouse.Target = io.Target | |
56 | FakeMouse.Hit = io.Hit | |
57 | if not io.isMouse then | |
58 | local b = io.UserInputState == Enum.UserInputState.Begin | |
59 | if io.UserInputType == Enum.UserInputType.MouseButton1 then | |
60 | return FakeMouse:TriggerEvent(b and "Button1Down" or "Button1Up") | |
61 | end | |
62 | if io.UserInputType == Enum.UserInputType.MouseButton2 then | |
63 | return FakeMouse:TriggerEvent(b and "Button2Down" or "Button2Up") | |
64 | end | |
65 | for _,t in pairs(CAS.Actions) do | |
66 | for _,k in pairs(t.Keys) do | |
67 | if k==io.KeyCode then | |
68 | t.Function(t.Name,io.UserInputState,io) | |
69 | end | |
70 | end | |
71 | end | |
72 | FakeMouse:TriggerEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower()) | |
73 | UIS:TriggerEvent(b and "InputBegan" or "InputEnded",io,false) | |
74 | end | |
75 | end) | |
76 | Event.Parent = NLS([==[local Event = script:WaitForChild("UserInput_Event") | |
77 | local Mouse = owner:GetMouse() | |
78 | local UIS = game:GetService("UserInputService") | |
79 | local input = function(io,RobloxHandled) | |
80 | if RobloxHandled then return end | |
81 | --Since InputObject is a client-side instance, we create and pass table instead | |
82 | Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target}) | |
83 | end | |
84 | UIS.InputBegan:Connect(input) | |
85 | UIS.InputEnded:Connect(input) | |
86 | local h,t | |
87 | --Give the server mouse data every second frame, but only if the values changed | |
88 | --If player is not moving their mouse, client won't fire events | |
89 | local HB = game:GetService("RunService").Heartbeat | |
90 | while true do | |
91 | if h~=Mouse.Hit or t~=Mouse.Target then | |
92 | h,t=Mouse.Hit,Mouse.Target | |
93 | Event:FireServer({isMouse=true,Target=t,Hit=h}) | |
94 | end | |
95 | --Wait 2 frames | |
96 | for i=1,2 do | |
97 | HB:Wait() | |
98 | end | |
99 | end]==],script) | |
100 | ||
101 | ----Sandboxed game object that allows the usage of client-side methods and services | |
102 | --Real game object | |
103 | local RealGame = game | |
104 | ||
105 | --Metatable for fake service | |
106 | local FakeService_Metatable = { | |
107 | __index = function(self,k) | |
108 | local s = rawget(self,"_RealService") | |
109 | if s then | |
110 | return typeof(s[k])=="function" | |
111 | and function(_,...)return s[k](s,...)end or s[k] | |
112 | end | |
113 | end, | |
114 | __newindex = function(self,k,v) | |
115 | local s = rawget(self,"_RealService") | |
116 | if s then s[k]=v end | |
117 | end | |
118 | } | |
119 | local function FakeService(t,RealService) | |
120 | t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService | |
121 | return setmetatable(t,FakeService_Metatable) | |
122 | end | |
123 | ||
124 | --Fake game object | |
125 | local FakeGame = { | |
126 | GetService = function(self,s) | |
127 | return rawget(self,s) or RealGame:GetService(s) | |
128 | end, | |
129 | Players = FakeService({ | |
130 | LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player) | |
131 | },"Players"), | |
132 | UserInputService = FakeService(UIS,"UserInputService"), | |
133 | ContextActionService = FakeService(CAS,"ContextActionService"), | |
134 | RunService = FakeService({ | |
135 | _btrs = {}, | |
136 | RenderStepped = RealGame:GetService("RunService").Heartbeat, | |
137 | BindToRenderStep = function(self,name,_,fun) | |
138 | self._btrs[name] = self.Heartbeat:Connect(fun) | |
139 | end, | |
140 | UnbindFromRenderStep = function(self,name) | |
141 | self._btrs[name]:Disconnect() | |
142 | end, | |
143 | },"RunService") | |
144 | } | |
145 | rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer) | |
146 | FakeGame.service = FakeGame.GetService | |
147 | FakeService(FakeGame,game) | |
148 | --Changing owner to fake player object to support owner:GetMouse() | |
149 | game,owner = FakeGame,FakeGame.Players.LocalPlayer | |
150 | end | |
151 | ||
152 | print'made by neon aka silver22352' | |
153 | local Players = game:GetService("Players") | |
154 | local Player = Players.LocalPlayer | |
155 | local Character = Player.Character | |
156 | local Head = Character["Head"] | |
157 | local Torso = Character["Torso"] | |
158 | local HumanoidRootPart = Character["HumanoidRootPart"] | |
159 | local RightArm = Character["Right Arm"] | |
160 | local LeftArm = Character["Left Arm"] | |
161 | local RightLeg = Character["Right Leg"] | |
162 | local LeftLeg = Character["Left Leg"] | |
163 | local Humanoid = Character["Humanoid"] | |
164 | local RootJoint = HumanoidRootPart["RootJoint"] | |
165 | local Neck = Torso["Neck"] | |
166 | ||
167 | local ServerStorage = game:GetService("ServerStorage") | |
168 | local Camera = game.Workspace.CurrentCamera | |
169 | local PlayerGui = Player.PlayerGui | |
170 | local Backpack = Player.Backpack | |
171 | local Mouse = Player:GetMouse() | |
172 | local Debris = game:GetService("Debris") | |
173 | ||
174 | local Create = Instance.new | |
175 | local RGBColor = Color3.fromRGB | |
176 | ||
177 | local cf = CFrame.new | |
178 | local euler = CFrame.fromEulerAnglesXYZ | |
179 | local angles = CFrame.Angles | |
180 | ||
181 | local RW,LW,RH,LH,HW | |
182 | ||
183 | local necko = CFrame.new(0, 1.5, 0) | |
184 | local RootCF = euler(-1.57,0,3.14) | |
185 | ||
186 | local Me = Player.Name | |
187 | local PlayerMode = "Normal" | |
188 | local ModeOfSans = 1 | |
189 | local animpose = "Standing" | |
190 | local Debounce_Animation = false | |
191 | local change = 3 | |
192 | local sine = 0 | |
193 | local val = 3 | |
194 | local isattack = false | |
195 | ||
196 | local Charge = {} | |
197 | local Debouce = {} | |
198 | local Held = {} | |
199 | local Keep = {} | |
200 | ||
201 | local ForceField = Instance.new("ForceField",Character) | |
202 | ForceField.Visible = false | |
203 | Humanoid.MaxHealth = math.huge | |
204 | Humanoid.Health = Humanoid.MaxHealth | |
205 | ||
206 | --//======================================\\ | |
207 | --|| Main&Function; | |
208 | --\\======================================// | |
209 | ||
210 | spawn(function() | |
211 | Character:FindFirstChild("Body Colors"):Destroy() | |
212 | Head:FindFirstChildOfClass("Decal"):Destroy() | |
213 | end) | |
214 | ||
215 | for i, v in pairs(Character:GetChildren()) do | |
216 | if v:IsA("Part") then | |
217 | v.BrickColor = BrickColor.White() | |
218 | end | |
219 | end | |
220 | ||
221 | for i, v in pairs(Backpack:GetChildren()) do | |
222 | if v:IsA("Tool") then | |
223 | v:Destroy() | |
224 | end | |
225 | end | |
226 | ||
227 | -- ReNew Accessory, Shirt, Pants | |
228 | ||
229 | for i, v in pairs(Character:GetChildren()) do | |
230 | if v:IsA("Accessory") then | |
231 | v:Destroy() | |
232 | end | |
233 | end | |
234 | ||
235 | for i, v in pairs(Character:GetChildren()) do | |
236 | if v:IsA("Shirt") then | |
237 | v:Destroy() | |
238 | end | |
239 | end | |
240 | ||
241 | for i, v in pairs(Character:GetChildren()) do | |
242 | if v:IsA("Pants") then | |
243 | v:Destroy() | |
244 | end | |
245 | end | |
246 | ||
247 | wait() | |
248 | local Shirt = Instance.new("Shirt",Character) | |
249 | Shirt.Name = "Shirt" | |
250 | ||
251 | local Pants = Instance.new("Pants",Character) | |
252 | Pants.Name = "Pants" | |
253 | ||
254 | wait() | |
255 | Shirt.ShirtTemplate = "rbxassetid://1696539845" | |
256 | Pants.PantsTemplate = "rbxassetid://1216922932" | |
257 | ||
258 | RemoveOutlines = function(part) | |
259 | part.BackSurface,part.BottomSurface,part.FrontSurface,part.LeftSurface,part.RightSurface,part.TopSurface = 10,10,10,10,10,10 | |
260 | end | |
261 | ||
262 | function CreatePart(Parent, Material, Reflectance, Transparency, Anchored, CanCollide, RGBColor3, Name, Size) | |
263 | local Part = Instance.new("Part") | |
264 | Part.Parent = Parent | |
265 | Part.Reflectance = Reflectance | |
266 | Part.Transparency = Transparency | |
267 | Part.CanCollide = CanCollide | |
268 | Part.Anchored = Anchored | |
269 | Part.Locked = true | |
270 | Part.Color = RGBColor3 | |
271 | Part.Name = Name | |
272 | Part.Size = Size | |
273 | Part.Material = Material | |
274 | RemoveOutlines(Part) | |
275 | return Part | |
276 | end | |
277 | ||
278 | function CreateMesh(Mesh, Parent, MeshType, MeshId, OffSet, Scale) | |
279 | local Msh = Instance.new(Mesh) | |
280 | Msh.Parent = Parent | |
281 | Msh.Offset = OffSet | |
282 | Msh.Scale = Scale | |
283 | if Mesh == "SpecialMesh" then | |
284 | Msh.MeshType = MeshType | |
285 | Msh.MeshId = MeshId | |
286 | end | |
287 | return Msh | |
288 | end | |
289 | ||
290 | function CreateWeld(Parent, Part0, Part1, C0, C1) | |
291 | local Weld = Instance.new("Weld") | |
292 | Weld.Parent = Parent | |
293 | Weld.Part0 = Part0 | |
294 | Weld.Part1 = Part1 | |
295 | Weld.C0 = C0 | |
296 | Weld.C1 = C1 | |
297 | return Weld | |
298 | end | |
299 | ||
300 | function CreateSound(id, par, vol, pit, loop, destroyended) | |
301 | coroutine.resume(coroutine.create(function() | |
302 | local S = Instance.new("Sound") | |
303 | S.Volume = vol | |
304 | S.Pitch = pit or 1 | |
305 | S.SoundId = "rbxassetid://" ..id | |
306 | S.Parent = par or workspace | |
307 | S.Looped = loop | |
308 | S:Play() | |
309 | if destroyended == true then | |
310 | spawn(function() | |
311 | S.Ended:connect(function() | |
312 | S:Destroy() | |
313 | end) | |
314 | end) | |
315 | end | |
316 | end)) | |
317 | end | |
318 | ||
319 | function CreateParticleEmitter(Parent, Color1, Color2, LightEmission, Size, Texture, Transparency, ZOffset, Accel, Drag, LockedToPart, VelocityInheritance, EmissionDirection, Enabled, LifeTime, Rate, Rotation, RotSpeed, Speed, VelocitySpread) | |
320 | local fp = Instance.new("ParticleEmitter") | |
321 | fp.Parent = Parent | |
322 | fp.Color = ColorSequence.new(Color1, Color2) | |
323 | fp.LightEmission = LightEmission | |
324 | fp.Size = Size | |
325 | fp.Texture = Texture | |
326 | fp.Transparency = Transparency | |
327 | fp.ZOffset = ZOffset | |
328 | fp.Acceleration = Accel | |
329 | fp.Drag = Drag | |
330 | fp.LockedToPart = LockedToPart | |
331 | fp.VelocityInheritance = VelocityInheritance | |
332 | fp.EmissionDirection = EmissionDirection | |
333 | fp.Enabled = Enabled | |
334 | fp.Lifetime = LifeTime | |
335 | fp.Rate = Rate | |
336 | fp.Rotation = Rotation | |
337 | fp.RotSpeed = RotSpeed | |
338 | fp.Speed = Speed | |
339 | fp.VelocitySpread = VelocitySpread | |
340 | return fp | |
341 | end | |
342 | ||
343 | function Hurt(hit, dmg, notdamgewith) | |
344 | if hit.Parent then | |
345 | -- Bleeding | |
346 | --[[spawn(function() | |
347 | if hit.Parent:FindFirstChildOfClass("Humanoid") and not hit.Parent:FindFirstChild("Corpse") and hit.Parent.Name ~= notdamgewith then | |
348 | local TorsoPos = hit.Parent:FindFirstChild("Torso") | |
349 | Bleeding(TorsoPos,bloodamount) | |
350 | end | |
351 | end)--]] | |
352 | -- OnDeath_Ragdoll | |
353 | --[[ spawn(function() | |
354 | if hit.Parent:FindFirstChildOfClass("Humanoid") and hit.Parent.Name ~= notdamgewith then | |
355 | local human = hit.Parent:FindFirstChildOfClass("Humanoid") | |
356 | local human2 = hit.Parent:FindFirstChild("Corpse") | |
357 | if human2 == nil then | |
358 | if human.Health == 0 then | |
359 | local child = human.Parent | |
360 | if child:FindFirstChild("Torso") then | |
361 | child:FindFirstChild("Torso").CFrame = child:FindFirstChild("Torso").CFrame * angles(math.rad(2), math.rad(0), math.rad(0)) | |
362 | local TorsoPos = hit.Parent:FindFirstChild("Torso") | |
363 | --Ragdoll(child,Torso,true) | |
364 | end | |
365 | end | |
366 | end | |
367 | end | |
368 | end)--]] | |
369 | -- Damage | |
370 | if hit.Parent.Name == "box" then hit.Parent:Destroy() end | |
371 | local hum = hit.Parent:FindFirstChildOfClass("Humanoid") | |
372 | if hum then | |
373 | if hum.Parent.Name ~= notdamgewith then | |
374 | if dmg == "Kill" or hum.Health > 100000 then | |
375 | hit.Parent:BreakJoints() | |
376 | return true | |
377 | else | |
378 | if math.random(0, 100) == 50 then | |
379 | hum.Health = hum.Health - dmg*1*2.5 | |
380 | else | |
381 | hum.Health = hum.Health -dmg*1 | |
382 | end | |
383 | return true | |
384 | end | |
385 | end | |
386 | end | |
387 | end | |
388 | end | |
389 | ||
390 | local function lerp(a,b,c) | |
391 | return a+(b-a)*c | |
392 | end | |
393 | ||
394 | local function rndRange(rng) | |
395 | return math.random(-rng*1000,rng*1000)/1000 | |
396 | end | |
397 | ||
398 | function CastRay(startPos,endPos,range,ignoreList) | |
399 | local ray = Ray.new(startPos,(endPos-startPos).unit*range) | |
400 | local part,pos,norm = workspace:FindPartOnRayWithIgnoreList(ray,ignoreList or {Character},false,true) | |
401 | return part,pos,norm,(pos and (startPos-pos).magnitude) | |
402 | end | |
403 | ||
404 | function Sticky(x, y) | |
405 | local weld = Instance.new("Weld") | |
406 | weld.Part0 = x | |
407 | weld.Part1 = y | |
408 | ||
409 | local HitPos = x.Position | |
410 | local CJ = CFrame.new(HitPos) | |
411 | local C0 = x.CFrame:inverse() *CJ | |
412 | local C1 = y.CFrame:inverse() * CJ | |
413 | ||
414 | weld.C0 = C0 | |
415 | weld.C1 = C1 | |
416 | weld.Parent = y | |
417 | end | |
418 | ||
419 | function Bleeding(Pos,Amount) | |
420 | for i = 1, Amount do | |
421 | local randsize = math.random(0.8,1.2) | |
422 | local Bleed = CreatePart(Pos,Enum.Material.Plastic,0,0,false,true,RGBColor(math.random(215,255),0,0),"Blood",Vector3.new(randsize,0.4,randsize)) | |
423 | Bleed.CFrame = Pos.CFrame | |
424 | Debris:AddItem(Bleed,math.random(5,10)) | |
425 | swait() | |
426 | end | |
427 | end | |
428 | ||
429 | function Ragdoll(Character2,CharTorso,KeepArms) | |
430 | coroutine.resume(coroutine.create(function() | |
431 | Character2:BreakJoints() | |
432 | swait() | |
433 | local hum = Character2:findFirstChild("Humanoid") | |
434 | hum:remove() | |
435 | local function Scan(ch) | |
436 | local e | |
437 | for e = 1,#ch do | |
438 | Scan(ch[e]:GetChildren()) | |
439 | if ch[e].ClassName == "Weld" or ch[e].ClassName == "Motor6D" then | |
440 | ch[e]:remove() | |
441 | end | |
442 | end | |
443 | end | |
444 | local NEWHUM = Instance.new("Humanoid") | |
445 | NEWHUM.Name = "Corpse" | |
446 | NEWHUM.Health = 0 | |
447 | NEWHUM.MaxHealth = 0 | |
448 | NEWHUM.PlatformStand = true | |
449 | NEWHUM.Parent = Character2 | |
450 | NEWHUM.DisplayDistanceType = "Viewer" | |
451 | ||
452 | local ch = Character2:GetChildren() | |
453 | local i | |
454 | for i = 1,#ch do | |
455 | if ch[i].Name == "THandle1" or ch[i].Name == "THandle2" then | |
456 | ch[i]:remove() | |
457 | end | |
458 | end | |
459 | ||
460 | local Torso2 = Character2.Torso | |
461 | local movevector = Vector3.new() | |
462 | ||
463 | if Torso2 then | |
464 | movevector = CFrame.new(CharTorso.Position,Torso2.Position).lookVector | |
465 | local Head = Character2:FindFirstChild("Head") | |
466 | local Face = Head:FindFirstChildOfClass("Decal") | |
467 | Face.Texture = "rbxassetid://26619042" | |
468 | if Head then | |
469 | local Neck = Instance.new("Weld") | |
470 | Neck.Name = "Neck" | |
471 | Neck.Part0 = Torso2 | |
472 | Neck.Part1 = Head | |
473 | Neck.C0 = CFrame.new(0, 1.5, 0) | |
474 | Neck.C1 = CFrame.new() | |
475 | Neck.Parent = Torso2 | |
476 | ||
477 | end | |
478 | local Limb = Character2:FindFirstChild("Right Arm") | |
479 | if Limb and KeepArms == true then | |
480 | ||
481 | Limb.CFrame = Torso2.CFrame * CFrame.new(1.5, 0, 0) | |
482 | local Joint = Instance.new("Glue") | |
483 | Joint.Name = "RightShoulder" | |
484 | Joint.Part0 = Torso2 | |
485 | Joint.Part1 = Limb | |
486 | Joint.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
487 | Joint.C1 = CFrame.new(-0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
488 | Joint.Parent = Torso2 | |
489 | ||
490 | local B = Instance.new("Part") | |
491 | B.TopSurface = 0 | |
492 | B.BottomSurface = 0 | |
493 | B.formFactor = "Symmetric" | |
494 | B.Size = Vector3.new(1, 1, 1) | |
495 | B.Transparency = 1 | |
496 | B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0) | |
497 | B.Parent = Character2 | |
498 | local W = Instance.new("Weld") | |
499 | W.Part0 = Limb | |
500 | W.Part1 = B | |
501 | W.C0 = CFrame.new(0, -0.5, 0) | |
502 | W.Parent = Limb | |
503 | ||
504 | end | |
505 | local Limb = Character2:FindFirstChild("Left Arm") | |
506 | if Limb and KeepArms == true then | |
507 | ||
508 | Limb.CFrame = Torso2.CFrame * CFrame.new(-1.5, 0, 0) | |
509 | local Joint = Instance.new("Glue") | |
510 | Joint.Name = "LeftShoulder" | |
511 | Joint.Part0 = Torso2 | |
512 | Joint.Part1 = Limb | |
513 | Joint.C0 = CFrame.new(-1.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) | |
514 | Joint.C1 = CFrame.new(0, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) | |
515 | Joint.Parent = Torso2 | |
516 | ||
517 | local B = Instance.new("Part") | |
518 | B.TopSurface = 0 | |
519 | B.BottomSurface = 0 | |
520 | B.formFactor = "Symmetric" | |
521 | B.Size = Vector3.new(1, 1, 1) | |
522 | B.Transparency = 1 | |
523 | B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0) | |
524 | B.Parent = Character2 | |
525 | local W = Instance.new("Weld") | |
526 | W.Part0 = Limb | |
527 | W.Part1 = B | |
528 | W.C0 = CFrame.new(0, -0.5, 0) | |
529 | W.Parent = Limb | |
530 | ||
531 | end | |
532 | local Limb = Character2:FindFirstChild("Right Leg") | |
533 | if Limb then | |
534 | ||
535 | Limb.CFrame = Torso2.CFrame * CFrame.new(0.5, -2, 0) | |
536 | local Joint = Instance.new("Glue") | |
537 | Joint.Name = "RightHip" | |
538 | Joint.Part0 = Torso2 | |
539 | Joint.Part1 = Limb | |
540 | Joint.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
541 | Joint.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
542 | Joint.Parent = Torso2 | |
543 | ||
544 | local B = Instance.new("Part") | |
545 | B.TopSurface = 0 | |
546 | B.BottomSurface = 0 | |
547 | B.formFactor = "Symmetric" | |
548 | B.Size = Vector3.new(1, 1, 1) | |
549 | B.Transparency = 1 | |
550 | B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0) | |
551 | B.Parent = Character2 | |
552 | local W = Instance.new("Weld") | |
553 | W.Part0 = Limb | |
554 | W.Part1 = B | |
555 | W.C0 = CFrame.new(0, -0.5, 0) | |
556 | W.Parent = Limb | |
557 | ||
558 | end | |
559 | local Limb = Character2:FindFirstChild("Left Leg") | |
560 | if Limb then | |
561 | ||
562 | Limb.CFrame = Torso2.CFrame * CFrame.new(-0.5, -2, 0) | |
563 | local Joint = Instance.new("Glue") | |
564 | Joint.Name = "LeftHip" | |
565 | Joint.Part0 = Torso2 | |
566 | Joint.Part1 = Limb | |
567 | Joint.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) | |
568 | Joint.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) | |
569 | Joint.Parent = Torso2 | |
570 | ||
571 | local B = Instance.new("Part") | |
572 | B.TopSurface = 0 | |
573 | B.BottomSurface = 0 | |
574 | B.formFactor = "Symmetric" | |
575 | B.Size = Vector3.new(1, 1, 1) | |
576 | B.Transparency = 1 | |
577 | B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0) | |
578 | B.Parent = Character2 | |
579 | local W = Instance.new("Weld") | |
580 | W.Part0 = Limb | |
581 | W.Part1 = B | |
582 | W.C0 = CFrame.new(0, -0.5, 0) | |
583 | W.Parent = Limb | |
584 | ||
585 | end | |
586 | --[ | |
587 | local Bar = Instance.new("Part") | |
588 | Bar.TopSurface = 0 | |
589 | Bar.BottomSurface = 0 | |
590 | Bar.formFactor = "Symmetric" | |
591 | Bar.Size = Vector3.new(1, 1, 1) | |
592 | Bar.Transparency = 1 | |
593 | Bar.CFrame = Torso2.CFrame * CFrame.new(0, 0.5, 0) | |
594 | Bar.Parent = Character2 | |
595 | local Weld = Instance.new("Weld") | |
596 | Weld.Part0 = Torso2 | |
597 | Weld.Part1 = Bar | |
598 | Weld.C0 = CFrame.new(0, 0.5, 0) | |
599 | Weld.Parent = Torso2 | |
600 | --]] | |
601 | end | |
602 | Character2.Parent = workspace | |
603 | ||
604 | Debris:AddItem(Character2,9) | |
605 | return Character2,Torso2 | |
606 | end)) | |
607 | end | |
608 | ||
609 | local walkspeed = nil | |
610 | local jumppower = nil | |
611 | ||
612 | local GetValueWS_JP = function(hum) | |
613 | local GotValueWS = hum.WalkSpeed | |
614 | local GotValueJP = hum.JumpPower | |
615 | walkspeed = GotValueWS | |
616 | jumppower = GotValueJP | |
617 | end | |
618 | ||
619 | local StoreWS_JP = function(hum) | |
620 | hum.WalkSpeed = 0 | |
621 | hum.JumpPower = 0 | |
622 | end | |
623 | ||
624 | local ReleaseWS_JP = function(hum) | |
625 | hum.WalkSpeed = walkspeed | |
626 | hum.JumpPower = jumppower | |
627 | end | |
628 | ||
629 | local KeyAndAnimation = function(yes_or_no) | |
630 | isattack = yes_or_no | |
631 | Debounce_Animation = yes_or_no | |
632 | end | |
633 | ||
634 | function ThrowObj(parent,direction,speedthrown) | |
635 | local bv = Instance.new("BodyVelocity",parent) | |
636 | bv.MaxForce = Vector3.new(math.huge,math.huge,math.huge) | |
637 | bv.Velocity = direction.CFrame.lookVector * speedthrown | |
638 | bv.P = 1 | |
639 | coroutine.resume(coroutine.create(function() | |
640 | wait() | |
641 | bv:Destroy() | |
642 | end)) | |
643 | end | |
644 | ||
645 | local ThemeMusic = Instance.new("Sound",Head) | |
646 | ThemeMusic.Name = "Theme Sans AU" | |
647 | ThemeMusic.SoundId = "rbxassetid://348208939" | |
648 | ThemeMusic.Volume = 1 | |
649 | ThemeMusic.Looped = true | |
650 | ThemeMusic.PlaybackSpeed = 0.675 | |
651 | ThemeMusic:Play() | |
652 | ||
653 | -- Magical Eye | |
654 | local EyeMagicModel = Character:FindFirstChild("EyeMagicModel") or Instance.new("Model",Character) | |
655 | EyeMagicModel.Name = "EyeMagicModel" | |
656 | local MagicEye = CreatePart(EyeMagicModel, Enum.Material.Neon, 0, 0, false, false, RGBColor(4, 175, 236), "Effect", Vector3.new(0.1275, 0.1275, 0.1275)) | |
657 | local WeldMagicEye = CreateWeld(MagicEye, MagicEye, Head, cf(0.175, -0.125, 0.575)*angles(0, 0, 0), cf(0, 0, 0)*angles(0, 0, 0)) | |
658 | local MeshMagicEye = CreateMesh("SpecialMesh", MagicEye, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(1, 1, 1)) | |
659 | ||
660 | local MagicEye2 = CreatePart(EyeMagicModel, Enum.Material.Neon, 0, 0, false, false, RGBColor(0, 0, 0), "Effect", Vector3.new(0.25, 0.25, 0.25)) | |
661 | local WeldMagicEye2 = CreateWeld(MagicEye2, MagicEye2, Head, cf(-0.175, -0.125, 0.5)*angles(0, 0, 0), cf(0, 0, 0)*angles(0, 0, 0)) | |
662 | local MeshMagicEye2 = CreateMesh("SpecialMesh", MagicEye2, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(1, 1, 1)) | |
663 | ||
664 | local MagicEye3 = CreatePart(EyeMagicModel, Enum.Material.Neon, 0, 0, false, false, RGBColor(255, 255, 255), "Effect", Vector3.new(0.1275, 0.1275, 0.1275)) | |
665 | local WeldMagicEye3 = CreateWeld(MagicEye3, MagicEye3, Head, cf(-0.175, -0.125, 0.575)*angles(0, 0, 0), cf(0, 0, 0)*angles(0, 0, 0)) | |
666 | local MeshMagicEye3 = CreateMesh("SpecialMesh", MagicEye3, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(1, 1, 1)) | |
667 | ||
668 | local MagicEye4 = CreatePart(EyeMagicModel, Enum.Material.Neon, 0, 0, false, false, RGBColor(0, 0, 0), "Effect", Vector3.new(0.25, 0.25, 0.25)) | |
669 | local WeldMagicEye4 = CreateWeld(MagicEye4, MagicEye4, Head, cf(0.175, -0.125, 0.5)*angles(0, 0, 0), cf(0, 0, 0)*angles(0, 0, 0)) | |
670 | local MeshMagicEye4 = CreateMesh("SpecialMesh", MagicEye4, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(1, 1, 1)) | |
671 | ||
672 | local Equip = { | |
673 | ['BrushInkSans'] = nil | |
674 | } | |
675 | ||
676 | local Active = { | |
677 | ["KnifeKillerSans"] = false, | |
678 | ["BrushInkSans"] = false | |
679 | } | |
680 | ||
681 | local GetItems = {} | |
682 | ||
683 | function ClearItemsAll() | |
684 | coroutine.resume(coroutine.create(function() | |
685 | for i = 1, #GetItems do | |
686 | GetItems[i]:Destroy() | |
687 | end | |
688 | end)) | |
689 | end | |
690 | ||
691 | function ChangeEyes(c1,c2,c3,c4 ,ma1,ma2,ma3,ma4) | |
692 | MagicEye.Color = c1 | |
693 | MagicEye2.Color = c2 | |
694 | MagicEye3.Color = c3 | |
695 | MagicEye4.Color = c4 | |
696 | MagicEye.Material = ma1 | |
697 | MagicEye2.Material = ma2 | |
698 | MagicEye3.Material = ma3 | |
699 | MagicEye4.Material = ma4 | |
700 | end | |
701 | ||
702 | local AnimationKnife_KillerSans = nil | |
703 | local Knife_KillerSans = nil | |
704 | local BrushTrail = nil | |
705 | ||
706 | function FindNearestTorso(Position, Distance, SinglePlayer) | |
707 | if SinglePlayer then | |
708 | return (SinglePlayer.Torso.CFrame.p - Position).magnitude < Distance | |
709 | end | |
710 | local List = {} | |
711 | for i, v in pairs(workspace:GetChildren()) do | |
712 | if v:IsA("Model") then | |
713 | if v:findFirstChild("Torso") then | |
714 | if v ~= Character then | |
715 | if (v.Torso.Position - Position).magnitude <= Distance then | |
716 | table.insert(List, v) | |
717 | end | |
718 | end | |
719 | end | |
720 | if v:FindFirstChildOfClass("Model") then | |
721 | v = v:FindFirstChildOfClass("Model") | |
722 | if v:findFirstChild("Torso") then | |
723 | if v ~= Character then | |
724 | if (v.Torso.Position - Position).magnitude <= Distance then | |
725 | table.insert(List, v) | |
726 | end | |
727 | end | |
728 | end | |
729 | end | |
730 | end | |
731 | end | |
732 | return List | |
733 | end | |
734 | ||
735 | local Transform = { | |
736 | ["Sans_UT"] = function() | |
737 | ModeOfSans = 1 | |
738 | ClearItemsAll() | |
739 | --Music Theme | |
740 | ThemeMusic.SoundId = "rbxassetid://348208939" | |
741 | ThemeMusic.PlaybackSpeed = 0.675 | |
742 | --Shirt & Pants | |
743 | Shirt.ShirtTemplate = "rbxassetid://1696539845" | |
744 | Pants.PantsTemplate = "rbxassetid://1216922932" | |
745 | --EyeMagic | |
746 | ChangeEyes(RGBColor(4, 175, 236),RGBColor(0, 0, 0),RGBColor(255, 255, 255),RGBColor(0, 0, 0) ,Enum.Material.Neon,Enum.Material.Neon,Enum.Material.Neon,Enum.Material.Neon) | |
747 | workspace:FindFirstChild("Knife's Killer Sans"):Destroy() | |
748 | workspace:FindFirstChild("Brush's Ink Sans"):Destroy() | |
749 | end; | |
750 | ||
751 | ["Killer_Sans"] = function() | |
752 | ModeOfSans = 2 | |
753 | --Music Theme | |
754 | ThemeMusic.PlaybackSpeed = 1 | |
755 | ThemeMusic.SoundId = "rbxassetid://1007722135" | |
756 | --Shirt & Pants | |
757 | Shirt.ShirtTemplate = "rbxassetid://440613737" | |
758 | Pants.PantsTemplate = "rbxassetid://205029080" | |
759 | --EyeMagic | |
760 | ChangeEyes(RGBColor(10, 10, 10),RGBColor(0, 0, 0),RGBColor(255, 255, 255),RGBColor(0, 0, 0) ,Enum.Material.Neon,Enum.Material.Neon,Enum.Material.Neon,Enum.Material.Neon) | |
761 | --Special Item | |
762 | local Knife = workspace:FindFirstChild("Knife's Killer Sans") | |
763 | if Knife == nil then | |
764 | ClearItemsAll() | |
765 | Knife = Instance.new("Model",workspace) | |
766 | else | |
767 | return | |
768 | end | |
769 | Knife.Name = "Knife's Killer Sans" | |
770 | local KnifeKillerSans = CreatePart(Knife, Enum.Material.Plastic, 0, 0, false, false, RGBColor(0, 0, 0), "Knife", Vector3.new(.4, 3, .7)) | |
771 | KnifeKillerSans.Touched:connect(function(Hit) | |
772 | if Active["KnifeKillerSans"] == true then | |
773 | Hurt(Hit, math.random(15, 50), Me) | |
774 | end | |
775 | end) | |
776 | local MeshKnifeKiller = CreateMesh("SpecialMesh", KnifeKillerSans, "FileMesh", "rbxassetid://121944778", Vector3.new(0, 0, 0), Vector3.new(1, 1, 1)) | |
777 | MeshKnifeKiller.TextureId = "http://www.roblox.com/asset/?id=144012208" | |
778 | local WeldKnife = CreateWeld(KnifeKillerSans, KnifeKillerSans, RightArm, cf(0, -1.25, -0.75)*angles(math.rad(90), 0, math.rad(180)), cf(0, 0, 0)*angles(0, 0, 0)) | |
779 | AnimationKnife_KillerSans = WeldKnife | |
780 | Knife_KillerSans = KnifeKillerSans | |
781 | ||
782 | local RedCircle = Instance.new("Model",Character) | |
783 | RedCircle.Name = "RedCircle" | |
784 | local circle = CreatePart(RedCircle,Enum.Material.Neon,0,0,false,false,RGBColor(255,0,0),"Circle",Vector3.new(0.5,0.125,0.5)) | |
785 | local weldredcircle = CreateWeld(circle,circle,Torso,cf(0,-0.475,0)*angles(math.rad(90),0,0),cf(0,0,0)*angles(0,0,0)) | |
786 | local meshcircle = CreateMesh("CylinderMesh",circle,"","",Vector3.new(0,0,0),Vector3.new(1,1,1)) | |
787 | local hollowcircle = CreatePart(circle,Enum.Material.Neon,0,0,false,false,RGBColor(255,0,0),"Circle",Vector3.new(0.75,0.75,0.125)) | |
788 | local weldhollowcircle = CreateWeld(hollowcircle,hollowcircle,Torso,cf(0,0,0.475)*angles(0,0,0),cf(0,0,0)*angles(0,0,0)) | |
789 | local meshhollowcircle = CreateMesh("SpecialMesh",hollowcircle,"FileMesh","rbxassetid://3270017",Vector3.new(0,0,0),Vector3.new(0.75,0.75,0.75)) | |
790 | ||
791 | local Tear = Instance.new("Model",Character) | |
792 | Tear.Name = "BloodTear" | |
793 | local BloodOnEye = CreatePart(Tear,Enum.Material.Concrete,0,0,false,false,RGBColor(15,15,15),"Blood",Vector3.new(0.05,0.5,0.05)) | |
794 | local WeldBloodOnEye = CreateWeld(BloodOnEye,BloodOnEye,Head,cf(0.15,0.125,0.6)*angles(0,0,0),cf(0,0,0)*angles(0,0,0)) | |
795 | local BloodOnEye2 = CreatePart(Tear,Enum.Material.Concrete,0,0,false,false,RGBColor(15,15,15),"Blood",Vector3.new(0.05,0.35,0.05)) | |
796 | local WeldBloodOnEye2 = CreateWeld(BloodOnEye2,BloodOnEye2,Head,cf(0.225,0.105,0.6)*angles(0,0,0),cf(0,0,0)*angles(0,0,0)) | |
797 | ||
798 | table.insert(GetItems, Knife) | |
799 | table.insert(GetItems, RedCircle) | |
800 | table.insert(GetItems, Tear) | |
801 | end; | |
802 | ||
803 | ["Ink_Sans"] = function() | |
804 | ModeOfSans = 3 | |
805 | --Music Theme | |
806 | ThemeMusic.PlaybackSpeed = 1 | |
807 | ThemeMusic.SoundId = "rbxassetid://928385983" | |
808 | --Shirt & Pants | |
809 | Shirt.ShirtTemplate = "rbxassetid://525744362" | |
810 | Pants.PantsTemplate = "rbxassetid://525743888" | |
811 | --EyeMagic | |
812 | ChangeEyes(RGBColor(4, 175, 236),RGBColor(0, 0, 0),RGBColor(245, 205, 48),RGBColor(0, 0, 0) ,Enum.Material.Neon,Enum.Material.Neon,Enum.Material.Neon,Enum.Material.Neon) | |
813 | --Special Item | |
814 | local Brush = workspace:FindFirstChild("Brush's Ink Sans") | |
815 | if Brush == nil then | |
816 | ClearItemsAll() | |
817 | Brush = Instance.new("Model",workspace) | |
818 | else | |
819 | return | |
820 | end | |
821 | Brush.Name = "Brush's Ink Sans" | |
822 | local Handle = CreatePart(Brush, Enum.Material.Plastic, 0, 0, false, false, RGBColor(105, 64, 40), "Handle", Vector3.new(1, 10, 1)) | |
823 | local MakeHolding = CreateWeld(Handle,Handle,Torso,cf(0, -2, -0.75)*angles(math.rad(0), 0, math.rad(30)), cf(0, 0, 0)*angles(0, 0, 0)) | |
824 | local MeshCy = CreateMesh("CylinderMesh", Handle, "", "", Vector3.new(0,0,0), Vector3.new(0.75,1,0.75)) | |
825 | ||
826 | local P1 = CreatePart(Brush, Enum.Material.Plastic, 0, 0, false, false, RGBColor(255, 255, 255), "Part", Vector3.new(1.1, 1.5, 1.1)) | |
827 | local MakeP1Holding = CreateWeld(P1,P1,Handle,cf(0, 3, 0)*angles(0,0,0), cf(0, 0, 0)*angles(0, 0, 0)) | |
828 | local MeshP1Cy = CreateMesh("CylinderMesh", P1, "", "", Vector3.new(0,0,0), Vector3.new(1,1,1)) | |
829 | ||
830 | local P2 = CreatePart(Brush, Enum.Material.Plastic, 0, 0, false, false, RGBColor(255, 255, 255), "Part", Vector3.new(1.1, 1.5, 1.1)) | |
831 | local MakeP2Holding = CreateWeld(P2,P2,Handle,cf(0, -2, 0)*angles(0,0,0), cf(0, 0, 0)*angles(0, 0, 0)) | |
832 | local MeshP2Cy = CreateMesh("CylinderMesh", P2, "", "", Vector3.new(0,0,0), Vector3.new(1,1,1)) | |
833 | ||
834 | local P3 = CreatePart(Brush, Enum.Material.Plastic, 0, 0, false, false, RGBColor(124, 92, 70), "Part", Vector3.new(1.5, 1.75, 1.5)) | |
835 | local MakeP3Holding = CreateWeld(P3,P3,Handle,cf(0, -3, 0)*angles(0,0,0), cf(0, 0, 0)*angles(0, 0, 0)) | |
836 | local MeshP3Cy = CreateMesh("SpecialMesh", P3, "FileMesh", "rbxassetid://1185246", Vector3.new(0,0,0), Vector3.new(3, 3, 3)) | |
837 | ||
838 | local P4 = CreatePart(Brush, Enum.Material.Plastic, 0, 0, false, false, RGBColor(105, 64, 40), "Part", Vector3.new(1.5, 1.75, 1.5)) | |
839 | local MakeP4Holding = CreateWeld(P4,P4,Handle,cf(0, -4.5, 0)*angles(0,0,0), cf(0, 0, 0)*angles(0, 0, 0)) | |
840 | local MeshP4Cy = CreateMesh("SpecialMesh", P4, "FileMesh", "rbxassetid://1033714", Vector3.new(0,0,0), Vector3.new(1.097, 3.5, 1.097)) | |
841 | ||
842 | local P5 = CreatePart(Brush, Enum.Material.Plastic, 0, 0, false, false, RGBColor(0, 0, 0), "Part", Vector3.new(0.5, 0.75, 0.5)) | |
843 | local MakeP5Holding = CreateWeld(P5,P5,Handle,cf(0, -5.5, 0)*angles(0,0,0), cf(0, 0, 0)*angles(0, 0, 0)) | |
844 | local MeshP5Cy = CreateMesh("SpecialMesh", P5, "FileMesh", "rbxassetid://1033714", Vector3.new(0,0,0), Vector3.new(0.4, 1.175, 0.4)) | |
845 | ||
846 | Equip.BrushInkSans = MakeHolding | |
847 | ||
848 | local PosAtt1 = CreatePart(Brush, Enum.Material.Plastic, 0, 1, false, false, RGBColor(0, 0, 0), "PosTrail1", Vector3.new(0.05, 0.05, 0.05)) | |
849 | local MakeA1Holding = CreateWeld(PosAtt1,PosAtt1,Handle,cf(0, -5.1, 0)*angles(0,0,0), cf(0, 0, 0)*angles(0, 0, 0)) | |
850 | local PosAtt2 = CreatePart(Brush, Enum.Material.Plastic, 0, 1, false, false, RGBColor(0, 0, 0), "PosTrail2", Vector3.new(0.05, 0.05, 0.05)) | |
851 | local MakeA2Holding = CreateWeld(PosAtt2,PosAtt2,Handle,cf(0, -5.9, 0)*angles(0,0,0), cf(0, 0, 0)*angles(0, 0, 0)) | |
852 | ||
853 | local A0 = Instance.new('Attachment',PosAtt1) | |
854 | local A1 = Instance.new('Attachment',PosAtt2) | |
855 | ||
856 | local tl1 = Instance.new('Trail',P5) | |
857 | tl1.Attachment0 = A0 | |
858 | tl1.Attachment1 = A1 | |
859 | --tl1.Texture = "http://www.roblox.com/asset/?id=1049219073" | |
860 | tl1.LightEmission = 0.5 | |
861 | tl1.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0, 0),NumberSequenceKeypoint.new(1, 1)}) | |
862 | tl1.Color = ColorSequence.new(BrickColor.new('Really black').Color) | |
863 | tl1.Lifetime = 0.6 | |
864 | ||
865 | P4.Touched:connect(function(Hit) | |
866 | if Active["BrushInkSans"] == true then | |
867 | Hurt(Hit, math.random(15, 50), Me) | |
868 | end | |
869 | end) | |
870 | BrushTrail = tl1 | |
871 | ||
872 | table.insert(GetItems, Brush) | |
873 | end; | |
874 | ||
875 | ["Error_Sans"] = function() | |
876 | ModeOfSans = 4 | |
877 | --Music Theme | |
878 | ThemeMusic.PlaybackSpeed = 1 | |
879 | ThemeMusic.SoundId = "rbxassetid://576474523" | |
880 | --Shirt & Pants | |
881 | Shirt.ShirtTemplate = "rbxassetid://2096464105" | |
882 | Pants.PantsTemplate = "rbxassetid://2039333738" | |
883 | --EyeMagic | |
884 | ChangeEyes(RGBColor(245, 245, 0),RGBColor(85, 0, 0),RGBColor(255, 255, 255),RGBColor(85, 0, 0) ,Enum.Material.Neon,Enum.Material.Neon,Enum.Material.Neon,Enum.Material.Neon) | |
885 | ClearItemsAll() | |
886 | end; | |
887 | ||
888 | ["Banish_Sans"] = function() | |
889 | ModeOfSans = 5 | |
890 | --Music Theme | |
891 | ThemeMusic.PlaybackSpeed = 1 | |
892 | ThemeMusic.SoundId = "rbxassetid://2918459867" | |
893 | --Shirt & Pants | |
894 | Shirt.ShirtTemplate = "rbxassetid://1137506582" | |
895 | Pants.PantsTemplate = "rbxassetid://1277772125" | |
896 | --EyeMagic | |
897 | ChangeEyes(RGBColor(100, 100, 100),RGBColor(0, 0, 0),RGBColor(100, 100, 100),RGBColor(0, 0, 0) ,Enum.Material.Neon,Enum.Material.Neon,Enum.Material.Neon,Enum.Material.Neon) | |
898 | ClearItemsAll() | |
899 | local HoodModel = Instance.new("Model", Character) | |
900 | HoodModel.Name = "Hood" | |
901 | local HoodPart = CreatePart(HoodModel, Enum.Material.Plastic, 0, 0, false, false, RGBColor(100, 100, 100), "Hood", Vector3.new(1, 1, 1)) | |
902 | local HoodWeld = CreateWeld(HoodPart,HoodPart,Head,cf(0, 0, 0.0)*angles(math.rad(0), 0, math.rad(0)), cf(0, 0, 0)*angles(0, 0, 0)) | |
903 | local HoodMesh = CreateMesh("SpecialMesh", HoodPart, "FileMesh", "rbxassetid://76062497", Vector3.new(0,0,0), Vector3.new(1.1, 1, 1.1)) | |
904 | local FadeFace = Instance.new("Model", Character) | |
905 | FadeFace.Name = "FaceFading" | |
906 | for i = 0, 1, 0.1 do | |
907 | local PF = CreatePart(FadeFace, Enum.Material.Plastic, 0, i, false, false, RGBColor(0, 0, 0), "Hood", Vector3.new(0.1, 1.225, 1.225)) | |
908 | PF.Shape = Enum.PartType.Cylinder | |
909 | local PFWeld = CreateWeld(PF,PF,Head,cf(0.35-i, 0, 0)*angles(math.rad(0), 0, math.rad(90)), cf(0, 0, 0)*angles(0, 0, 0)) | |
910 | end | |
911 | ||
912 | table.insert(GetItems, FadeFace) | |
913 | table.insert(GetItems, HoodModel) | |
914 | end; | |
915 | ||
916 | ["Digi_Sans"] = function() | |
917 | ModeOfSans = 6 | |
918 | --Music Theme | |
919 | ThemeMusic.PlaybackSpeed = 1 | |
920 | ThemeMusic.SoundId = "rbxassetid://2174461898" | |
921 | end; | |
922 | ||
923 | ["Timekid_Sans"] = function() | |
924 | ModeOfSans = 7 | |
925 | --Music Theme | |
926 | ThemeMusic.PlaybackSpeed = 1 | |
927 | ThemeMusic.SoundId = "rbxassetid://360042276" | |
928 | end; | |
929 | } | |
930 | ||
931 | local OriPos = nil | |
932 | ||
933 | local StanceAction = { | |
934 | Bone = function() | |
935 | local n = math.random(5,10) | |
936 | local BoneModel = Instance.new("Model",workspace) | |
937 | BoneModel.Name = "Bone" | |
938 | local Part1 = CreatePart(BoneModel,Enum.Material.Plastic,0,0,false,true,RGBColor(255,255,255),"Part",Vector3.new(1,1,1)) | |
939 | Part1.Shape = Enum.PartType.Ball | |
940 | local Part2 = CreatePart(BoneModel,Enum.Material.Plastic,0,0,false,true,RGBColor(255,255,255),"Part",Vector3.new(1,1,1)) | |
941 | Part2.Shape = Enum.PartType.Ball | |
942 | local Part3 = CreatePart(BoneModel,Enum.Material.Plastic,0,0,false,true,RGBColor(255,255,255),"Part",Vector3.new(1,1,1)) | |
943 | Part3.Shape = Enum.PartType.Ball | |
944 | local Part4 = CreatePart(BoneModel,Enum.Material.Plastic,0,0,false,true,RGBColor(255,255,255),"Part",Vector3.new(1,1,1)) | |
945 | Part4.Shape = Enum.PartType.Ball | |
946 | local Part5 = CreatePart(BoneModel,Enum.Material.Plastic,0,0,false,true,RGBColor(255,255,255),"Part",Vector3.new(n,0.8,0.8)) | |
947 | Part5.Shape = Enum.PartType.Cylinder | |
948 | ||
949 | local Weld1 = CreateWeld(Part1, Part1, Part5, cf(n/2, 0, 0.35)*angles(0, 0, 0), cf(0, 0, 0)*angles(0, 0, 0)) | |
950 | local Weld2 = CreateWeld(Part2, Part2, Part5, cf(-n/2, 0, 0.35)*angles(0, 0, 0), cf(0, 0, 0)*angles(0, 0, 0)) | |
951 | local Weld3 = CreateWeld(Part3, Part3, Part5, cf(n/2, 0, -0.35)*angles(0, 0, 0), cf(0, 0, 0)*angles(0, 0, 0)) | |
952 | local Weld4 = CreateWeld(Part4, Part4, Part5, cf(-n/2, 0, -0.35)*angles(0, 0, 0), cf(0, 0, 0)*angles(0, 0, 0)) | |
953 | ||
954 | Part5.CFrame = Mouse.Hit + Vector3.new(0,math.random(1,7),0) | |
955 | Part5.CFrame = Part5.CFrame * angles(math.random(-180,180),math.random(-180,180),math.random(-180,180)) | |
956 | ||
957 | local BodyVel = Instance.new('BodyVelocity',Part5) | |
958 | BodyVel.maxForce = Vector3.new(math.huge,math.huge,math.huge) | |
959 | BodyVel.Velocity = Vector3.new(0,0.1962,0) | |
960 | BodyVel.P = 1 | |
961 | local BodyGyro = Instance.new('BodyGyro',Part5) | |
962 | BodyGyro.maxTorque = Vector3.new(math.huge,math.huge,math.huge) | |
963 | BodyGyro.P = 2e4 | |
964 | ||
965 | Part1.Touched:connect(function(Hit) | |
966 | Hurt(Hit, math.random(1,25), Me) | |
967 | end) | |
968 | Part2.Touched:connect(function(Hit) | |
969 | Hurt(Hit, math.random(1,25), Me) | |
970 | end) | |
971 | Part3.Touched:connect(function(Hit) | |
972 | Hurt(Hit, math.random(1,25), Me) | |
973 | end) | |
974 | Part4.Touched:connect(function(Hit) | |
975 | Hurt(Hit, math.random(1,25), Me) | |
976 | end) | |
977 | Part5.Touched:connect(function(Hit) | |
978 | Hurt(Hit, math.random(1,25), Me) | |
979 | end) | |
980 | ||
981 | local SoundPing = CreateSound(138222365,Part5,5,1.5,false,true) | |
982 | ||
983 | Mouse.KeyUp:connect(function(Key) | |
984 | if ModeOfSans == 1 then | |
985 | if Key == "r" then | |
986 | Held[Key] = nil | |
987 | BodyVel.Velocity = Vector3.new(0,0.1962,0) | |
988 | end | |
989 | end | |
990 | end) | |
991 | ||
992 | Mouse.KeyDown:connect(function(Key) | |
993 | if ModeOfSans == 1 then | |
994 | if Key == "r" then | |
995 | Held[Key] = true | |
996 | while Held[Key] == true do | |
997 | if Held[Key] == nil then | |
998 | return | |
999 | end | |
1000 | BodyGyro.CFrame = CFrame.new(Part5.Position,Mouse.Hit.p) | |
1001 | BodyVel.Velocity = Part5.CFrame.lookVector*300 | |
1002 | swait() | |
1003 | end | |
1004 | end | |
1005 | end | |
1006 | end) | |
1007 | table.insert(GetItems, BoneModel) | |
1008 | end; | |
1009 | ||
1010 | GasterBlaster = function() | |
1011 | local aimPos = Mouse.Hit.p | |
1012 | local blasterhead = Instance.new("Part",Character) | |
1013 | blasterhead.Size = Vector3.new(6,6,6) | |
1014 | blasterhead.CanCollide = false | |
1015 | blasterhead.Anchored = true | |
1016 | blasterhead.Transparency = 1 | |
1017 | local mesh=Instance.new("SpecialMesh",blasterhead)mesh.MeshType="FileMesh"mesh.MeshId="rbxassetid://431908407" | |
1018 | mesh.Scale=Vector3.new(.075,.0725,.075) | |
1019 | local decal = Instance.new("Decal",blasterhead) | |
1020 | decal.Texture = "rbxassetid://441975828" | |
1021 | blasterhead.CFrame = CFrame.new(Character.Torso.CFrame:toWorldSpace(CFrame.new(math.random(-10,10),2,math.random(-10,10))).p,aimPos) | |
1022 | blasterhead.CFrame = blasterhead.CFrame*CFrame.Angles(0,math.rad(180),0) | |
1023 | local s_up = CreateSound(422747271,blasterhead,10,1,false,true) | |
1024 | for i = 0, 1, 0.05 do | |
1025 | blasterhead.CFrame = CFrame.new(blasterhead.CFrame.p,aimPos) | |
1026 | blasterhead.CFrame = blasterhead.CFrame*CFrame.Angles(0,math.rad(180),0) | |
1027 | blasterhead.Position = blasterhead.Position + Vector3.new(0,math.random(i,i+0.5),0) | |
1028 | swait() | |
1029 | end | |
1030 | spawn(function() | |
1031 | wait(1/10) | |
1032 | CreateSound(340722848,blasterhead,10,1,false,true) | |
1033 | --head.CFrame = CFrame.new(head.CFrame.p,aimPos) | |
1034 | local ray = Ray.new(blasterhead.CFrame.p,(aimPos - blasterhead.CFrame.p).unit * 999) | |
1035 | local hit, pos = workspace:FindPartOnRay(ray,Character) | |
1036 | local dis = (blasterhead.CFrame.p - pos).magnitude | |
1037 | local rayPart = Instance.new("Part",workspace) | |
1038 | rayPart.Shape = Enum.PartType.Cylinder | |
1039 | rayPart.Material = "Neon" | |
1040 | rayPart.FormFactor = "Custom" | |
1041 | rayPart.BrickColor = BrickColor.new("White") | |
1042 | rayPart.Anchored = true | |
1043 | rayPart.CanCollide = false | |
1044 | rayPart.Size = Vector3.new(dis + 400,blasterhead.Size/2,blasterhead.Size/2) | |
1045 | rayPart.Touched:connect(function(Hit) | |
1046 | Hurt(Hit,5,Me) | |
1047 | end) | |
1048 | local rayCFrame = CFrame.new(blasterhead.CFrame.p + (aimPos - blasterhead.CFrame.p).unit * (dis/2 + 200),blasterhead.CFrame.p + (aimPos - blasterhead.CFrame.p) --[[.unit * dis * 2--]]) * angles(math.rad(0),math.rad(90),math.rad(0)) | |
1049 | rayPart.CFrame = rayCFrame | |
1050 | spawn(function() | |
1051 | for i = 0, 1, .05 do | |
1052 | local retardation = lerp(1.25,0.2,i) | |
1053 | local ns = lerp(0.2,1,i) | |
1054 | local trans = lerp(0,1.1,i) | |
1055 | rayPart.Size = rayPart.Size + Vector3.new(ns,ns,ns) | |
1056 | rayPart.Transparency = trans | |
1057 | blasterhead.CFrame = blasterhead.CFrame + blasterhead.CFrame.lookVector * retardation | |
1058 | rayPart.CFrame = CFrame.new(blasterhead.CFrame.p + (aimPos - blasterhead.CFrame.p).unit * (dis/2 + 200),blasterhead.CFrame.p + (aimPos - blasterhead.CFrame.p) --[[.unit * dis * 2--]]) * angles(math.rad(0),math.rad(90),math.rad(0)) | |
1059 | swait() | |
1060 | end | |
1061 | rayPart:Destroy() | |
1062 | spawn(function() | |
1063 | wait(2) | |
1064 | blasterhead:Destroy() | |
1065 | end) | |
1066 | end) | |
1067 | table.insert(GetItems, rayPart) | |
1068 | end) | |
1069 | table.insert(GetItems, blasterhead) | |
1070 | end; | |
1071 | ||
1072 | HugeGasterBlaster = function() | |
1073 | local aimPos = Mouse.Hit.p | |
1074 | local blasterhead = Instance.new("Part",Character) | |
1075 | blasterhead.Size = Vector3.new(20,20,20) | |
1076 | blasterhead.CanCollide = false | |
1077 | blasterhead.Anchored = true | |
1078 | blasterhead.Transparency = 1 | |
1079 | local mesh=Instance.new("SpecialMesh",blasterhead) | |
1080 | mesh.MeshType="FileMesh" | |
1081 | mesh.MeshId="rbxassetid://431908407" | |
1082 | mesh.Scale=Vector3.new(0.25,0.225,0.25) | |
1083 | local decal = Instance.new("Decal",blasterhead) | |
1084 | decal.Texture = "rbxassetid://441975828" | |
1085 | blasterhead.CFrame = CFrame.new(Character.Torso.CFrame:toWorldSpace(CFrame.new(math.random(-20,20),1,math.random(-20,20))).p,aimPos) | |
1086 | blasterhead.CFrame = blasterhead.CFrame*CFrame.Angles(0,math.rad(180),0) | |
1087 | local s_up = CreateSound(422747271,blasterhead,10,1,false,true) | |
1088 | for i = 0, 1, 0.05 do | |
1089 | local trans = lerp(0.75,1,i) | |
1090 | blasterhead.CFrame = CFrame.new(blasterhead.CFrame.p,aimPos) | |
1091 | blasterhead.CFrame = blasterhead.CFrame*CFrame.Angles(0,math.rad(180),0) | |
1092 | blasterhead.Position = blasterhead.Position + Vector3.new(0,i+i,0) | |
1093 | swait() | |
1094 | end | |
1095 | spawn(function() | |
1096 | wait(2) | |
1097 | CreateSound(334702766,workspace,1,1,false,true) | |
1098 | --head.CFrame = CFrame.new(head.CFrame.p,aimPos) | |
1099 | local ray = Ray.new(blasterhead.CFrame.p,(aimPos - blasterhead.CFrame.p).unit * 999) | |
1100 | local hit, pos = workspace:FindPartOnRay(ray,Character) | |
1101 | local dis = (blasterhead.CFrame.p - pos).magnitude | |
1102 | local rayPart = Instance.new("Part",workspace) | |
1103 | rayPart.Shape = Enum.PartType.Cylinder | |
1104 | rayPart.Material = "Neon" | |
1105 | rayPart.FormFactor = "Custom" | |
1106 | rayPart.BrickColor = BrickColor.new("White") | |
1107 | rayPart.Anchored = true | |
1108 | rayPart.CanCollide = false | |
1109 | rayPart.Size = Vector3.new(dis + 400,18,18) | |
1110 | rayPart.Touched:connect(function(Hit) | |
1111 | Hurt(Hit,50,Me) | |
1112 | end) | |
1113 | local rayCFrame = CFrame.new(blasterhead.CFrame.p + (aimPos - blasterhead.CFrame.p).unit * (dis/2 + 200),blasterhead.CFrame.p + (aimPos - blasterhead.CFrame.p) --[[.unit * dis * 2--]]) * angles(math.rad(0),math.rad(90),math.rad(0)) | |
1114 | rayPart.CFrame = rayCFrame | |
1115 | spawn(function() | |
1116 | for i = 0, 2, .05 do | |
1117 | local retardation = lerp(2,0.75,i) | |
1118 | local ns = lerp(0.3,1,i) | |
1119 | local trans = lerp(0,1.1,i) | |
1120 | rayPart.Size = rayPart.Size + Vector3.new(ns,ns,ns) | |
1121 | rayPart.Transparency = trans | |
1122 | blasterhead.CFrame = blasterhead.CFrame + blasterhead.CFrame.lookVector * retardation | |
1123 | rayPart.CFrame = CFrame.new(blasterhead.CFrame.p + (aimPos - blasterhead.CFrame.p).unit * (dis/2 + 200),blasterhead.CFrame.p + (aimPos - blasterhead.CFrame.p) --[[.unit * dis * 2--]]) * angles(math.rad(0),math.rad(90),math.rad(0)) | |
1124 | swait() | |
1125 | end | |
1126 | rayPart:Destroy() | |
1127 | wait(2) | |
1128 | blasterhead:Destroy() | |
1129 | end) | |
1130 | table.insert(GetItems, rayPart) | |
1131 | end) | |
1132 | table.insert(GetItems, blasterhead) | |
1133 | end; | |
1134 | ||
1135 | GravityControl = function() | |
1136 | local Target = Mouse.Target | |
1137 | local TarTorso = Target.Parent:FindFirstChild("Torso") | |
1138 | if Target.Parent.Parent:FindFirstChildOfClass("Model") and Target.Parent:FindFirstChildOfClass("Humanoid") then | |
1139 | local MarkTarget = CreatePart(workspace,Enum.Material.Marble,0,0.4,false,false,RGBColor(0,0,235),"Marked",Vector3.new(2,1,1)) | |
1140 | local MeshMark = CreateMesh("SpecialMesh",MarkTarget,"FileMesh","rbxassetid://14656345",Vector3.new(0,0,0),Vector3.new(0.05,0.05,0.05)) | |
1141 | local WeldMark = CreateWeld(MarkTarget,MarkTarget,TarTorso, cf(0,0,-5)*angles(math.rad(90),0,0), cf(0,0,0)*angles(0,0,0)) | |
1142 | ||
1143 | local BodyVel = Instance.new('BodyVelocity',TarTorso) | |
1144 | BodyVel.maxForce = Vector3.new(math.huge,math.huge,math.huge) | |
1145 | BodyVel.Velocity = Vector3.new(0,0.1962,0) | |
1146 | BodyVel.P = 1 | |
1147 | local BodyGyro = Instance.new('BodyGyro',TarTorso) | |
1148 | BodyGyro.maxTorque = Vector3.new(math.huge,math.huge,math.huge) | |
1149 | BodyGyro.P = 2e4 | |
1150 | ||
1151 | Mouse.KeyUp:connect(function(Key) | |
1152 | if ModeOfSans == 1 then | |
1153 | if ModeOfSans == 1 then | |
1154 | if Key == "q" then | |
1155 | Held[Key] = nil | |
1156 | BodyVel.Velocity = Vector3.new(0,0,0) | |
1157 | end | |
1158 | end | |
1159 | end | |
1160 | end) | |
1161 | ||
1162 | Mouse.KeyDown:connect(function(Key) | |
1163 | if ModeOfSans == 1 then | |
1164 | if Key == "q" then | |
1165 | Held[Key] = true | |
1166 | while Held[Key] == true do | |
1167 | if Held[Key] == nil or TarTorso.Parent:FindFirstChildOfClass("Humanoid").Health == 0 then | |
1168 | return | |
1169 | end | |
1170 | BodyGyro.CFrame = CFrame.new(TarTorso.Position,Mouse.Hit.p) | |
1171 | BodyVel.Velocity = TarTorso.CFrame.lookVector*300 | |
1172 | swait() | |
1173 | end | |
1174 | end | |
1175 | end | |
1176 | end) | |
1177 | end | |
1178 | end; | |
1179 | ||
1180 | Teleport = function() | |
1181 | HumanoidRootPart.CFrame = Mouse.Hit * CFrame.new(0, 2.8, 0) | |
1182 | CreateSound(367453005,Head,1,1,false,true) | |
1183 | end; | |
1184 | ||
1185 | Torture = function() | |
1186 | local Target = Mouse.Target | |
1187 | local TarTorso = Target.Parent:FindFirstChild("Torso") | |
1188 | local TarHead = Target.Parent:FindFirstChild("Head") | |
1189 | local TarLA = Target.Parent:FindFirstChild("Left Arm") | |
1190 | local TarRA = Target.Parent:FindFirstChild("Right Arm") | |
1191 | local TarLL = Target.Parent:FindFirstChild("Left Leg") | |
1192 | local TarHum = Target.Parent:FindFirstChildOfClass("Humanoid") | |
1193 | if TarHum and TarHum.Health ~= 0 and TarTorso and TarLA and TarRA and TarLL then | |
1194 | KeyAndAnimation(true) | |
1195 | ||
1196 | HumanoidRootPart.CFrame = TarTorso.CFrame | |
1197 | TarHead.Anchored = true | |
1198 | GetValueWS_JP(Humanoid) | |
1199 | StoreWS_JP(TarHum) | |
1200 | StoreWS_JP(Humanoid) | |
1201 | local Behind = CreateWeld(HumanoidRootPart,HumanoidRootPart,TarTorso,cf(0,0,-1.5)*angles(0,0,0), cf(0,0,0)*angles(0,0,0)) | |
1202 | CreateSound(305685800,workspace,1,1,false,true) | |
1203 | ||
1204 | local frame = 10 | |
1205 | for i = 0, frame do | |
1206 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0) * angles(math.rad(0),math.rad(0),math.rad(0)),.15) | |
1207 | HW.C0 = clerp(HW.C0,necko * angles(math.rad(-20),math.rad(0),math.rad(0)),.15) | |
1208 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(0)), 0.15) | |
1209 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(0)), 0.15) | |
1210 | RH.C0 = clerp(RH.C0, cf(0.5, -2, 0) * angles(math.rad(0),math.rad(0),math.rad(0)),.15) | |
1211 | LH.C0 = clerp(LH.C0, cf(-0.5, -2, 0) * angles(math.rad(0),math.rad(0),math.rad(0)),.15) | |
1212 | swait() | |
1213 | end | |
1214 | for i = 0, frame do | |
1215 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0) * angles(math.rad(0),math.rad(0),math.rad(0)),.15) | |
1216 | HW.C0 = clerp(HW.C0,necko * angles(math.rad(0),math.rad(0),math.rad(0)),.15) | |
1217 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(20), math.rad(0), math.rad(0)), 0.15) | |
1218 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(20), math.rad(0), math.rad(0)), 0.15) | |
1219 | RH.C0 = clerp(RH.C0, cf(0.5, -2, 0) * angles(math.rad(0),math.rad(0),math.rad(0)),.15) | |
1220 | LH.C0 = clerp(LH.C0, cf(-0.5, -2, 0) * angles(math.rad(0),math.rad(0),math.rad(0)),.15) | |
1221 | swait() | |
1222 | end | |
1223 | ||
1224 | frame = 20 | |
1225 | for i = 0, frame do | |
1226 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0) * angles(math.rad(0),math.rad(0),math.rad(0)),.15) | |
1227 | HW.C0 = clerp(HW.C0,necko * angles(math.rad(5),math.rad(0),math.rad(0)),.15) | |
1228 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(50), math.rad(0), math.rad(0)), 0.15) | |
1229 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(50), math.rad(0), math.rad(0)), 0.15) | |
1230 | RH.C0 = clerp(RH.C0, cf(0.5, -2, 0) * angles(math.rad(0),math.rad(0),math.rad(0)),.15) | |
1231 | LH.C0 = clerp(LH.C0, cf(-0.5, -2, 0) * angles(math.rad(0),math.rad(0),math.rad(0)),.15) | |
1232 | swait() | |
1233 | end | |
1234 | TarLA:BreakJoints() | |
1235 | TarRA:BreakJoints() | |
1236 | TarLA.Parent = TarTorso | |
1237 | TarRA.Parent = TarTorso | |
1238 | TarLA.CanCollide = true | |
1239 | TarRA.CanCollide = true | |
1240 | local WeldNewLA = CreateWeld(LeftArm,LeftArm,TarLA,cf(0,-1.5,0)*angles(math.rad(90),0,0),cf(0,0,0)*angles(0,0,0)) | |
1241 | local WeldNewRA = CreateWeld(RightArm,RightArm,TarRA,cf(0,-1.5,0)*angles(math.rad(90),0,0),cf(0,0,0)*angles(0,0,0)) | |
1242 | for i = 0, frame do | |
1243 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0) * angles(math.rad(0),math.rad(0),math.rad(0)),.15) | |
1244 | HW.C0 = clerp(HW.C0,necko * angles(math.rad(5),math.rad(0),math.rad(0)),.15) | |
1245 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(120), math.rad(0), math.rad(0)), 0.15) | |
1246 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(120), math.rad(0), math.rad(0)), 0.15) | |
1247 | RH.C0 = clerp(RH.C0, cf(0.5, -2, 0) * angles(math.rad(0),math.rad(0),math.rad(0)),.15) | |
1248 | LH.C0 = clerp(LH.C0, cf(-0.5, -2, 0) * angles(math.rad(0),math.rad(0),math.rad(0)),.15) | |
1249 | swait() | |
1250 | end | |
1251 | ||
1252 | frame = 60 | |
1253 | for i = 0, frame do | |
1254 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0) * angles(math.rad(0),math.rad(0),math.rad(0)),.15) | |
1255 | HW.C0 = clerp(HW.C0,necko * angles(math.rad(5),math.rad(0),math.rad(0)),.15) | |
1256 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(260), math.rad(0), math.rad(-20)), 0.05) | |
1257 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(260), math.rad(0), math.rad(20)), 0.05) | |
1258 | RH.C0 = clerp(RH.C0, cf(0.5, -2, 0) * angles(math.rad(0),math.rad(0),math.rad(0)),.15) | |
1259 | LH.C0 = clerp(LH.C0, cf(-0.5, -2, 0) * angles(math.rad(0),math.rad(0),math.rad(0)),.15) | |
1260 | swait() | |
1261 | end | |
1262 | ||
1263 | frame = 10 | |
1264 | for i = 0, frame do | |
1265 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0) * angles(math.rad(0),math.rad(0),math.rad(0)),.15) | |
1266 | HW.C0 = clerp(HW.C0,necko * angles(math.rad(5),math.rad(0),math.rad(0)),.15) | |
1267 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(120), math.rad(0), math.rad(20)), 0.15) | |
1268 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(120), math.rad(0), math.rad(-20)), 0.15) | |
1269 | RH.C0 = clerp(RH.C0, cf(0.5, -2, 0) * angles(math.rad(0),math.rad(0),math.rad(0)),.15) | |
1270 | LH.C0 = clerp(LH.C0, cf(-0.5, -2, 0) * angles(math.rad(0),math.rad(0),math.rad(0)),.15) | |
1271 | swait() | |
1272 | end | |
1273 | TarLA:BreakJoints() | |
1274 | TarRA:BreakJoints() | |
1275 | ThrowObj(TarLA,Head, math.random(40, 75)) | |
1276 | ThrowObj(TarRA,Head, math.random(40, 75)) | |
1277 | ||
1278 | frame = 30 | |
1279 | for i = 0, frame do | |
1280 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0) * angles(math.rad(0),math.rad(0),math.rad(0)),.15) | |
1281 | HW.C0 = clerp(HW.C0,necko * angles(math.rad(5),math.rad(0),math.rad(0)),.15) | |
1282 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(120), math.rad(0), math.rad(20)), 0.15) | |
1283 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(120), math.rad(0), math.rad(-20)), 0.15) | |
1284 | RH.C0 = clerp(RH.C0, cf(0.5, -2, 0) * angles(math.rad(0),math.rad(0),math.rad(0)),.15) | |
1285 | LH.C0 = clerp(LH.C0, cf(-0.5, -2, 0) * angles(math.rad(0),math.rad(0),math.rad(0)),.15) | |
1286 | swait() | |
1287 | end | |
1288 | ||
1289 | frame = 40 | |
1290 | for i = 0, frame do | |
1291 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(-0.5,-0.5,0) * angles(math.rad(0),math.rad(0),math.rad(20)),.15) | |
1292 | HW.C0 = clerp(HW.C0,necko * angles(math.rad(0),math.rad(0),math.rad(0)),.15) | |
1293 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(40), math.rad(0), math.rad(20)), 0.15) | |
1294 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-20)), 0.15) | |
1295 | RH.C0 = clerp(RH.C0, cf(0.5, -2, 0) * angles(math.rad(0),math.rad(0),math.rad(0)),.15) | |
1296 | LH.C0 = clerp(LH.C0, cf(-0.5, -2, 0) * angles(math.rad(0),math.rad(0),math.rad(0)),.15) | |
1297 | swait() | |
1298 | end | |
1299 | CreateSound(1386772138,Head,1,1,false,true) | |
1300 | ||
1301 | frame = 10 | |
1302 | for i = 0, frame do | |
1303 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(-0.5,-0.5,0) * angles(math.rad(0),math.rad(0),math.rad(20)),.15) | |
1304 | HW.C0 = clerp(HW.C0,necko * angles(math.rad(0),math.rad(0),math.rad(0)),.15) | |
1305 | RW.C0 = clerp(RW.C0, CFrame.new(1.1, 0.4+0.1*math.cos(sine/16), -0.2) * angles(math.rad(-110),math.rad(50),math.rad(190)), .3) | |
1306 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-20)), 0.15) | |
1307 | RH.C0 = clerp(RH.C0, cf(0.5, -2, 0) * angles(math.rad(0),math.rad(0),math.rad(0)),.15) | |
1308 | LH.C0 = clerp(LH.C0, cf(-0.5, -2, 0) * angles(math.rad(0),math.rad(0),math.rad(0)),.15) | |
1309 | swait() | |
1310 | end | |
1311 | ||
1312 | --if TarTorso.Parent:FindFirstChild("Torso") then | |
1313 | --TarTorso.Parent:FindFirstChild("Torso").CFrame = TarTorso.Parent:FindFirstChild("Torso").CFrame * angles(math.rad(2), math.rad(0), math.rad(0)) | |
1314 | --Ragdoll(TarTorso.Parent,Torso,true) | |
1315 | --end | |
1316 | TarTorso:BreakJoints() | |
1317 | TarHead.Anchored = false | |
1318 | ReleaseWS_JP(Humanoid) | |
1319 | Behind:Destroy() | |
1320 | ||
1321 | KeyAndAnimation(false) | |
1322 | end | |
1323 | end; | |
1324 | ||
1325 | CutHead = function() | |
1326 | local Target = Mouse.Target | |
1327 | local TarTorso = Target.Parent:FindFirstChild("Torso") | |
1328 | local TarHead = Target.Parent:FindFirstChild("Head") | |
1329 | local TarLA = Target.Parent:FindFirstChild("Left Arm") | |
1330 | local TarRA = Target.Parent:FindFirstChild("Right Arm") | |
1331 | local TarLL = Target.Parent:FindFirstChild("Left Leg") | |
1332 | local TarHum = Target.Parent:FindFirstChildOfClass("Humanoid") | |
1333 | if TarHum and TarHum.Health ~= 0 and TarTorso and TarLA and TarRA and TarLL and TarHead then | |
1334 | KeyAndAnimation(true) | |
1335 | ||
1336 | GetValueWS_JP(Humanoid) | |
1337 | StoreWS_JP(TarHum) | |
1338 | StoreWS_JP(Humanoid) | |
1339 | HumanoidRootPart.CFrame = TarTorso.CFrame | |
1340 | ||
1341 | local Behind = CreateWeld(HumanoidRootPart,HumanoidRootPart,TarTorso,cf(0,0,-1.5)*angles(0,0,0), cf(0,0,0)*angles(0,0,0)) | |
1342 | for i = 1, 20 do | |
1343 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0) * angles(math.rad(0),math.rad(0),math.rad(0)),.15) | |
1344 | HW.C0 = clerp(HW.C0,necko * angles(math.rad(0),math.rad(0),math.rad(0)),.15) | |
1345 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.15) | |
1346 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(50), math.rad(0), math.rad(0)), 0.15) | |
1347 | swait() | |
1348 | end | |
1349 | for i = 1, 20 do | |
1350 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0) * angles(math.rad(0),math.rad(0),math.rad(0)),.15) | |
1351 | HW.C0 = clerp(HW.C0,necko * angles(math.rad(0),math.rad(0),math.rad(0)),.15) | |
1352 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.15) | |
1353 | LW.C0 = clerp(LW.C0, CFrame.new(-1.3, 0.5, -0.5) * angles(math.rad(160), math.rad(-20), math.rad(40)), 0.15) | |
1354 | swait() | |
1355 | end | |
1356 | ||
1357 | ||
1358 | --Ragdoll(TarTorso.Parent,Torso,true) | |
1359 | TarTorso:BreakJoints() | |
1360 | Behind:Destroy() | |
1361 | local Fake = TarHead:Clone() | |
1362 | Fake.Parent = TarHum | |
1363 | TarHead:Destroy() | |
1364 | Sticky(LeftArm,Fake) | |
1365 | ||
1366 | for i = 1, 30 do | |
1367 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0) * angles(math.rad(0),math.rad(0),math.rad(0)),.15) | |
1368 | HW.C0 = clerp(HW.C0,necko * angles(math.rad(-10),math.rad(0),math.rad(0)),.15) | |
1369 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.15) | |
1370 | LW.C0 = clerp(LW.C0, CFrame.new(-1.4, 0.5, -0.6) * angles(math.rad(70), math.rad(0), math.rad(60)), 0.15) | |
1371 | swait() | |
1372 | end | |
1373 | for i = 1, 40 do | |
1374 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0) * angles(math.rad(0),math.rad(0),math.rad(0)),.15) | |
1375 | HW.C0 = clerp(HW.C0,necko * angles(math.rad(-15),math.rad(0),math.rad(0)),.15) | |
1376 | RW.C0 = clerp(RW.C0, CFrame.new(1.4, 0.4, 0.2) * angles(math.rad(-25),math.rad(20),math.rad(190)), .15) | |
1377 | LW.C0 = clerp(LW.C0, CFrame.new(-1.4, 0.5, -0.6) * angles(math.rad(40), math.rad(0), math.rad(30)), 0.15) | |
1378 | swait() | |
1379 | end | |
1380 | for i = 1, 20 do | |
1381 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0) * angles(math.rad(0),math.rad(0),math.rad(0)),.15) | |
1382 | HW.C0 = clerp(HW.C0,necko * angles(math.rad(-15),math.rad(0),math.rad(0)),.15) | |
1383 | RW.C0 = clerp(RW.C0, CFrame.new(1.4, 0.4, 0.2) * angles(math.rad(-75),math.rad(20),math.rad(210)), .25) | |
1384 | LW.C0 = clerp(LW.C0, CFrame.new(-1.4, 0.5, -0.6) * angles(math.rad(40), math.rad(0), math.rad(30)), 0.15) | |
1385 | swait() | |
1386 | end | |
1387 | CreateSound(171688984,Head,1,1,false,true) | |
1388 | for i = 1, 20 do | |
1389 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0) * angles(math.rad(0),math.rad(0),math.rad(0)),.15) | |
1390 | HW.C0 = clerp(HW.C0,necko * angles(math.rad(-15),math.rad(0),math.rad(0)),.15) | |
1391 | RW.C0 = clerp(RW.C0, CFrame.new(1.4, 0.4, 0.2) * angles(math.rad(-25),math.rad(20),math.rad(190)), .25) | |
1392 | LW.C0 = clerp(LW.C0, CFrame.new(-1.4, 0.5, -0.6) * angles(math.rad(40), math.rad(0), math.rad(30)), 0.15) | |
1393 | swait() | |
1394 | end | |
1395 | for i = 1, 20 do | |
1396 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0) * angles(math.rad(0),math.rad(0),math.rad(0)),.15) | |
1397 | HW.C0 = clerp(HW.C0,necko * angles(math.rad(-15),math.rad(0),math.rad(0)),.15) | |
1398 | RW.C0 = clerp(RW.C0, CFrame.new(1.4, 0.4, 0.2) * angles(math.rad(-75),math.rad(20),math.rad(210)), .25) | |
1399 | LW.C0 = clerp(LW.C0, CFrame.new(-1.4, 0.5, -0.6) * angles(math.rad(40), math.rad(0), math.rad(30)), 0.15) | |
1400 | swait() | |
1401 | end | |
1402 | ||
1403 | Fake:BreakJoints() | |
1404 | CreateSound(171688984,Head,1,1,false,true) | |
1405 | ReleaseWS_JP(Humanoid) | |
1406 | ||
1407 | KeyAndAnimation(false) | |
1408 | end | |
1409 | end; | |
1410 | ||
1411 | BrushAttack1 = function() | |
1412 | KeyAndAnimation(true) | |
1413 | ||
1414 | Equip.BrushInkSans.Part1 = RightArm | |
1415 | BrushTrail.Color = ColorSequence.new(BrickColor.new('Really black').Color,BrickColor.new('Lime green').Color) | |
1416 | coroutine.resume(coroutine.create(function() | |
1417 | for i = 1, 40 do | |
1418 | Equip.BrushInkSans.C0 = clerp(Equip.BrushInkSans.C0, cf(0, -1, 0.75) *angles(math.rad(0), 0, math.rad(-180)), .075) | |
1419 | swait() | |
1420 | end | |
1421 | end)) | |
1422 | for i = 1, 30 do | |
1423 | RW.C0 = clerp(RW.C0, CFrame.new(1, 0.5, 0.1) * angles(math.rad(70), math.rad(0), math.rad(40)), .1) | |
1424 | LW.C0 = clerp(LW.C0, CFrame.new(-1, 0.5, 0.1) * angles(math.rad(-40), math.rad(0), math.rad(40)), .1) | |
1425 | swait() | |
1426 | end | |
1427 | Active["BrushInkSans"] = true | |
1428 | for i = 1, 25 do | |
1429 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(90), math.rad(0), math.rad(-50)), .15) | |
1430 | swait() | |
1431 | end | |
1432 | BrushTrail.Color = ColorSequence.new(BrickColor.new('Really black').Color) | |
1433 | Active["BrushInkSans"] = false | |
1434 | ||
1435 | KeyAndAnimation(false) | |
1436 | end; | |
1437 | ||
1438 | ErrorRemove = function() | |
1439 | local Target = Mouse.Target | |
1440 | local TarTorso = Target.Parent:FindFirstChild("Torso") | |
1441 | local TarHead = Target.Parent:FindFirstChild("Head") | |
1442 | local TarLA = Target.Parent:FindFirstChild("Left Arm") | |
1443 | local TarRA = Target.Parent:FindFirstChild("Right Arm") | |
1444 | local TarLL = Target.Parent:FindFirstChild("Left Leg") | |
1445 | local TarRL = Target.Parent:FindFirstChild("Right Leg") | |
1446 | local TarHum = Target.Parent:FindFirstChildOfClass("Humanoid") | |
1447 | if TarHum and TarHum.Health ~= 0 and TarTorso and TarLA and TarRA and TarLL and TarHead then | |
1448 | KeyAndAnimation(true) | |
1449 | ||
1450 | local RemovePart = CreatePart(workspace,Enum.Material.Neon,1,0,false,false,RGBColor(math.random(235,255),0,0),"ErrorPart",Vector3.new(TarTorso.Size.X*2,1,TarTorso.Size.X*2)) | |
1451 | local WeldRemovePart = CreateWeld(RemovePart,RemovePart,TarTorso,cf(0,2.5,0)*angles(0,0,0),cf(0,0,0)*angles(0,0,0)) | |
1452 | ||
1453 | swait() | |
1454 | RemovePart.Anchored = true | |
1455 | TarTorso.Anchored = true | |
1456 | ||
1457 | for i = 0, 1, 0.1 do | |
1458 | local ns = lerp(0.5,1,i) | |
1459 | RemovePart.Size = RemovePart.Size + Vector3.new(0,ns,0) | |
1460 | swait() | |
1461 | end | |
1462 | ||
1463 | for i = 0, 1, 0.1 do | |
1464 | PixelBlockNeg(2,1,"Add",true,TarTorso.CFrame*CFrame.Angles(math.rad(math.random(-360,360)),math.rad(math.random(-360,360)),math.rad(math.random(-360,360))),1,1,1,0.01,BrickColor.new("Really red"),0) | |
1465 | end | |
1466 | ||
1467 | TarTorso:Destroy() | |
1468 | TarHead:Destroy() | |
1469 | TarLA:Destroy() | |
1470 | TarRA:Destroy() | |
1471 | TarLL:Destroy() | |
1472 | TarRL:Destroy() | |
1473 | local Character = TarHum.Parent | |
1474 | if Character then | |
1475 | local FoundPlayer = game.Players[Character.Name] | |
1476 | if FoundPlayer ~= nil then | |
1477 | FoundPlayer.Parent = nil; | |
1478 | end | |
1479 | end | |
1480 | ||
1481 | for i = 0, 1, 0.1 do | |
1482 | local ns = lerp(1,0.5,i) | |
1483 | RemovePart.Size = RemovePart.Size - Vector3.new(ns,ns+ns+ns,ns) | |
1484 | swait() | |
1485 | end | |
1486 | ||
1487 | RemovePart:Destroy() | |
1488 | KeyAndAnimation(false) | |
1489 | end | |
1490 | end; | |
1491 | ||
1492 | InfectionError = function() | |
1493 | KeyAndAnimation(true) | |
1494 | local speedearn = 0 | |
1495 | for i = 0, 10, 0.1 do | |
1496 | swait() | |
1497 | speedearn = speedearn + 0.1 | |
1498 | RH.C0=clerp(RH.C0,cf(0.5,-1.25,-0.5)*angles(math.rad(0),math.rad(0),math.rad(0))*angles(math.rad(-20),math.rad(0),math.rad(0)),.2) | |
1499 | LH.C0=clerp(LH.C0,cf(-0.5,-2,0.25)*angles(math.rad(0),math.rad(0),math.rad(0))*angles(math.rad(-20),math.rad(0),math.rad(0)),.2) | |
1500 | RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)*angles(math.rad(-20),math.rad(0),math.rad(0)),.2) | |
1501 | Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(-20),math.rad(0),math.rad(0)),.2) | |
1502 | RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*angles(math.rad(140),math.rad(0),math.rad(-20)),.2) | |
1503 | LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*angles(math.rad(140),math.rad(0),math.rad(20)),.2) | |
1504 | end | |
1505 | ||
1506 | local Infected = function(v) | |
1507 | spawn(function()--coroutine.resume(coroutine.create(function() | |
1508 | if v ~= Character then | |
1509 | local RemovePart = CreatePart(workspace,Enum.Material.Neon,1,0,false,false,RGBColor(math.random(235,255),0,0),"ErrorPart",Vector3.new(v.Torso.Size.X*2,1,v.Torso.Size.X*2)) | |
1510 | local WeldRemovePart = CreateWeld(RemovePart,RemovePart,v.Torso,cf(0,2.5,0)*angles(0,0,0),cf(0,0,0)*angles(0,0,0)) | |
1511 | ||
1512 | swait() | |
1513 | RemovePart.Anchored = true | |
1514 | v['Torso'].Anchored = true | |
1515 | ||
1516 | spawn(function()--coroutine.resume(coroutine.create(function() | |
1517 | for i = 0, 1, 0.1 do | |
1518 | local ns = lerp(0.5,1,i) | |
1519 | RemovePart.Size = RemovePart.Size + Vector3.new(0,ns,0) | |
1520 | swait() | |
1521 | end | |
1522 | ||
1523 | for i = 0, 1, 0.1 do | |
1524 | PixelBlockNeg(2,1,"Add",true,v.Torso.CFrame*CFrame.Angles(math.rad(math.random(-360,360)),math.rad(math.random(-360,360)),math.rad(math.random(-360,360))),1,1,1,0.01,BrickColor.new("Really red"),0) | |
1525 | end | |
1526 | ||
1527 | for i, k in pairs(v:GetChildren()) do | |
1528 | if k:IsA("Part") or k:IsA("Model") then | |
1529 | k:Destroy() | |
1530 | end | |
1531 | end | |
1532 | ||
1533 | for i = 0, 1, 0.1 do | |
1534 | local ns = lerp(1,0.5,i) | |
1535 | RemovePart.Size = RemovePart.Size - Vector3.new(ns,ns+ns+ns,ns) | |
1536 | swait() | |
1537 | end | |
1538 | ||
1539 | RemovePart:Destroy() | |
1540 | end) | |
1541 | end | |
1542 | end) | |
1543 | end | |
1544 | ||
1545 | CreateSound(62339698,workspace,1,0.3,false,true) | |
1546 | spawn(function() | |
1547 | for i, v in pairs(FindNearestTorso(Torso.CFrame.p, 1234567890)) do | |
1548 | if v['Torso'] then | |
1549 | Infected(v) | |
1550 | end | |
1551 | end | |
1552 | end) | |
1553 | ||
1554 | for i = 0, 3, 0.1 do | |
1555 | swait() | |
1556 | RH.C0=clerp(RH.C0,cf(0.5,-2,-0.5)*angles(math.rad(0),math.rad(0),math.rad(0))*angles(math.rad(-10),math.rad(0),math.rad(0)),.4) | |
1557 | LH.C0=clerp(LH.C0,cf(-0.5,-2,0)*angles(math.rad(0),math.rad(0),math.rad(0))*angles(math.rad(-10),math.rad(0),math.rad(0)),.4) | |
1558 | RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)*angles(math.rad(10),math.rad(0),math.rad(0)),.4) | |
1559 | Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(10),math.rad(0),math.rad(0)),.4) | |
1560 | RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*angles(math.rad(-50),math.rad(0),math.rad(30)),.4) | |
1561 | LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*angles(math.rad(-50),math.rad(0),math.rad(-30)),.4) | |
1562 | end | |
1563 | ||
1564 | KeyAndAnimation(false) | |
1565 | end; | |
1566 | ||
1567 | PastTime = function() | |
1568 | local Freeze = function(v) | |
1569 | coroutine.resume(coroutine.create(function() | |
1570 | local hum = v:FindFirstChildOfClass("Humanoid") | |
1571 | hum.WalkSpeed = 0 | |
1572 | if v ~= Character then | |
1573 | v:FindFirstChild("Torso").Anchored = true | |
1574 | v:FindFirstChild("Head").Anchored = true | |
1575 | v:FindFirstChild("Right Arm").Anchored = true | |
1576 | v:FindFirstChild("Left Arm").Anchored = true | |
1577 | v:FindFirstChild("Right Leg").Anchored = true | |
1578 | v:FindFirstChild("Left Leg").Anchored = true | |
1579 | v:FindFirstChild("HumanoidRootPart").Anchored = true | |
1580 | ||
1581 | end | |
1582 | end)) | |
1583 | end | |
1584 | ||
1585 | local Thaw = function(v) | |
1586 | coroutine.resume(coroutine.create(function() | |
1587 | v:FindFirstChildOfClass("Humanoid").WalkSpeed = 16 | |
1588 | if v ~= Character then | |
1589 | v:FindFirstChild("Torso").Anchored = false | |
1590 | v:FindFirstChild("Head").Anchored = false | |
1591 | v:FindFirstChild("Right Arm").Anchored = false | |
1592 | v:FindFirstChild("Left Arm").Anchored = false | |
1593 | v:FindFirstChild("Right Leg").Anchored = false | |
1594 | v:FindFirstChild("Left Leg").Anchored = false | |
1595 | v:FindFirstChild("HumanoidRootPart").Anchored = false | |
1596 | ||
1597 | end | |
1598 | end)) | |
1599 | end | |
1600 | ||
1601 | spawn(function() | |
1602 | for i, v in pairs(workspace:GetChildren()) do | |
1603 | if v:IsA("Part") then | |
1604 | if v:FindFirstChildOfClass("BodyVelocity") or v:FindFirstChildOfClass("RocketPropulsion") or v:FindFirstChildOfClass("BodyForce") or v:FindFirstChildOfClass("BodyPosition") then | |
1605 | spawn(function() | |
1606 | v.Anchored = true | |
1607 | swait() | |
1608 | v.Anchored = false | |
1609 | swait() | |
1610 | end) | |
1611 | end | |
1612 | end | |
1613 | end | |
1614 | end) | |
1615 | ||
1616 | for i, v in pairs(FindNearestTorso(Torso.CFrame.p, 1234567890)) do | |
1617 | if v:FindFirstChild('Torso') then | |
1618 | spawn(function() | |
1619 | Freeze(v) | |
1620 | swait() | |
1621 | Thaw(v) | |
1622 | swait() | |
1623 | end) | |
1624 | end | |
1625 | end | |
1626 | end; | |
1627 | ||
1628 | FreezeTime = function() | |
1629 | for i, player in pairs(game.Players:GetPlayers()) do | |
1630 | for i, v in pairs(player.Character:GetChildren()) do | |
1631 | if v:IsA("BasePart") and v.Parent ~= Character then | |
1632 | v.Anchored = true | |
1633 | end | |
1634 | end | |
1635 | end | |
1636 | end; | |
1637 | ||
1638 | ThawTime = function() | |
1639 | CreateSound(1195380475,workspace,1,1.75,false,true) | |
1640 | for i, player in pairs(game.Players:GetPlayers()) do | |
1641 | for i, v in pairs(player.Character:GetChildren()) do | |
1642 | if v:IsA("BasePart") and v.Parent ~= Character then | |
1643 | v.Anchored = false | |
1644 | end | |
1645 | end | |
1646 | end | |
1647 | end; | |
1648 | ||
1649 | BanishGasterBlaster = function() | |
1650 | local aimPos = Mouse.Hit.p | |
1651 | local blasterhead = Instance.new("Part",Character) | |
1652 | blasterhead.Size = Vector3.new(6,6,6) | |
1653 | blasterhead.CanCollide = false | |
1654 | blasterhead.Anchored = true | |
1655 | blasterhead.Transparency = 1 | |
1656 | blasterhead.Color = RGBColor(100,100,100) | |
1657 | local mesh=Instance.new("SpecialMesh",blasterhead)mesh.MeshType="FileMesh"mesh.MeshId="rbxassetid://431908407" | |
1658 | mesh.Scale=Vector3.new(.075,.0725,.075) | |
1659 | local decal = Instance.new("Decal",blasterhead) | |
1660 | decal.Texture = "rbxassetid://441975828" | |
1661 | blasterhead.CFrame = CFrame.new(Character.Torso.CFrame:toWorldSpace(CFrame.new(math.random(-10,10),2,math.random(-10,10))).p,aimPos) | |
1662 | blasterhead.CFrame = blasterhead.CFrame*CFrame.Angles(0,math.rad(180),0) | |
1663 | local s_up = CreateSound(422747271,blasterhead,10,1,false,true) | |
1664 | for i = 0, 1, 0.05 do | |
1665 | blasterhead.CFrame = CFrame.new(blasterhead.CFrame.p,aimPos) | |
1666 | blasterhead.CFrame = blasterhead.CFrame*CFrame.Angles(0,math.rad(180),0) | |
1667 | blasterhead.Position = blasterhead.Position + Vector3.new(0,math.random(i,i+0.5),0) | |
1668 | swait() | |
1669 | end | |
1670 | spawn(function() | |
1671 | wait(1/10) | |
1672 | CreateSound(340722848,blasterhead,10,1,false,true) | |
1673 | --head.CFrame = CFrame.new(head.CFrame.p,aimPos) | |
1674 | local ray = Ray.new(blasterhead.CFrame.p,(aimPos - blasterhead.CFrame.p).unit * 999) | |
1675 | local hit, pos = workspace:FindPartOnRay(ray,Character) | |
1676 | local dis = (blasterhead.CFrame.p - pos).magnitude | |
1677 | local rayPart = Instance.new("Part",workspace) | |
1678 | rayPart.Shape = Enum.PartType.Cylinder | |
1679 | rayPart.Material = Enum.Material.Plastic | |
1680 | rayPart.FormFactor = "Custom" | |
1681 | rayPart.BrickColor = BrickColor.new("Ghost grey") | |
1682 | rayPart.Anchored = true | |
1683 | rayPart.CanCollide = false | |
1684 | rayPart.Size = Vector3.new(dis + 400,blasterhead.Size/2,blasterhead.Size/2) | |
1685 | RemoveOutlines(rayPart) | |
1686 | rayPart.Touched:connect(function(Hit) | |
1687 | if (Hit.Parent.Name ~= Me and Hit.Parent.Parent.Name ~= Me) then | |
1688 | Debris:AddItem(Hit, 3) | |
1689 | for i = 0, 1, .005 do | |
1690 | local newTrans = lerp(0, 1.1, i) | |
1691 | Hit.Transparency = newTrans | |
1692 | swait() | |
1693 | end | |
1694 | end | |
1695 | end) | |
1696 | local rayCFrame = CFrame.new(blasterhead.CFrame.p + (aimPos - blasterhead.CFrame.p).unit * (dis/2 + 200),blasterhead.CFrame.p + (aimPos - blasterhead.CFrame.p) --[[.unit * dis * 2--]]) * angles(math.rad(0),math.rad(90),math.rad(0)) | |
1697 | rayPart.CFrame = rayCFrame | |
1698 | spawn(function() | |
1699 | for i = 0, 1, .05 do | |
1700 | local retardation = lerp(1.25,0.2,i) | |
1701 | local ns = lerp(0.2,1,i) | |
1702 | local trans = lerp(0,1.1,i) | |
1703 | rayPart.Size = rayPart.Size + Vector3.new(ns,ns,ns) | |
1704 | rayPart.Transparency = trans | |
1705 | blasterhead.CFrame = blasterhead.CFrame + blasterhead.CFrame.lookVector * retardation | |
1706 | rayPart.CFrame = CFrame.new(blasterhead.CFrame.p + (aimPos - blasterhead.CFrame.p).unit * (dis/2 + 200),blasterhead.CFrame.p + (aimPos - blasterhead.CFrame.p) --[[.unit * dis * 2--]]) * angles(math.rad(0),math.rad(90),math.rad(0)) | |
1707 | swait() | |
1708 | end | |
1709 | rayPart:Destroy() | |
1710 | spawn(function() | |
1711 | wait(2) | |
1712 | blasterhead:Destroy() | |
1713 | end) | |
1714 | end) | |
1715 | table.insert(GetItems, rayPart) | |
1716 | end) | |
1717 | table.insert(GetItems, blasterhead) | |
1718 | end; | |
1719 | } | |
1720 | ||
1721 | function PixelBlockNeg(bonuspeed,FastSpeed,type,transparentanim,pos,x1,y1,z1,value,color,outerpos) | |
1722 | local type = type | |
1723 | local rng = Instance.new("Part", Character) | |
1724 | rng.Anchored = true | |
1725 | rng.BrickColor = color | |
1726 | rng.CanCollide = false | |
1727 | rng.FormFactor = 3 | |
1728 | rng.Name = "Ring" | |
1729 | rng.Material = "Neon" | |
1730 | rng.Size = Vector3.new(1, 1, 1) | |
1731 | rng.Transparency = 0 | |
1732 | rng.TopSurface = 0 | |
1733 | rng.BottomSurface = 0 | |
1734 | rng.CFrame = pos | |
1735 | rng.CFrame = rng.CFrame + rng.CFrame.lookVector*outerpos | |
1736 | local rngm = Instance.new("SpecialMesh", rng) | |
1737 | rngm.MeshType = "Brick" | |
1738 | rngm.Scale = Vector3.new(x1,y1,z1) | |
1739 | local scaler2 = 0 | |
1740 | local speeder = FastSpeed/10 | |
1741 | if type == "Add" then | |
1742 | scaler2 = 1*value | |
1743 | elseif type == "Divide" then | |
1744 | scaler2 = 1/value | |
1745 | end | |
1746 | coroutine.resume(coroutine.create(function() | |
1747 | for i = 0,10/bonuspeed,0.1 do | |
1748 | swait() | |
1749 | if type == "Add" then | |
1750 | scaler2 = scaler2 - 0.01*value/bonuspeed | |
1751 | elseif type == "Divide" then | |
1752 | scaler2 = scaler2 - 0.01/value*bonuspeed | |
1753 | end | |
1754 | speeder = speeder + 0.01*FastSpeed*bonuspeed/10 | |
1755 | rng.CFrame = rng.CFrame + rng.CFrame.lookVector*speeder*bonuspeed | |
1756 | if transparentanim == true then | |
1757 | rng.Transparency = rng.Transparency + 0.01*bonuspeed | |
1758 | end | |
1759 | rngm.Scale = rngm.Scale - Vector3.new(scaler2*bonuspeed, scaler2*bonuspeed, scaler2*bonuspeed) | |
1760 | end | |
1761 | rng:Destroy() | |
1762 | end)) | |
1763 | end | |
1764 | ||
1765 | ||
1766 | local Effects = { | |
1767 | BanishEffects = function(chance) | |
1768 | spawn(function() | |
1769 | if chance > 100 then | |
1770 | chance = 100 | |
1771 | end | |
1772 | if math.random(chance,100) == chance then | |
1773 | local magik = Instance.new("Part", Torso) | |
1774 | magik.Anchored = true | |
1775 | magik.Locked = true | |
1776 | magik.Material = "Neon" | |
1777 | magik.FormFactor = "Custom" | |
1778 | magik.Size = Vector3.new(1.2, 1.2, 1.2) | |
1779 | magik.TopSurface = "Smooth" | |
1780 | magik.BottomSurface = "Smooth" | |
1781 | magik.Transparency = 0 | |
1782 | magik.CanCollide = false | |
1783 | ||
1784 | local cl = math.random(50,150) | |
1785 | magik.Color = RGBColor(cl, cl, cl) | |
1786 | ||
1787 | table.insert(GetItems, magik) | |
1788 | magik.Touched:connect(function(Hit) | |
1789 | Hurt(Hit,math.random(5,10),Me) | |
1790 | end) | |
1791 | local mr = math.rad | |
1792 | local rnx,rny,rnz = mr(rndRange(20)),mr(rndRange(20)),mr(rndRange(20)) | |
1793 | local cf = Torso.CFrame * CFrame.new(math.random(-5,5), -.5, math.random(-5,5)) * CFrame.Angles(rnx,rny,rnz) | |
1794 | magik.CFrame = cf | |
1795 | Debris:AddItem(magik, math.random(10,50)) | |
1796 | while true do | |
1797 | for i = 0, 1, .025 do | |
1798 | local newTrans = lerp(0.25, 0.5, i) | |
1799 | local ns = lerp(1,1.2,i) | |
1800 | magik.Transparency = newTrans | |
1801 | magik.Size = Vector3.new(ns,ns+math.random(5,7),ns) | |
1802 | magik.CFrame = cf | |
1803 | swait() | |
1804 | end | |
1805 | ||
1806 | end | |
1807 | end | |
1808 | end) | |
1809 | end; | |
1810 | ||
1811 | ErrorEffects = function(chance) | |
1812 | spawn(function() | |
1813 | if chance > 100 then | |
1814 | chance = 100 | |
1815 | end | |
1816 | if math.random(chance,100) == chance then | |
1817 | local iscreen = Instance.new("Model",Character) | |
1818 | local screenpaids = CreatePart(iscreen,Enum.Material.Air,0,0,false,false,RGBColor(255,255,255),"Error",Vector3.new(4,3,0.2)) | |
1819 | local weldscreen = CreateWeld(screenpaids,screenpaids,HumanoidRootPart,CFrame.fromEulerAnglesXYZ(0,0,0)*CFrame.new(math.random(-5,5),math.random(-2,2),math.random(-5,5)),CFrame.new(0,0,0)) | |
1820 | ||
1821 | local txt = Instance.new("BillboardGui", screenpaids) | |
1822 | txt.Adornee = nil | |
1823 | txt.Name = "NameDetect" | |
1824 | txt.Size = UDim2.new(4, 0, 1.2, 0) | |
1825 | txt.StudsOffset = Vector3.new(0,0,0) | |
1826 | txt.MaxDistance = 0 | |
1827 | local text = Instance.new("TextLabel", txt) | |
1828 | text.Size = UDim2.new(1, 0, 1, 0) | |
1829 | text.FontSize = "Size8" | |
1830 | text.TextScaled = true | |
1831 | text.TextTransparency = 0 | |
1832 | text.BackgroundTransparency = 1 | |
1833 | text.TextTransparency = 0 | |
1834 | text.TextStrokeTransparency = 0 | |
1835 | text.Font = "Code" | |
1836 | text.TextStrokeColor3 = RGBColor(255,0,0) | |
1837 | text.TextColor3 = RGBColor(0,0,0) | |
1838 | text.Text = "Error" | |
1839 | ||
1840 | swait() | |
1841 | weldscreen:Destroy() | |
1842 | screenpaids.Anchored = true | |
1843 | ||
1844 | spawn(function() | |
1845 | local randevent = math.random(1,3) | |
1846 | if randevent == 1 then | |
1847 | for i = 1, math.random(10,20) do | |
1848 | text.TextStrokeColor3 = RGBColor(math.random(175,255),0,0) | |
1849 | text.TextColor3 = RGBColor(math.random(10,75),0,0) | |
1850 | text.Text = "ErroR" | |
1851 | swait(math.random(0,7)) | |
1852 | text.Text = "ERROr" | |
1853 | swait(math.random(0,7)) | |
1854 | text.Text = "eRrOR" | |
1855 | swait(math.random(0,7)) | |
1856 | text.Text = "ERroR" | |
1857 | swait(math.random(0,7)) | |
1858 | text.Text = "eRROR" | |
1859 | swait(math.random(0,7)) | |
1860 | text.Text = "erROr" | |
1861 | swait(math.random(0,7)) | |
1862 | text.Text = "ERrOr" | |
1863 | wait(1/30) | |
1864 | end | |
1865 | end | |
1866 | if randevent == 2 then | |
1867 | for i = 1, math.random(10,20) do | |
1868 | text.TextStrokeColor3 = RGBColor(math.random(175,255),0,0) | |
1869 | text.TextColor3 = RGBColor(math.random(10,75),0,0) | |
1870 | text.Text = "ErROR" | |
1871 | swait(math.random(0,7)) | |
1872 | text.Text = "ERrOr" | |
1873 | swait(math.random(0,7)) | |
1874 | text.Text = "eRrOR" | |
1875 | swait(math.random(0,7)) | |
1876 | text.Text = "ERROR" | |
1877 | swait(math.random(0,7)) | |
1878 | text.Text = "eRROR" | |
1879 | swait(math.random(0,7)) | |
1880 | text.Text = "ERrOr" | |
1881 | swait(math.random(0,7)) | |
1882 | text.Text = "eRROr" | |
1883 | wait(1/30) | |
1884 | end | |
1885 | end | |
1886 | if randevent == 3 then | |
1887 | for i = 1, math.random(10,20) do | |
1888 | text.TextStrokeColor3 = RGBColor(math.random(175,255),0,0) | |
1889 | text.TextColor3 = RGBColor(math.random(10,75),0,0) | |
1890 | text.Text = "ErROR" | |
1891 | swait(math.random(0,7)) | |
1892 | text.Text = "ERrOr" | |
1893 | swait(math.random(0,7)) | |
1894 | text.Text = "eRrOR" | |
1895 | swait(math.random(0,7)) | |
1896 | text.Text = "ERroR" | |
1897 | swait(math.random(0,7)) | |
1898 | text.Text = "eRROR" | |
1899 | swait(math.random(0,7)) | |
1900 | text.Text = "ERrOR" | |
1901 | swait(math.random(0,7)) | |
1902 | text.Text = "eRrOR" | |
1903 | wait(1/30) | |
1904 | end | |
1905 | end | |
1906 | end) | |
1907 | ||
1908 | spawn(function() wait(math.random(1,3)) iscreen:Destroy() end) | |
1909 | table.insert(GetItems, iscreen) | |
1910 | end | |
1911 | end) | |
1912 | end; | |
1913 | } | |
1914 | ||
1915 | function clerp(a,b,t) | |
1916 | local qa = {QuaternionFromCFrame(a)} | |
1917 | local qb = {QuaternionFromCFrame(b)} | |
1918 | local ax, ay, az = a.x, a.y, a.z | |
1919 | local bx, by, bz = b.x, b.y, b.z | |
1920 | local _t = 1-t | |
1921 | return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t)) | |
1922 | end | |
1923 | ||
1924 | function QuaternionFromCFrame(cf) | |
1925 | local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components() | |
1926 | local trace = m00 + m11 + m22 | |
1927 | if trace > 0 then | |
1928 | local s = math.sqrt(1 + trace) | |
1929 | local recip = 0.5/s | |
1930 | return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5 | |
1931 | else | |
1932 | local i = 0 | |
1933 | if m11 > m00 then | |
1934 | i = 1 | |
1935 | end | |
1936 | if m22 > (i == 0 and m00 or m11) then | |
1937 | i = 2 | |
1938 | end | |
1939 | if i == 0 then | |
1940 | local s = math.sqrt(m00-m11-m22+1) | |
1941 | local recip = 0.5/s | |
1942 | return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip | |
1943 | elseif i == 1 then | |
1944 | local s = math.sqrt(m11-m22-m00+1) | |
1945 | local recip = 0.5/s | |
1946 | return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip | |
1947 | elseif i == 2 then | |
1948 | local s = math.sqrt(m22-m00-m11+1) | |
1949 | local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip | |
1950 | end | |
1951 | end | |
1952 | end | |
1953 | ||
1954 | function QuaternionToCFrame(px, py, pz, x, y, z, w) | |
1955 | local xs, ys, zs = x + x, y + y, z + z | |
1956 | local wx, wy, wz = w*xs, w*ys, w*zs | |
1957 | local xx = x*xs | |
1958 | local xy = x*ys | |
1959 | local xz = x*zs | |
1960 | local yy = y*ys | |
1961 | local yz = y*zs | |
1962 | local zz = z*zs | |
1963 | 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)) | |
1964 | end | |
1965 | ||
1966 | function QuaternionSlerp(a, b, t) | |
1967 | local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4] | |
1968 | local startInterp, finishInterp; | |
1969 | if cosTheta >= 0.0001 then | |
1970 | if (1 - cosTheta) > 0.0001 then | |
1971 | local theta = math.acos(cosTheta) | |
1972 | local invSinTheta = 1/math.sin(theta) | |
1973 | startInterp = math.sin((1-t)*theta)*invSinTheta | |
1974 | finishInterp = math.sin(t*theta)*invSinTheta | |
1975 | else | |
1976 | startInterp = 1-t | |
1977 | finishInterp = t | |
1978 | end | |
1979 | else | |
1980 | if (1+cosTheta) > 0.0001 then | |
1981 | local theta = math.acos(-cosTheta) | |
1982 | local invSinTheta = 1/math.sin(theta) | |
1983 | startInterp = math.sin((t-1)*theta)*invSinTheta | |
1984 | finishInterp = math.sin(t*theta)*invSinTheta | |
1985 | else | |
1986 | startInterp = t-1 | |
1987 | finishInterp = t | |
1988 | end | |
1989 | end | |
1990 | 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 | |
1991 | end | |
1992 | ||
1993 | function swait(num) | |
1994 | if num==0 or num==nil then | |
1995 | game:GetService('RunService').Heartbeat:wait() | |
1996 | else | |
1997 | for i=0,num do | |
1998 | game:GetService('RunService').Heartbeat:wait() | |
1999 | end | |
2000 | end | |
2001 | end | |
2002 | ||
2003 | function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants | |
2004 | return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore) | |
2005 | end | |
2006 | ||
2007 | --//=========================================\\ | |
2008 | --|| Animation&Stance; | |
2009 | --\\=========================================// | |
2010 | ||
2011 | RW = Torso:FindFirstChild("Weld Right Shoulder") or Instance.new("Weld",Torso) | |
2012 | LW = Torso:FindFirstChild("Weld Left Shoulder") or Instance.new("Weld",Torso) | |
2013 | RH = Torso:FindFirstChild("Weld Right Hip") or Instance.new("Weld",Torso) | |
2014 | LH = Torso:FindFirstChild("Weld Left Hip") or Instance.new("Weld",Torso) | |
2015 | HW = Torso:FindFirstChild("Weld Neck") or Instance.new("Weld",Torso) | |
2016 | ||
2017 | RW.Name = "Weld Right Shoulder" | |
2018 | RW.Part0 = Torso | |
2019 | RW.Part1 = RightArm | |
2020 | RW.C0 = cf(1.5, 0.5, 0) | |
2021 | RW.C1 = cf(0, 0.5, 0) | |
2022 | ||
2023 | LW.Name = "Weld Left Shoulder" | |
2024 | LW.Part0 = Torso | |
2025 | LW.Part1 = LeftArm | |
2026 | LW.C0 = cf(-1.5, 0.5, 0) | |
2027 | LW.C1 = cf(0, 0.5, 0) | |
2028 | ||
2029 | RH.Name = "Weld Right Hip" | |
2030 | RH.Part0 = Torso | |
2031 | RH.Part1 = RightLeg | |
2032 | RH.C0 = cf(0.5, -2, 0) | |
2033 | RH.C1 = cf(0, 0, 0) | |
2034 | ||
2035 | LH.Name = "Weld Left Hip" | |
2036 | LH.Part0 = Torso | |
2037 | LH.Part1 = LeftLeg | |
2038 | LH.C0 = cf(-0.5, -2, 0) | |
2039 | LH.C1 = cf(0, 0, 0) | |
2040 | ||
2041 | HW.Name = "Weld Neck" | |
2042 | HW.Part0 = Torso | |
2043 | HW.Part1 = Head | |
2044 | HW.C0 = cf(0, 1.5, 0) | |
2045 | HW.C1 = cf(0, 0, 0) | |
2046 | ||
2047 | --[[-- Origial CFrame | |
2048 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0) * angles(math.rad(0),math.rad(0),math.rad(0)),.1) | |
2049 | HW.C0 = clerp(HW.C0,necko * angles(math.rad(0),math.rad(0),math.rad(0)),.3) | |
2050 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0),math.rad(0),math.rad(0)), .1) | |
2051 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0),math.rad(0),math.rad(0)), .1) | |
2052 | RH.C0 = clerp(RH.C0, cf(0.5, -2, 0) * angles(math.rad(0),math.rad(0),math.rad(0)), .1) | |
2053 | LH.C0 = clerp(LH.C0, cf(-0.5, -2, 0) * angles(math.rad(0),math.rad(0),math.rad(0)), .1) | |
2054 | --]] | |
2055 | ||
2056 | coroutine.resume(coroutine.create(function() | |
2057 | while true do | |
2058 | swait() | |
2059 | sine = sine + change | |
2060 | local torvel = (HumanoidRootPart.Velocity*Vector3.new(1,0,1)).magnitude | |
2061 | local hitfloor,posfloor = rayCast(HumanoidRootPart.Position,(CFrame.new(HumanoidRootPart.Position,HumanoidRootPart.Position - Vector3.new(0,1,0))).lookVector,4,Character) | |
2062 | -- No Animation When Speical Events Executed | |
2063 | if Debounce_Animation == false then | |
2064 | -- Sans_UT Mode | |
2065 | if ModeOfSans == 1 or ModeOfSans == 7 then | |
2066 | if HumanoidRootPart.Velocity.y > 1 and hitfloor == nil then | |
2067 | animpose = "Jumping" | |
2068 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0) * angles(math.rad(0),math.rad(0),math.rad(0)),.1) | |
2069 | HW.C0 = clerp(HW.C0,necko * angles(math.rad(20),math.rad(0),math.rad(0)),.3) | |
2070 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(30)), 0.3) | |
2071 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(-30)), 0.3) | |
2072 | RH.C0 = clerp(RH.C0, cf(0.5, -2, 0) * angles(math.rad(0),math.rad(0),math.rad(0)),.1) | |
2073 | LH.C0 = clerp(LH.C0, cf(-0.5, -2, 0) * angles(math.rad(0),math.rad(0),math.rad(0)),.1) | |
2074 | end | |
2075 | if torvel < 1 and hitfloor ~=nil then | |
2076 | animpose = "Standing" | |
2077 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0) * angles(math.rad(0),math.rad(0),math.rad(0)),.1) | |
2078 | HW.C0 = clerp(HW.C0,necko * angles(math.rad(-5+2*math.cos(sine/16)),math.rad(0),math.rad(0)),.3) | |
2079 | RW.C0 = clerp(RW.C0, CFrame.new(0.95, 0.4+0.1*math.cos(sine/16), 0.4) * angles(math.rad(-30), math.rad(0), math.rad(-35+3*math.cos(sine/16))), .1) | |
2080 | LW.C0 = clerp(LW.C0, CFrame.new(-0.95, 0.4+0.1*math.cos(sine/16), 0.4) * angles(math.rad(-30), math.rad(0), math.rad(35-3*math.cos(sine/16))), .1) | |
2081 | RH.C0 = clerp(RH.C0, cf(0.5, -2, 0) * angles(math.rad(0),math.rad(0),math.rad(0)),.1) | |
2082 | LH.C0 = clerp(LH.C0, cf(-0.5, -2, 0) * angles(math.rad(0),math.rad(0),math.rad(0)),.1) | |
2083 | end | |
2084 | if HumanoidRootPart.Velocity.y < -1 and hitfloor == nil then | |
2085 | animpose = "Freefalling" | |
2086 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0) * angles(math.rad(0),math.rad(0),math.rad(0)),.1) | |
2087 | HW.C0 = clerp(HW.C0,necko * angles(math.rad(-20),math.rad(0),math.rad(0)),.3) | |
2088 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-30), math.rad(0), math.rad(50)), 0.2) | |
2089 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-30), math.rad(0), math.rad(-50)), 0.2) | |
2090 | RH.C0 = clerp(RH.C0, cf(0.5, -2, 0) * angles(math.rad(0),math.rad(0),math.rad(0)),.1) | |
2091 | LH.C0 = clerp(LH.C0, cf(-0.5, -2, 0) * angles(math.rad(0),math.rad(0),math.rad(0)),.1) | |
2092 | end | |
2093 | if torvel >= 1 and hitfloor ~=nil then | |
2094 | animpose = "Walking" | |
2095 | val = torvel * 0.175 | |
2096 | change = val + 0.75 | |
2097 | RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0-0.1*math.cos(sine/14)) * angles(math.rad(0),math.rad(0),math.rad(0-5*math.cos(sine/28))),.2) | |
2098 | HW.C0 = clerp(HW.C0, necko * angles(math.rad(-10-3*math.cos(sine/28)),math.rad(0),math.rad(-2*math.cos(sine/28))),.2) | |
2099 | RW.C0=clerp(RW.C0,cf(1.5,0.5,0) * angles(math.rad(0 - 25 * math.cos(sine/28)),math.rad(0),math.rad(10-10*math.cos(sine/28))),.2) | |
2100 | LW.C0=clerp(LW.C0,cf(-1.5,0.5,0) * angles(math.rad(0 + 25 * math.cos(sine/28)),math.rad(0),math.rad(-10+10*math.cos(sine/28))),.2) | |
2101 | RH.C0 = clerp(RH.C0, cf(0.5, -2, -0-0.25*math.cos(sine/28)) * angles(math.rad(0),math.rad(0),math.rad(0)) * angles(math.rad(0+10*math.cos(sine/28)),math.rad(0),math.rad(0)),.2) | |
2102 | LH.C0 = clerp(LH.C0, cf(-0.5, -2,-0+0.25*math.cos(sine/28)) * angles(math.rad(0),math.rad(0),math.rad(0)) * angles(math.rad(0-10*math.cos(sine/28)),math.rad(0),math.rad(0)),.2) | |
2103 | end | |
2104 | end | |
2105 | ||
2106 | -- Killer_Sans Mode | |
2107 | if ModeOfSans == 2 then | |
2108 | if HumanoidRootPart.Velocity.y > 1 and hitfloor == nil then | |
2109 | animpose = "Jumping" | |
2110 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0) * angles(math.rad(0),math.rad(0),math.rad(0)),.1) | |
2111 | HW.C0 = clerp(HW.C0,necko * angles(math.rad(20),math.rad(0),math.rad(0)),.3) | |
2112 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(30)), 0.3) | |
2113 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(-30)), 0.3) | |
2114 | RH.C0 = clerp(RH.C0, cf(0.5, -2, 0) * angles(math.rad(0),math.rad(0),math.rad(0)),.1) | |
2115 | LH.C0 = clerp(LH.C0, cf(-0.5, -2, 0) * angles(math.rad(0),math.rad(0),math.rad(0)),.1) | |
2116 | end | |
2117 | if torvel < 1 and hitfloor ~=nil then | |
2118 | animpose = "Standing" | |
2119 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0) * angles(math.rad(0),math.rad(0),math.rad(0)),.1) | |
2120 | HW.C0 = clerp(HW.C0,necko * angles(math.rad(-20+2*math.cos(sine/16)),math.rad(0),math.rad(0)),.3) | |
2121 | RW.C0 = clerp(RW.C0, CFrame.new(1.1, 0.4+0.1*math.cos(sine/16), -0.2) * angles(math.rad(-35),math.rad(0),math.rad(190)), .1) | |
2122 | LW.C0 = clerp(LW.C0, CFrame.new(-0.95, 0.4+0.1*math.cos(sine/16), 0.4) * angles(math.rad(-30), math.rad(0), math.rad(35-3*math.cos(sine/16))), .1) | |
2123 | RH.C0 = clerp(RH.C0, cf(0.5, -2, 0) * angles(math.rad(0),math.rad(0),math.rad(0)),.1) | |
2124 | LH.C0 = clerp(LH.C0, cf(-0.5, -2, 0) * angles(math.rad(0),math.rad(0),math.rad(0)),.1) | |
2125 | end | |
2126 | if HumanoidRootPart.Velocity.y < -1 and hitfloor == nil then | |
2127 | animpose = "Freefalling" | |
2128 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0) * angles(math.rad(0),math.rad(0),math.rad(0)),.1) | |
2129 | HW.C0 = clerp(HW.C0,necko * angles(math.rad(-20),math.rad(0),math.rad(0)),.3) | |
2130 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-30), math.rad(0), math.rad(50)), 0.2) | |
2131 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-30), math.rad(0), math.rad(-50)), 0.2) | |
2132 | RH.C0 = clerp(RH.C0, cf(0.5, -2, 0) * angles(math.rad(0),math.rad(0),math.rad(0)),.1) | |
2133 | LH.C0 = clerp(LH.C0, cf(-0.5, -2, 0) * angles(math.rad(0),math.rad(0),math.rad(0)),.1) | |
2134 | end | |
2135 | if torvel >= 1 and hitfloor ~=nil then | |
2136 | val = torvel * 0.175 | |
2137 | change = val + 0.75 | |
2138 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0-0.1*math.cos(sine/16)) * angles(math.rad(5),math.rad(0),math.rad(0-5*math.cos(sine/12))),.1) | |
2139 | HW.C0 = clerp(HW.C0,necko * angles(math.rad(-10-3*math.cos(sine/4)),math.rad(0),math.rad(-2*math.cos(sine/2))),.2) | |
2140 | RW.C0 = clerp(RW.C0, cf(1.5,0.5,0) * angles(math.rad(10-15*math.cos(sine/32)),math.rad(0+2.5*math.cos(sine/0.123)),math.rad(5+2.5*math.cos(sine/0.6))),.1) | |
2141 | LW.C0 = clerp(LW.C0, cf(-1.5,0.5,0) * angles(math.rad(10+15*math.cos(sine/32)),math.rad(0+2.5*math.cos(sine/0.664)),math.rad(-5+2.5*math.cos(sine/0.23))),.1) | |
2142 | RH.C0 = clerp(RH.C0, cf(0.5, -2, -0.15-0.25*math.cos(sine/32)) * angles(math.rad(0),math.rad(0),math.rad(0)) * angles(math.rad(5+10*math.cos(sine/32)),math.rad(0),math.rad(0)),.2) | |
2143 | LH.C0 = clerp(LH.C0, cf(-0.5, -2,-0.15+0.25*math.cos(sine/32)) * angles(math.rad(0),math.rad(0),math.rad(0)) * angles(math.rad(5-10*math.cos(sine/32)),math.rad(0),math.rad(0)),.2) | |
2144 | end | |
2145 | end | |
2146 | ||
2147 | -- Ink_Sans Mode | |
2148 | if ModeOfSans == 3 then | |
2149 | if HumanoidRootPart.Velocity.y > 1 and hitfloor == nil then | |
2150 | animpose = "Jumping" | |
2151 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0) * angles(math.rad(0),math.rad(0),math.rad(0)),.1) | |
2152 | HW.C0 = clerp(HW.C0,necko * angles(math.rad(20),math.rad(0),math.rad(0)),.3) | |
2153 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(30)), 0.3) | |
2154 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(-30)), 0.3) | |
2155 | RH.C0 = clerp(RH.C0, cf(0.5, -2, 0) * angles(math.rad(0),math.rad(0),math.rad(0)),.1) | |
2156 | LH.C0 = clerp(LH.C0, cf(-0.5, -2, 0) * angles(math.rad(0),math.rad(0),math.rad(0)),.1) | |
2157 | end | |
2158 | if torvel < 1 and hitfloor ~=nil then | |
2159 | change = 1 | |
2160 | animpose = "Standing" | |
2161 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,-0.025+0.025*math.cos(sine/18)) * angles(math.rad(0),math.rad(0),math.rad(0)),.1) | |
2162 | HW.C0 = clerp(HW.C0,necko * angles(math.rad(-5+2*math.cos(sine/16)),math.rad(0),math.rad(0)),.3) | |
2163 | RW.C0 = clerp(RW.C0, CFrame.new(1-0.175*math.cos(sine/18), 0.5+0.1*math.cos(sine/18), 0.1) * angles(math.rad(-5), math.rad(0), math.rad(-30+5*math.cos(sine/18))), .1) | |
2164 | LW.C0 = clerp(LW.C0, CFrame.new(-1+0.175*math.cos(sine/18), 0.5+0.1*math.cos(sine/18), 0.1) * angles(math.rad(-5), math.rad(0), math.rad(30-5*math.cos(sine/18))), .1) | |
2165 | RH.C0 = clerp(RH.C0, cf(0.6, -2+0.05*math.cos(sine/18), -0.1) * angles(math.rad(5-1*math.cos(sine/18)),math.rad(0),math.rad(5)),.1) | |
2166 | LH.C0 = clerp(LH.C0, cf(-0.575+0.07*math.cos(sine/18), -2+0.05*math.cos(sine/18), 0) * angles(math.rad(0),math.rad(0),math.rad(-3+1*math.cos(sine/18))),.1) | |
2167 | end | |
2168 | if HumanoidRootPart.Velocity.y < -1 and hitfloor == nil then | |
2169 | animpose = "Freefalling" | |
2170 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0) * angles(math.rad(0),math.rad(0),math.rad(0)),.1) | |
2171 | HW.C0 = clerp(HW.C0,necko * angles(math.rad(-20),math.rad(0),math.rad(0)),.3) | |
2172 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-30), math.rad(0), math.rad(50)), 0.2) | |
2173 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-30), math.rad(0), math.rad(-50)), 0.2) | |
2174 | RH.C0 = clerp(RH.C0, cf(0.5, -2, 0) * angles(math.rad(0),math.rad(0),math.rad(0)),.1) | |
2175 | LH.C0 = clerp(LH.C0, cf(-0.5, -2, 0) * angles(math.rad(0),math.rad(0),math.rad(0)),.1) | |
2176 | end | |
2177 | if torvel >= 1 and hitfloor ~=nil then | |
2178 | animpose = "Walking" | |
2179 | val = torvel * 0.175 | |
2180 | change = val + 0.75 | |
2181 | RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0-0.1*math.cos(sine/14)) * angles(math.rad(0),math.rad(0),math.rad(0-5*math.cos(sine/28))),.2) | |
2182 | HW.C0 = clerp(HW.C0, necko * angles(math.rad(-10-3*math.cos(sine/28)),math.rad(0),math.rad(-2*math.cos(sine/28))),.2) | |
2183 | RW.C0=clerp(RW.C0,cf(1.5,0.5,0) * angles(math.rad(0 - 25 * math.cos(sine/28)),math.rad(0),math.rad(10-10*math.cos(sine/28))),.2) | |
2184 | LW.C0=clerp(LW.C0,cf(-1.5,0.5,0) * angles(math.rad(0 + 25 * math.cos(sine/28)),math.rad(0),math.rad(-10+10*math.cos(sine/28))),.2) | |
2185 | RH.C0 = clerp(RH.C0, cf(0.5, -2, -0-0.25*math.cos(sine/28)) * angles(math.rad(0),math.rad(0),math.rad(0)) * angles(math.rad(0+10*math.cos(sine/28)),math.rad(0),math.rad(0)),.2) | |
2186 | LH.C0 = clerp(LH.C0, cf(-0.5, -2,-0+0.25*math.cos(sine/28)) * angles(math.rad(0),math.rad(0),math.rad(0)) * angles(math.rad(0-10*math.cos(sine/28)),math.rad(0),math.rad(0)),.2) | |
2187 | end | |
2188 | end | |
2189 | ||
2190 | -- Error_Sans Mode | |
2191 | if ModeOfSans == 4 then | |
2192 | Effects.ErrorEffects(92) | |
2193 | if HumanoidRootPart.Velocity.y > 1 and hitfloor == nil then | |
2194 | animpose = "Jumping" | |
2195 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0) * angles(math.rad(0),math.rad(0),math.rad(0)),.1) | |
2196 | HW.C0 = clerp(HW.C0,necko * angles(math.rad(20),math.rad(0),math.rad(0)),.3) | |
2197 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(30)), 0.3) | |
2198 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(-30)), 0.3) | |
2199 | RH.C0 = clerp(RH.C0, cf(0.5, -2, 0) * angles(math.rad(0),math.rad(0),math.rad(0)),.1) | |
2200 | LH.C0 = clerp(LH.C0, cf(-0.5, -2, 0) * angles(math.rad(0),math.rad(0),math.rad(0)),.1) | |
2201 | end | |
2202 | if torvel < 1 and hitfloor ~=nil then | |
2203 | change = 1 | |
2204 | animpose = "Standing" | |
2205 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,-0.025+0.025*math.cos(sine/18)) * angles(math.rad(0),math.rad(0),math.rad(0)),.1) | |
2206 | HW.C0 = clerp(HW.C0,necko * angles(math.rad(-5+2*math.cos(sine/16)),math.rad(0),math.rad(0)),.3) | |
2207 | RW.C0 = clerp(RW.C0, CFrame.new(1-0.175*math.cos(sine/18), 0.5+0.1*math.cos(sine/18), 0.1) * angles(math.rad(-5), math.rad(0), math.rad(-30+5*math.cos(sine/18))), .1) | |
2208 | LW.C0 = clerp(LW.C0, CFrame.new(-1+0.175*math.cos(sine/18), 0.5+0.1*math.cos(sine/18), 0.1) * angles(math.rad(-5), math.rad(0), math.rad(30-5*math.cos(sine/18))), .1) | |
2209 | RH.C0 = clerp(RH.C0, cf(0.6, -2+0.05*math.cos(sine/18), -0.1) * angles(math.rad(5-1*math.cos(sine/18)),math.rad(0),math.rad(5)),.1) | |
2210 | LH.C0 = clerp(LH.C0, cf(-0.575+0.07*math.cos(sine/18), -2+0.05*math.cos(sine/18), 0) * angles(math.rad(0),math.rad(0),math.rad(-3+1*math.cos(sine/18))),.1) | |
2211 | end | |
2212 | if HumanoidRootPart.Velocity.y < -1 and hitfloor == nil then | |
2213 | animpose = "Freefalling" | |
2214 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0) * angles(math.rad(0),math.rad(0),math.rad(0)),.1) | |
2215 | HW.C0 = clerp(HW.C0,necko * angles(math.rad(-20),math.rad(0),math.rad(0)),.3) | |
2216 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-30), math.rad(0), math.rad(50)), 0.2) | |
2217 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-30), math.rad(0), math.rad(-50)), 0.2) | |
2218 | RH.C0 = clerp(RH.C0, cf(0.5, -2, 0) * angles(math.rad(0),math.rad(0),math.rad(0)),.1) | |
2219 | LH.C0 = clerp(LH.C0, cf(-0.5, -2, 0) * angles(math.rad(0),math.rad(0),math.rad(0)),.1) | |
2220 | end | |
2221 | if torvel >= 1 and hitfloor ~=nil then | |
2222 | animpose = "Walking" | |
2223 | val = torvel * 0.175 | |
2224 | change = val + 0.75 | |
2225 | RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0-0.1*math.cos(sine/14)) * angles(math.rad(0),math.rad(0),math.rad(0-5*math.cos(sine/28))),.2) | |
2226 | HW.C0 = clerp(HW.C0, necko * angles(math.rad(-10-3*math.cos(sine/28)),math.rad(0),math.rad(-2*math.cos(sine/28))),.2) | |
2227 | RW.C0=clerp(RW.C0,cf(1.5,0.5,0) * angles(math.rad(0 - 25 * math.cos(sine/28)),math.rad(0),math.rad(10-10*math.cos(sine/28))),.2) | |
2228 | LW.C0=clerp(LW.C0,cf(-1.5,0.5,0) * angles(math.rad(0 + 25 * math.cos(sine/28)),math.rad(0),math.rad(-10+10*math.cos(sine/28))),.2) | |
2229 | RH.C0 = clerp(RH.C0, cf(0.5, -2, -0-0.25*math.cos(sine/28)) * angles(math.rad(0),math.rad(0),math.rad(0)) * angles(math.rad(0+10*math.cos(sine/28)),math.rad(0),math.rad(0)),.2) | |
2230 | LH.C0 = clerp(LH.C0, cf(-0.5, -2,-0+0.25*math.cos(sine/28)) * angles(math.rad(0),math.rad(0),math.rad(0)) * angles(math.rad(0-10*math.cos(sine/28)),math.rad(0),math.rad(0)),.2) | |
2231 | end | |
2232 | end | |
2233 | ||
2234 | -- Banish_Sans Mode | |
2235 | if ModeOfSans == 5 then | |
2236 | if HumanoidRootPart.Velocity.y > 1 and hitfloor == nil then | |
2237 | animpose = "Jumping" | |
2238 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0) * angles(math.rad(0),math.rad(0),math.rad(0)),.1) | |
2239 | HW.C0 = clerp(HW.C0,necko * angles(math.rad(20),math.rad(0),math.rad(0)),.3) | |
2240 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(30)), 0.1) | |
2241 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(-30)), 0.1) | |
2242 | RH.C0 = clerp(RH.C0, cf(0.5, -2, 0) * angles(math.rad(0),math.rad(0),math.rad(0)),.1) | |
2243 | LH.C0 = clerp(LH.C0, cf(-0.5, -2, 0) * angles(math.rad(0),math.rad(0),math.rad(0)),.1) | |
2244 | end | |
2245 | if torvel < 1 and hitfloor ~=nil then | |
2246 | Effects.BanishEffects(60) | |
2247 | animpose = "Standing" | |
2248 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0) * angles(math.rad(10),math.rad(0),math.rad(0)),.1) | |
2249 | HW.C0 = clerp(HW.C0, cf(0,1.5,-0.25) * angles(math.rad(-20+2*math.cos(sine/16)),math.rad(0),math.rad(0)),.3) | |
2250 | RW.C0 = clerp(RW.C0, CFrame.new(0.95, 0.5+0.1*math.cos(sine/16), -0.6) * angles(math.rad(140), math.rad(0), math.rad(-35+1*math.cos(sine/16))), .1) | |
2251 | LW.C0 = clerp(LW.C0, CFrame.new(-0.95, 0.5+0.1*math.cos(sine/16), -0.6) * angles(math.rad(140), math.rad(0), math.rad(35-1*math.cos(sine/16))), .1) | |
2252 | RH.C0 = clerp(RH.C0, cf(0.5, -2, -0.2) * angles(math.rad(10),math.rad(0),math.rad(0)),.1) | |
2253 | LH.C0 = clerp(LH.C0, cf(-0.5, -2, -0.2) * angles(math.rad(10),math.rad(0),math.rad(0)),.1) | |
2254 | end | |
2255 | if HumanoidRootPart.Velocity.y < -1 and hitfloor == nil then | |
2256 | animpose = "Freefalling" | |
2257 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0) * angles(math.rad(0),math.rad(0),math.rad(0)),.1) | |
2258 | HW.C0 = clerp(HW.C0,necko * angles(math.rad(-20),math.rad(0),math.rad(0)),.3) | |
2259 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-30), math.rad(0), math.rad(50)), 0.2) | |
2260 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-30), math.rad(0), math.rad(-50)), 0.2) | |
2261 | RH.C0 = clerp(RH.C0, cf(0.5, -2, 0) * angles(math.rad(0),math.rad(0),math.rad(0)),.1) | |
2262 | LH.C0 = clerp(LH.C0, cf(-0.5, -2, 0) * angles(math.rad(0),math.rad(0),math.rad(0)),.1) | |
2263 | end | |
2264 | if torvel >= 1 and hitfloor ~=nil then | |
2265 | Effects.BanishEffects(70) | |
2266 | animpose = "Walking" | |
2267 | val = torvel * 0.175 | |
2268 | change = val + 0.75 | |
2269 | RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0-0.1*math.cos(sine/14)) * angles(math.rad(0),math.rad(0),math.rad(0-5*math.cos(sine/28))),.2) | |
2270 | HW.C0 = clerp(HW.C0, cf(0,1.5,-0.25) * angles(math.rad(-20+2*math.cos(sine/16)),math.rad(0),math.rad(0)),.3) | |
2271 | RW.C0 = clerp(RW.C0, CFrame.new(0.95, 0.5+0.1*math.cos(sine/16), -0.6) * angles(math.rad(140), math.rad(0), math.rad(-35+1*math.cos(sine/16))), .1) | |
2272 | LW.C0 = clerp(LW.C0, CFrame.new(-0.95, 0.5+0.1*math.cos(sine/16), -0.6) * angles(math.rad(140), math.rad(0), math.rad(35-1*math.cos(sine/16))), .1) | |
2273 | RH.C0 = clerp(RH.C0, cf(0.5, -2, -0-0.25*math.cos(sine/28)) * angles(math.rad(0),math.rad(0),math.rad(0)) * angles(math.rad(0+10*math.cos(sine/28)),math.rad(0),math.rad(0)),.2) | |
2274 | LH.C0 = clerp(LH.C0, cf(-0.5, -2,-0+0.25*math.cos(sine/28)) * angles(math.rad(0),math.rad(0),math.rad(0)) * angles(math.rad(0-10*math.cos(sine/28)),math.rad(0),math.rad(0)),.2) | |
2275 | end | |
2276 | end | |
2277 | ||
2278 | --[[-- Fly | |
2279 | if PlayerMode == "Floating" then | |
2280 | if torvel >= 2 then | |
2281 | animpose = "Flying" | |
2282 | change = 2 | |
2283 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0.5*math.cos(sine/40)) * angles(math.rad(10),math.rad(0),math.rad(0)),.2) | |
2284 | HW.C0 = clerp(HW.C0, CFrame.new(0, 1.5, 0) * angles(math.rad(-10-4*math.cos(sine/40)),math.rad(0),math.rad(0)),.3) | |
2285 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.60+0.10*math.cos(sine/40), 0) * angles(math.rad(0), math.rad(0), math.rad(12.5+5*math.cos(sine/40))), 0.2) | |
2286 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.60+0.10*math.cos(sine/40), 0) * angles(math.rad(0), math.rad(0), math.rad(-12.5-5*math.cos(sine/40))), 0.2) | |
2287 | RH.C0 = clerp(RH.C0, cf(0.6,-2-0.05*math.cos(sine/40),0) * angles(math.rad(0),math.rad(0),math.rad(5+0.5*math.cos(sine/40))),.1) | |
2288 | LH.C0 = clerp(LH.C0, cf(-0.6,-2-0.05*math.cos(sine/40),0) * angles(math.rad(0),math.rad(0),math.rad(-5-0.5*math.cos(sine/40))),.1) | |
2289 | end | |
2290 | if torvel <= 2 then | |
2291 | animpose = "NotFlying" | |
2292 | change = 2.5 | |
2293 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0.5*math.cos(sine/40)) * angles(math.rad(0),math.rad(0),math.rad(0)),.2) | |
2294 | HW.C0 = clerp(HW.C0, CFrame.new(0, 1.5, 0) * angles(math.rad(-10-4*math.cos(sine/40)),math.rad(0),math.rad(0)),.3) | |
2295 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.60+0.10*math.cos(sine/40), 0) * angles(math.rad(0), math.rad(0), math.rad(12.5+5*math.cos(sine/40))), 0.2) | |
2296 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.60+0.10*math.cos(sine/40), 0) * angles(math.rad(0), math.rad(0), math.rad(-12.5-5*math.cos(sine/40))), 0.2) | |
2297 | RH.C0 = clerp(RH.C0, cf(0.6,-2-0.05*math.cos(sine/40),0) * angles(math.rad(0),math.rad(0),math.rad(5+0.5*math.cos(sine/40))),.1) | |
2298 | LH.C0 = clerp(LH.C0, cf(-0.6,-2-0.05*math.cos(sine/40),0) * angles(math.rad(0),math.rad(0),math.rad(-5-0.5*math.cos(sine/40))),.1) | |
2299 | end | |
2300 | --]] | |
2301 | end | |
2302 | end | |
2303 | end)) | |
2304 | ||
2305 | --//=================================================\\ | |
2306 | --|| Mouse&KeyBoard_Detection; | |
2307 | --\\=================================================// | |
2308 | ||
2309 | ||
2310 | table.insert(Charge, 1, 1) | |
2311 | ||
2312 | -- Held Key | |
2313 | Mouse.KeyUp:connect(function(Key) | |
2314 | if ModeOfSans == 1 then | |
2315 | if Key == "e" then | |
2316 | Held[Key] = nil | |
2317 | end | |
2318 | if Key == "f" then | |
2319 | Held[Key] = nil | |
2320 | end | |
2321 | end | |
2322 | if ModeOfSans == 2 then | |
2323 | if Key == "r" then | |
2324 | Active["KnifeKillerSans"] = true | |
2325 | Held[Key] = nil | |
2326 | for i = 1, 5 do | |
2327 | RW.C0 = clerp(RW.C0, CFrame.new(1.1, 0.4+0.1*math.cos(sine/16), -0.2) * angles(math.rad(20),math.rad(0),math.rad(0)), .3) | |
2328 | swait() | |
2329 | end | |
2330 | local WeldKnife = AnimationKnife_KillerSans | |
2331 | local Knife = Knife_KillerSans | |
2332 | WeldKnife.Parent = nil | |
2333 | local bv = Instance.new("BodyVelocity",Knife) | |
2334 | bv.MaxForce = Vector3.new(math.huge,math.huge,math.huge) | |
2335 | bv.Velocity = CFrame.new(RightArm.Position, Mouse.Hit.p).lookVector*100 | |
2336 | Knife.Touched:connect(function(Hit) | |
2337 | coroutine.resume(coroutine.create(function() | |
2338 | wait(1.5) | |
2339 | Knife.Touched:connect(function(T) | |
2340 | Knife_KillerSans.Parent:Destroy() | |
2341 | Transform.Killer_Sans() | |
2342 | end) | |
2343 | end)) | |
2344 | if Hit.Parent.Name ~= Me then | |
2345 | bv:Destroy() | |
2346 | Hurt(Hit, Charge[1], Me) | |
2347 | Charge[1] = 10 | |
2348 | if Hit.Parent:FindFirstChild("Blood") or Hit.Parent:FindFirstChild("Knife") then | |
2349 | return | |
2350 | else | |
2351 | if Hit.Parent.Parent.Name ~= Me then | |
2352 | if Hit.Parent.Parent.Parent.Name ~= Me then | |
2353 | Sticky(Hit, Knife) | |
2354 | end | |
2355 | end | |
2356 | end | |
2357 | CreateSound(171688984,Hit,1,1,false,true) | |
2358 | Active["KnifeKillerSans"] = false | |
2359 | Knife.CanCollide = true | |
2360 | ||
2361 | end | |
2362 | end) | |
2363 | wait(1/5) | |
2364 | bv:Destroy() | |
2365 | end | |
2366 | end | |
2367 | if ModeOfSans == 7 then | |
2368 | if Key == "x" then | |
2369 | CreateSound(1195380475,workspace,1,1,false,true) | |
2370 | Held[Key] = nil | |
2371 | StanceAction.ThawTime() | |
2372 | end | |
2373 | if Key == "c" then | |
2374 | Held[Key] = nil | |
2375 | ThemeMusic:Resume() | |
2376 | StanceAction.ThawTime() | |
2377 | end | |
2378 | end | |
2379 | end) | |
2380 | ||
2381 | function ExtinctiveHeartbreak() | |
2382 | local targetted = nil | |
2383 | ||
2384 | if Mouse.Target.Parent.Name ~= Me and Mouse.Target.Parent.Parent.Name ~= Me and Mouse.Target.Parent:FindFirstChildOfClass("Humanoid") ~= nil then | |
2385 | targetted = Mouse.Target.Parent | |
2386 | end | |
2387 | isattack = true | |
2388 | if targetted ~= nil then | |
2389 | Character:BreakJoints() | |
2390 | end | |
2391 | isattack = false | |
2392 | end | |
2393 | ||
2394 | spawn(function() | |
2395 | Mouse.KeyDown:connect(function(Key) | |
2396 | if Key == "p" then | |
2397 | Transform.Sans_UT() | |
2398 | end | |
2399 | if Key == "l" then | |
2400 | Transform.Killer_Sans() | |
2401 | end | |
2402 | if Key == "m" then | |
2403 | Transform.Ink_Sans() | |
2404 | end | |
2405 | if Key == "k" then | |
2406 | Transform.Error_Sans() | |
2407 | end | |
2408 | if Key == "n" then | |
2409 | Transform.Banish_Sans() | |
2410 | end | |
2411 | if Key == "j" then | |
2412 | Transform.Digi_Sans() | |
2413 | end | |
2414 | if Key == "o" then | |
2415 | Transform.Timekid_Sans() | |
2416 | end | |
2417 | end) | |
2418 | end) | |
2419 | ||
2420 | -- Stance&Special Events | |
2421 | Mouse.KeyDown:connect(function(Key) | |
2422 | --[[================================ | |
2423 | Debounce_System; | |
2424 | ================================--]] | |
2425 | --//Return Automatic Key\\-- | |
2426 | ||
2427 | --[[ | |
2428 | if Debouce[Key] == true then | |
2429 | Debouce[Key] = false -- This can help debug of Key :) | |
2430 | return | |
2431 | end | |
2432 | Debouce[Key] = true | |
2433 | -]] | |
2434 | ||
2435 | --//Return Automatic Animation\\-- | |
2436 | ||
2437 | --[[ | |
2438 | if Debounce_Animation == true then | |
2439 | return | |
2440 | end | |
2441 | Debounce_Animation = true | |
2442 | --]] | |
2443 | ||
2444 | --[[=========================== | |
2445 | MainAction; | |
2446 | ===========================--]] | |
2447 | if isattack == false then | |
2448 | --// Global \\-- | |
2449 | -- Teleport | |
2450 | if Key == "z" and isattack == false then | |
2451 | StanceAction.Teleport() | |
2452 | end | |
2453 | ||
2454 | --// Local \\-- | |
2455 | -- SansUT Stance | |
2456 | if ModeOfSans == 1 then | |
2457 | if Key == "e" and isattack == false then | |
2458 | Held[Key] = true | |
2459 | for i = 1, 10 do | |
2460 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(0, 0, 0), .1) | |
2461 | swait() | |
2462 | end | |
2463 | -- If Holding Then Do This | |
2464 | local Debouce_Bone = false | |
2465 | while Held[Key] == true do | |
2466 | if Held[Key] == nil then | |
2467 | break | |
2468 | end | |
2469 | coroutine.resume(coroutine.create(function() | |
2470 | if Debouce_Bone == false then | |
2471 | StanceAction.Bone() | |
2472 | Debouce_Bone = true | |
2473 | wait(0.2) | |
2474 | Debouce_Bone = false | |
2475 | end | |
2476 | end)) | |
2477 | HW.C0 = clerp(HW.C0,necko * angles(math.rad(-5+2*math.cos(sine/16)),math.rad(0),math.rad(0)),.3) | |
2478 | RW.C0 = clerp(RW.C0, CFrame.new(0.95, 0.4+0.1*math.cos(sine/16), 0.4) * angles(math.rad(-30), math.rad(0), math.rad(-35+3*math.cos(sine/16))), .1) | |
2479 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), 115, math.rad(125-15*math.cos(sine/32))), .1) | |
2480 | RH.C0 = clerp(RH.C0, cf(0.5, -2, 0) * angles(math.rad(0),math.rad(0),math.rad(0)),.3) | |
2481 | LH.C0 = clerp(LH.C0, cf(-0.5, -2, 0) * angles(math.rad(0),math.rad(0),math.rad(0)),.1) | |
2482 | swait() | |
2483 | end | |
2484 | end | |
2485 | if Key == "g" and isattack == false then | |
2486 | StanceAction.GasterBlaster() | |
2487 | end | |
2488 | if Key == "h" and isattack == false then | |
2489 | StanceAction.HugeGasterBlaster() | |
2490 | end | |
2491 | if Key == "f" and isattack == false then | |
2492 | Held[Key] = true | |
2493 | local GrabObj=Mouse.Target | |
2494 | local hum=nil | |
2495 | if GrabObj then | |
2496 | if not GrabObj.Anchored then | |
2497 | if GrabObj.Parent then | |
2498 | if GrabObj.Parent:FindFirstChild'Humanoid'then | |
2499 | hum=GrabObj.Parent.Humanoid | |
2500 | end | |
2501 | end | |
2502 | local jet=Instance.new("BodyPosition",GrabObj) | |
2503 | if not hum then jet.D=2000 jet.P=2000 end | |
2504 | while Held[Key] == true do | |
2505 | jet.MaxForce=Vector3.new(10,10,10)*10000000 | |
2506 | jet.Position=Mouse.Target~=nil and Mouse.Hit.p or jet.Position | |
2507 | local a = 0 | |
2508 | a = a +((not hum or hum.Health==0) and 1 or 2) | |
2509 | local vel=GrabObj.Velocity.x+GrabObj.Velocity.y+GrabObj.Velocity.z | |
2510 | swait() | |
2511 | end | |
2512 | jet:Destroy() | |
2513 | else | |
2514 | warn'The object is anchored!' | |
2515 | end | |
2516 | end | |
2517 | --StanceAction.GravityControl() | |
2518 | end | |
2519 | end | |
2520 | ||
2521 | -- KillerSans Stance | |
2522 | if ModeOfSans == 2 then | |
2523 | if Key == "e" and isattack == false then | |
2524 | Active["KnifeKillerSans"] = true | |
2525 | local Chance = math.random(2) | |
2526 | if Chance == 1 then | |
2527 | for i = 1, 10 do | |
2528 | RW.C0 = clerp(RW.C0, CFrame.new(1.1, 0.4+0.1*math.cos(sine/16), -0.2) * angles(math.rad(-35),math.rad(70),math.rad(100)), .3) | |
2529 | swait() | |
2530 | end | |
2531 | for i = 1, 15 do | |
2532 | RW.C0 = clerp(RW.C0, CFrame.new(1.1, 0.4+0.1*math.cos(sine/16), -0.2) * angles(math.rad(-35),math.rad(70),math.rad(170)), .3) | |
2533 | swait() | |
2534 | end | |
2535 | end | |
2536 | if Chance == 2 then | |
2537 | for i = 1, 10 do | |
2538 | RW.C0 = clerp(RW.C0, CFrame.new(1.1, 0.4+0.1*math.cos(sine/16), -0.2) * angles(math.rad(-35),math.rad(50),math.rad(190)), .3) | |
2539 | swait() | |
2540 | end | |
2541 | for i = 1, 15 do | |
2542 | RW.C0 = clerp(RW.C0, CFrame.new(1.1, 0.4+0.1*math.cos(sine/16), -0.2) * angles(math.rad(-110),math.rad(50),math.rad(190)), .3) | |
2543 | swait() | |
2544 | end | |
2545 | end | |
2546 | Active["KnifeKillerSans"] = false | |
2547 | end | |
2548 | if Key == "r" and isattack == false then | |
2549 | Held[Key] = true | |
2550 | for i = 1, 15 do | |
2551 | RW.C0 = clerp(RW.C0, CFrame.new(1.1, 0.4+0.1*math.cos(sine/16), -0.2) * angles(math.rad(0),math.rad(0),math.rad(17)), .15) | |
2552 | swait() | |
2553 | end | |
2554 | for i = 1, 15 do | |
2555 | RW.C0 = clerp(RW.C0, CFrame.new(1.1, 0.4+0.1*math.cos(sine/16), -0.2) * angles(math.rad(40),math.rad(0),math.rad(21)), .2) | |
2556 | swait() | |
2557 | end | |
2558 | for i = 1, 20 do | |
2559 | RW.C0 = clerp(RW.C0, CFrame.new(1.1, 0.4+0.1*math.cos(sine/16), -0.2) * angles(math.rad(50),math.rad(0),math.rad(24)), .2) | |
2560 | swait() | |
2561 | end | |
2562 | while Held[Key] == true do | |
2563 | RW.C0 = clerp(RW.C0, CFrame.new(1.1, 0.4+0.1*math.cos(sine/16), -0.2) * angles(math.rad(60+Charge[1]),math.rad(0),math.rad(24)), .2) | |
2564 | if Held[Key] == nil then | |
2565 | return | |
2566 | end | |
2567 | if Charge[1] <= 100 then | |
2568 | Charge[1] = Charge[1] + 1 | |
2569 | end | |
2570 | swait() | |
2571 | end | |
2572 | end | |
2573 | if Key == "x" and isattack == false then | |
2574 | StanceAction.Torture() | |
2575 | end | |
2576 | if Key == "c" and isattack == false then | |
2577 | StanceAction.CutHead() | |
2578 | end | |
2579 | if Key == "v" and isattack == false then | |
2580 | ExtinctiveHeartbreak() | |
2581 | end | |
2582 | end | |
2583 | ||
2584 | -- InkSans Stance | |
2585 | if ModeOfSans == 3 then | |
2586 | if Key == "q" and isattack == false then | |
2587 | StanceAction.BrushAttack1() | |
2588 | end | |
2589 | end | |
2590 | ||
2591 | -- ErrorSans Stance | |
2592 | if ModeOfSans == 4 then | |
2593 | if Key == "x" and isattack == false then | |
2594 | StanceAction.ErrorRemove() | |
2595 | end | |
2596 | if Key == "c" and isattack == false then | |
2597 | StanceAction.InfectionError() | |
2598 | end | |
2599 | end | |
2600 | ||
2601 | -- BanishSans Stance | |
2602 | if ModeOfSans == 5 then | |
2603 | if Key == "g" and isattack == false then | |
2604 | StanceAction.BanishGasterBlaster() | |
2605 | end | |
2606 | end | |
2607 | ||
2608 | -- TimekidSans Stance | |
2609 | if ModeOfSans == 7 then | |
2610 | if Key == "x" then | |
2611 | Held[Key] = true | |
2612 | CreateSound(181004957,workspace,1,1,false,true) | |
2613 | while Held[Key] == true do | |
2614 | StanceAction.PastTime() | |
2615 | wait() | |
2616 | end | |
2617 | end | |
2618 | if Key == "c" then | |
2619 | CreateSound(1177785010,workspace,1,1,false,true) | |
2620 | ThemeMusic:Pause() | |
2621 | local cce = game.Lighting:FindFirstChildOfClass("ColorCorrectionEffect") or Instance.new("ColorCorrectionEffect", game.Lighting) | |
2622 | cce.Saturation = -0.75 | |
2623 | Held[Key] = true | |
2624 | StanceAction.FreezeTime() | |
2625 | while Held[Key] == true do | |
2626 | StanceAction.FreezeTime() | |
2627 | wait() | |
2628 | end | |
2629 | end | |
2630 | end | |
2631 | end | |
2632 | end) |