SHOW:
|
|
- or go back to the newest paste.
| 1 | --https://github.com/Mokiros/roblox-FE-compatibility | |
| 2 | if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ not hl/") end
| |
| 3 | local Player,game,owner = owner,game | |
| 4 | local RealPlayer = Player | |
| 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 | ||
| 87 | local h,t | |
| 88 | --Give the server mouse data every second frame, but only if the values changed | |
| 89 | --If player is not moving their mouse, client won't fire events | |
| 90 | local HB = game:GetService("RunService").Heartbeat
| |
| 91 | while true do | |
| 92 | if h~=Mouse.Hit or t~=Mouse.Target then | |
| 93 | h,t=Mouse.Hit,Mouse.Target | |
| 94 | Event:FireServer({isMouse=true,Target=t,Hit=h})
| |
| 95 | end | |
| 96 | --Wait 2 frames | |
| 97 | for i=1,2 do | |
| 98 | HB:Wait() | |
| 99 | end | |
| 100 | end]==],script) | |
| 101 | ||
| 102 | ----Sandboxed game object that allows the usage of client-side methods and services | |
| 103 | --Real game object | |
| 104 | local RealGame = game | |
| 105 | ||
| 106 | --Metatable for fake service | |
| 107 | local FakeService_Metatable = {
| |
| 108 | __index = function(self,k) | |
| 109 | local s = rawget(self,"_RealService") | |
| 110 | if s then | |
| 111 | return typeof(s[k])=="function" | |
| 112 | and function(_,...)return s[k](s,...)end or s[k] | |
| 113 | end | |
| 114 | end, | |
| 115 | __newindex = function(self,k,v) | |
| 116 | local s = rawget(self,"_RealService") | |
| 117 | if s then s[k]=v end | |
| 118 | end | |
| 119 | } | |
| 120 | local function FakeService(t,RealService) | |
| 121 | t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService | |
| 122 | return setmetatable(t,FakeService_Metatable) | |
| 123 | end | |
| 124 | ||
| 125 | --Fake game object | |
| 126 | local FakeGame = {
| |
| 127 | GetService = function(self,s) | |
| 128 | return rawget(self,s) or RealGame:GetService(s) | |
| 129 | end, | |
| 130 | Players = FakeService({
| |
| 131 | LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player)
| |
| 132 | },"Players"), | |
| 133 | UserInputService = FakeService(UIS,"UserInputService"), | |
| 134 | ContextActionService = FakeService(CAS,"ContextActionService"), | |
| 135 | RunService = FakeService({
| |
| 136 | _btrs = {},
| |
| 137 | RenderStepped = RealGame:GetService("RunService").Heartbeat,
| |
| 138 | BindToRenderStep = function(self,name,_,fun) | |
| 139 | self._btrs[name] = self.Heartbeat:Connect(fun) | |
| 140 | end, | |
| 141 | UnbindFromRenderStep = function(self,name) | |
| 142 | self._btrs[name]:Disconnect() | |
| 143 | end, | |
| 144 | },"RunService") | |
| 145 | } | |
| 146 | rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer) | |
| 147 | FakeGame.service = FakeGame.GetService | |
| 148 | FakeService(FakeGame,game) | |
| 149 | --Changing owner to fake player object to support owner:GetMouse() | |
| 150 | game,owner = FakeGame,FakeGame.Players.LocalPlayer | |
| 151 | end | |
| 152 | --//====================================================\\-- | |
| 153 | --|| CREATED BY GGRELIOR333 | |
| 154 | --\\====================================================//-- | |
| 155 | --for my sis | |
| 156 | local function callback(text) | |
| 157 | if text == "Yes" then | |
| 158 | print("User said yes")
| |
| 159 | elseif text == "No" then | |
| 160 | print("User said no")
| |
| 161 | end | |
| 162 | end | |
| 163 | ||
| 164 | local bindableFunction= Instance.new("BindableFunction")
| |
| 165 | ||
| 166 | game.StarterGui:SetCore("SendNotification", {
| |
| 167 | Title = "HotBotV2 loaded"; | |
| 168 | Text = "Have fun ok?"; | |
| 169 | Icon = ""; | |
| 170 | Duration = "5"; | |
| 171 | callbakc = bindableFunction; | |
| 172 | Button1 = "Ok! Sure"; | |
| 173 | Button2 = "Trash"; | |
| 174 | }) | |
| 175 | ||
| 176 | wait(0.2) | |
| 177 | ||
| 178 | Player = game:GetService("Players").LocalPlayer
| |
| 179 | PlayerGui = Player.PlayerGui | |
| 180 | Cam = workspace.CurrentCamera | |
| 181 | Backpack = Player.Backpack | |
| 182 | Character = Player.Character | |
| 183 | Humanoid = Character.Humanoid | |
| 184 | Mouse = Player:GetMouse() | |
| 185 | RootPart = Character["HumanoidRootPart"] | |
| 186 | Torso = Character["Torso"] | |
| 187 | Head = Character["Head"] | |
| 188 | RightArm = Character["Right Arm"] | |
| 189 | LeftArm = Character["Left Arm"] | |
| 190 | RightLeg = Character["Right Leg"] | |
| 191 | LeftLeg = Character["Left Leg"] | |
| 192 | RootJoint = RootPart["RootJoint"] | |
| 193 | Neck = Torso["Neck"] | |
| 194 | RightShoulder = Torso["Right Shoulder"] | |
| 195 | LeftShoulder = Torso["Left Shoulder"] | |
| 196 | RightHip = Torso["Right Hip"] | |
| 197 | LeftHip = Torso["Left Hip"] | |
| 198 | Humanoid.MaxHealth = "inf" | |
| 199 | Humanoid.Health = "inf" | |
| 200 | IT = Instance.new | |
| 201 | CF = CFrame.new | |
| 202 | VT = Vector3.new | |
| 203 | RAD = math.rad | |
| 204 | C3 = Color3.new | |
| 205 | UD2 = UDim2.new | |
| 206 | BRICKC = BrickColor.new | |
| 207 | ANGLES = CFrame.Angles | |
| 208 | EULER = CFrame.fromEulerAnglesXYZ | |
| 209 | COS = math.cos | |
| 210 | ACOS = math.acos | |
| 211 | SIN = math.sin | |
| 212 | ASIN = math.asin | |
| 213 | ABS = math.abs | |
| 214 | MRANDOM = math.random | |
| 215 | FLOOR = math.floor | |
| 216 | ||
| 217 | --//=================================\\ | |
| 218 | --|| USEFUL VALUES | |
| 219 | --\\=================================// | |
| 220 | ||
| 221 | Animation_Speed = 3 | |
| 222 | Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60) | |
| 223 | local Speed = 16 | |
| 224 | local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) | |
| 225 | local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) | |
| 226 | local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) | |
| 227 | local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) | |
| 228 | local DAMAGEMULTIPLIER = 1 | |
| 229 | local ANIM = "Idle" | |
| 230 | local ATTACK = false | |
| 231 | local EQUIPPED = false | |
| 232 | local HOLD = false | |
| 233 | local COMBO = 1 | |
| 234 | local Rooted = false | |
| 235 | local SINE = 0 | |
| 236 | local KEYHOLD = false | |
| 237 | local CHANGE = 2 / Animation_Speed | |
| 238 | local WALKINGANIM = false | |
| 239 | local VALUE1 = false | |
| 240 | local VALUE2 = false | |
| 241 | local ROBLOXIDLEANIMATION = IT("Animation")
| |
| 242 | ROBLOXIDLEANIMATION.Name = "Roblox Idle Animation" | |
| 243 | ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571" | |
| 244 | --ROBLOXIDLEANIMATION.Parent = Humanoid | |
| 245 | local WEAPONGUI = IT("ScreenGui", PlayerGui)
| |
| 246 | WEAPONGUI.Name = "Weapon GUI" | |
| 247 | local Weapon = IT("Model")
| |
| 248 | Weapon.Name = "Adds" | |
| 249 | local Effects = IT("Folder", Weapon)
| |
| 250 | Effects.Name = "Effects" | |
| 251 | local ANIMATOR = Humanoid.Animator | |
| 252 | local ANIMATE = Character.Animate | |
| 253 | local UNANCHOR = true | |
| 254 | ||
| 255 | --//=================================\\ | |
| 256 | -- NAME OF BOT | |
| 257 | --\\=================================// | |
| 258 | ||
| 259 | local naeeym2 = Instance.new("BillboardGui",Character)
| |
| 260 | naeeym2.AlwaysOnTop = true | |
| 261 | naeeym2.Size = UDim2.new(5,35,2,35) | |
| 262 | naeeym2.StudsOffset = Vector3.new(0,4.5,0) | |
| 263 | naeeym2.Adornee = Character.Head | |
| 264 | naeeym2.Name = "Name" | |
| 265 | naeeym2.MaxDistance = 200 | |
| 266 | local tecks2 = Instance.new("TextLabel",naeeym2)
| |
| 267 | tecks2.BackgroundTransparency = 1 | |
| 268 | tecks2.TextScaled = true | |
| 269 | tecks2.BorderSizePixel = 0 | |
| 270 | tecks2.Text = "HotBot"-- killbotV2's name! -- | |
| 271 | tecks2.Font = "Fantasy" | |
| 272 | tecks2.TextSize = 70 | |
| 273 | tecks2.TextStrokeTransparency = 0 | |
| 274 | tecks2.TextColor3 = Color3.new(128, 187, 219) | |
| 275 | tecks2.TextStrokeColor3 = Color3.new(188/128, 155/187, 93/219) | |
| 276 | tecks2.Size = UDim2.new(1,0,0.5,0) | |
| 277 | tecks2.Parent = naeeym2 | |
| 278 | ||
| 279 | --//=================================\\ | |
| 280 | --|| SAZERENOS' ARTIFICIAL HEARTBEAT | |
| 281 | --\\=================================// | |
| 282 | ||
| 283 | ArtificialHB = Instance.new("BindableEvent", script)
| |
| 284 | ArtificialHB.Name = "ArtificialHB" | |
| 285 | ||
| 286 | script:WaitForChild("ArtificialHB")
| |
| 287 | ||
| 288 | frame = Frame_Speed | |
| 289 | tf = 0 | |
| 290 | allowframeloss = false | |
| 291 | tossremainder = false | |
| 292 | lastframe = tick() | |
| 293 | script.ArtificialHB:Fire() | |
| 294 | ||
| 295 | game:GetService("RunService").Heartbeat:connect(function(s, p)
| |
| 296 | tf = tf + s | |
| 297 | if tf >= frame then | |
| 298 | if allowframeloss then | |
| 299 | script.ArtificialHB:Fire() | |
| 300 | lastframe = tick() | |
| 301 | else | |
| 302 | for i = 1, math.floor(tf / frame) do | |
| 303 | script.ArtificialHB:Fire() | |
| 304 | end | |
| 305 | lastframe = tick() | |
| 306 | end | |
| 307 | if tossremainder then | |
| 308 | tf = 0 | |
| 309 | else | |
| 310 | tf = tf - frame * math.floor(tf / frame) | |
| 311 | end | |
| 312 | end | |
| 313 | end) | |
| 314 | ||
| 315 | --//=================================\\ | |
| 316 | --\\=================================// | |
| 317 | ||
| 318 | --//=================================\\ | |
| 319 | --|| SOME FUNCTIONS | |
| 320 | --\\=================================// | |
| 321 | ||
| 322 | function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS) | |
| 323 | return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS) | |
| 324 | end | |
| 325 | ||
| 326 | function PositiveAngle(NUMBER) | |
| 327 | if NUMBER >= 0 then | |
| 328 | NUMBER = 0 | |
| 329 | end | |
| 330 | return NUMBER | |
| 331 | end | |
| 332 | ||
| 333 | function NegativeAngle(NUMBER) | |
| 334 | if NUMBER <= 0 then | |
| 335 | NUMBER = 0 | |
| 336 | end | |
| 337 | return NUMBER | |
| 338 | end | |
| 339 | ||
| 340 | function Swait(NUMBER) | |
| 341 | if NUMBER == 0 or NUMBER == nil then | |
| 342 | ArtificialHB.Event:wait() | |
| 343 | else | |
| 344 | for i = 1, NUMBER do | |
| 345 | ArtificialHB.Event:wait() | |
| 346 | end | |
| 347 | end | |
| 348 | end | |
| 349 | ||
| 350 | function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET) | |
| 351 | local NEWMESH = IT(MESH) | |
| 352 | if MESH == "SpecialMesh" then | |
| 353 | NEWMESH.MeshType = MESHTYPE | |
| 354 | if MESHID ~= "nil" and MESHID ~= "" then | |
| 355 | NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID | |
| 356 | end | |
| 357 | if TEXTUREID ~= "nil" and TEXTUREID ~= "" then | |
| 358 | NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID | |
| 359 | end | |
| 360 | end | |
| 361 | NEWMESH.Offset = OFFSET or VT(0, 0, 0) | |
| 362 | NEWMESH.Scale = SCALE | |
| 363 | NEWMESH.Parent = PARENT | |
| 364 | return NEWMESH | |
| 365 | end | |
| 366 | ||
| 367 | function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR) | |
| 368 | local NEWPART = IT("Part")
| |
| 369 | NEWPART.formFactor = FORMFACTOR | |
| 370 | NEWPART.Reflectance = REFLECTANCE | |
| 371 | NEWPART.Transparency = TRANSPARENCY | |
| 372 | NEWPART.CanCollide = false | |
| 373 | NEWPART.Locked = true | |
| 374 | NEWPART.Anchored = true | |
| 375 | if ANCHOR == false then | |
| 376 | NEWPART.Anchored = false | |
| 377 | end | |
| 378 | NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR)) | |
| 379 | NEWPART.Name = NAME | |
| 380 | NEWPART.Size = SIZE | |
| 381 | NEWPART.Position = Torso.Position | |
| 382 | NEWPART.Material = MATERIAL | |
| 383 | NEWPART:BreakJoints() | |
| 384 | NEWPART.Parent = PARENT | |
| 385 | return NEWPART | |
| 386 | end | |
| 387 | ||
| 388 | local function weldBetween(a, b) | |
| 389 | local weldd = Instance.new("ManualWeld")
| |
| 390 | weldd.Part0 = a | |
| 391 | weldd.Part1 = b | |
| 392 | weldd.C0 = CFrame.new() | |
| 393 | weldd.C1 = b.CFrame:inverse() * a.CFrame | |
| 394 | weldd.Parent = a | |
| 395 | return weldd | |
| 396 | end | |
| 397 | ||
| 398 | ||
| 399 | function QuaternionFromCFrame(cf) | |
| 400 | local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components() | |
| 401 | local trace = m00 + m11 + m22 | |
| 402 | if trace > 0 then | |
| 403 | local s = math.sqrt(1 + trace) | |
| 404 | local recip = 0.5 / s | |
| 405 | return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5 | |
| 406 | else | |
| 407 | local i = 0 | |
| 408 | if m11 > m00 then | |
| 409 | i = 1 | |
| 410 | end | |
| 411 | if m22 > (i == 0 and m00 or m11) then | |
| 412 | i = 2 | |
| 413 | end | |
| 414 | if i == 0 then | |
| 415 | local s = math.sqrt(m00 - m11 - m22 + 1) | |
| 416 | local recip = 0.5 / s | |
| 417 | return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip | |
| 418 | elseif i == 1 then | |
| 419 | local s = math.sqrt(m11 - m22 - m00 + 1) | |
| 420 | local recip = 0.5 / s | |
| 421 | return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip | |
| 422 | elseif i == 2 then | |
| 423 | local s = math.sqrt(m22 - m00 - m11 + 1) | |
| 424 | local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip | |
| 425 | end | |
| 426 | end | |
| 427 | end | |
| 428 | ||
| 429 | function QuaternionToCFrame(px, py, pz, x, y, z, w) | |
| 430 | local xs, ys, zs = x + x, y + y, z + z | |
| 431 | local wx, wy, wz = w * xs, w * ys, w * zs | |
| 432 | local xx = x * xs | |
| 433 | local xy = x * ys | |
| 434 | local xz = x * zs | |
| 435 | local yy = y * ys | |
| 436 | local yz = y * zs | |
| 437 | local zz = z * zs | |
| 438 | 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)) | |
| 439 | end | |
| 440 | ||
| 441 | function QuaternionSlerp(a, b, t) | |
| 442 | local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4] | |
| 443 | local startInterp, finishInterp; | |
| 444 | if cosTheta >= 0.0001 then | |
| 445 | if (1 - cosTheta) > 0.0001 then | |
| 446 | local theta = ACOS(cosTheta) | |
| 447 | local invSinTheta = 1 / SIN(theta) | |
| 448 | startInterp = SIN((1 - t) * theta) * invSinTheta | |
| 449 | finishInterp = SIN(t * theta) * invSinTheta | |
| 450 | else | |
| 451 | startInterp = 1 - t | |
| 452 | finishInterp = t | |
| 453 | end | |
| 454 | else | |
| 455 | if (1 + cosTheta) > 0.0001 then | |
| 456 | local theta = ACOS(-cosTheta) | |
| 457 | local invSinTheta = 1 / SIN(theta) | |
| 458 | startInterp = SIN((t - 1) * theta) * invSinTheta | |
| 459 | finishInterp = SIN(t * theta) * invSinTheta | |
| 460 | else | |
| 461 | startInterp = t - 1 | |
| 462 | finishInterp = t | |
| 463 | end | |
| 464 | end | |
| 465 | 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 | |
| 466 | end | |
| 467 | ||
| 468 | function Clerp(a, b, t) | |
| 469 | local qa = {QuaternionFromCFrame(a)}
| |
| 470 | local qb = {QuaternionFromCFrame(b)}
| |
| 471 | local ax, ay, az = a.x, a.y, a.z | |
| 472 | local bx, by, bz = b.x, b.y, b.z | |
| 473 | local _t = 1 - t | |
| 474 | return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t)) | |
| 475 | end | |
| 476 | ||
| 477 | function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME) | |
| 478 | local frame = IT("Frame")
| |
| 479 | frame.BackgroundTransparency = TRANSPARENCY | |
| 480 | frame.BorderSizePixel = BORDERSIZEPIXEL | |
| 481 | frame.Position = POSITION | |
| 482 | frame.Size = SIZE | |
| 483 | frame.BackgroundColor3 = COLOR | |
| 484 | frame.BorderColor3 = BORDERCOLOR | |
| 485 | frame.Name = NAME | |
| 486 | frame.Parent = PARENT | |
| 487 | return frame | |
| 488 | end | |
| 489 | ||
| 490 | function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME) | |
| 491 | local label = IT("TextLabel")
| |
| 492 | label.BackgroundTransparency = 1 | |
| 493 | label.Size = UD2(1, 0, 1, 0) | |
| 494 | label.Position = UD2(0, 0, 0, 0) | |
| 495 | label.TextColor3 = TEXTCOLOR | |
| 496 | label.TextStrokeTransparency = STROKETRANSPARENCY | |
| 497 | label.TextTransparency = TRANSPARENCY | |
| 498 | label.FontSize = TEXTFONTSIZE | |
| 499 | label.Font = TEXTFONT | |
| 500 | label.BorderSizePixel = BORDERSIZEPIXEL | |
| 501 | label.TextScaled = false | |
| 502 | label.Text = TEXT | |
| 503 | label.Name = NAME | |
| 504 | label.Parent = PARENT | |
| 505 | return label | |
| 506 | end | |
| 507 | ||
| 508 | function NoOutlines(PART) | |
| 509 | PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10 | |
| 510 | end | |
| 511 | ||
| 512 | function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1) | |
| 513 | local NEWWELD = IT(TYPE) | |
| 514 | NEWWELD.Part0 = PART0 | |
| 515 | NEWWELD.Part1 = PART1 | |
| 516 | NEWWELD.C0 = C0 | |
| 517 | NEWWELD.C1 = C1 | |
| 518 | NEWWELD.Parent = PARENT | |
| 519 | return NEWWELD | |
| 520 | end | |
| 521 | ||
| 522 | local S = IT("Sound")
| |
| 523 | function CreateSound(ID, PARENT, VOLUME, PITCH, DOESLOOP) | |
| 524 | local NEWSOUND = nil | |
| 525 | coroutine.resume(coroutine.create(function() | |
| 526 | NEWSOUND = S:Clone() | |
| 527 | NEWSOUND.Parent = PARENT | |
| 528 | NEWSOUND.Volume = VOLUME | |
| 529 | NEWSOUND.Pitch = PITCH | |
| 530 | NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID | |
| 531 | NEWSOUND:play() | |
| 532 | if DOESLOOP == true then | |
| 533 | NEWSOUND.Looped = true | |
| 534 | else | |
| 535 | repeat wait(1) until NEWSOUND.Playing == false | |
| 536 | NEWSOUND:remove() | |
| 537 | end | |
| 538 | end)) | |
| 539 | return NEWSOUND | |
| 540 | end | |
| 541 | ||
| 542 | function CFrameFromTopBack(at, top, back) | |
| 543 | local right = top:Cross(back) | |
| 544 | return CF(at.x, at.y, at.z, right.x, top.x, back.x, right.y, top.y, back.y, right.z, top.z, back.z) | |
| 545 | end | |
| 546 | ||
| 547 | --WACKYEFFECT({EffectType = "", Size = VT(1,1,1), Size2 = VT(0,0,0), Transparency = 0, Transparency2 = 1, CFrame = CF(), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(1,1,1), SoundID = nil, SoundPitch = nil, SoundVolume = nil})
| |
| 548 | function WACKYEFFECT(Table) | |
| 549 | local TYPE = (Table.EffectType or "Sphere") | |
| 550 | local SIZE = (Table.Size or VT(1,1,1)) | |
| 551 | local ENDSIZE = (Table.Size2 or VT(0,0,0)) | |
| 552 | local TRANSPARENCY = (Table.Transparency or 0) | |
| 553 | local ENDTRANSPARENCY = (Table.Transparency2 or 1) | |
| 554 | local CFRAME = (Table.CFrame or Torso.CFrame) | |
| 555 | local MOVEDIRECTION = (Table.MoveToPos or nil) | |
| 556 | local ROTATION1 = (Table.RotationX or 0) | |
| 557 | local ROTATION2 = (Table.RotationY or 0) | |
| 558 | local ROTATION3 = (Table.RotationZ or 0) | |
| 559 | local MATERIAL = (Table.Material or "Neon") | |
| 560 | local COLOR = (Table.Color or C3(1,1,1)) | |
| 561 | local TIME = (Table.Time or 45) | |
| 562 | local SOUNDID = (Table.SoundID or nil) | |
| 563 | local SOUNDPITCH = (Table.SoundPitch or nil) | |
| 564 | local SOUNDVOLUME = (Table.SoundVolume or nil) | |
| 565 | coroutine.resume(coroutine.create(function() | |
| 566 | local PLAYSSOUND = false | |
| 567 | local SOUND = nil | |
| 568 | local EFFECT = CreatePart(3, Effects, MATERIAL, 0, TRANSPARENCY, BRICKC("Pearl"), "Effect", VT(1,1,1), true)
| |
| 569 | if SOUNDID ~= nil and SOUNDPITCH ~= nil and SOUNDVOLUME ~= nil then | |
| 570 | PLAYSSOUND = true | |
| 571 | SOUND = CreateSound(SOUNDID, EFFECT, SOUNDVOLUME, SOUNDPITCH, false) | |
| 572 | end | |
| 573 | EFFECT.Color = COLOR | |
| 574 | local MSH = nil | |
| 575 | if TYPE == "Sphere" then | |
| 576 | MSH = CreateMesh("SpecialMesh", EFFECT, "Sphere", "", "", SIZE, VT(0,0,0))
| |
| 577 | elseif TYPE == "Block" then | |
| 578 | MSH = IT("BlockMesh",EFFECT)
| |
| 579 | MSH.Scale = VT(SIZE.X,SIZE.X,SIZE.X) | |
| 580 | elseif TYPE == "Wave" then | |
| 581 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "20329976", "", SIZE, VT(0,0,-SIZE.X/8))
| |
| 582 | elseif TYPE == "Ring" then | |
| 583 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "559831844", "", VT(SIZE.X,SIZE.X,0.1), VT(0,0,0))
| |
| 584 | elseif TYPE == "Slash" then | |
| 585 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662586858", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
| |
| 586 | elseif TYPE == "Round Slash" then | |
| 587 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662585058", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
| |
| 588 | elseif TYPE == "Swirl" then | |
| 589 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "1051557", "", SIZE, VT(0,0,0))
| |
| 590 | elseif TYPE == "Skull" then | |
| 591 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "4770583", "", SIZE, VT(0,0,0))
| |
| 592 | elseif TYPE == "Crystal" then | |
| 593 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "9756362", "", SIZE, VT(0,0,0))
| |
| 594 | end | |
| 595 | if MSH ~= nil then | |
| 596 | local MOVESPEED = nil | |
| 597 | if MOVEDIRECTION ~= nil then | |
| 598 | MOVESPEED = (CFRAME.p - MOVEDIRECTION).Magnitude/TIME | |
| 599 | end | |
| 600 | local GROWTH = SIZE - ENDSIZE | |
| 601 | local TRANS = TRANSPARENCY - ENDTRANSPARENCY | |
| 602 | if TYPE == "Block" then | |
| 603 | EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))) | |
| 604 | else | |
| 605 | EFFECT.CFrame = CFRAME | |
| 606 | end | |
| 607 | for LOOP = 1, TIME+1 do | |
| 608 | Swait() | |
| 609 | MSH.Scale = MSH.Scale - GROWTH/TIME | |
| 610 | if TYPE == "Wave" then | |
| 611 | MSH.Offset = VT(0,0,-MSH.Scale.X/8) | |
| 612 | end | |
| 613 | EFFECT.Transparency = EFFECT.Transparency - TRANS/TIME | |
| 614 | if TYPE == "Block" then | |
| 615 | EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))) | |
| 616 | else | |
| 617 | EFFECT.CFrame = EFFECT.CFrame*ANGLES(RAD(ROTATION1),RAD(ROTATION2),RAD(ROTATION3)) | |
| 618 | end | |
| 619 | if MOVEDIRECTION ~= nil then | |
| 620 | local ORI = EFFECT.Orientation | |
| 621 | EFFECT.CFrame = CF(EFFECT.Position,MOVEDIRECTION)*CF(0,0,-MOVESPEED) | |
| 622 | EFFECT.Orientation = ORI | |
| 623 | end | |
| 624 | end | |
| 625 | if PLAYSSOUND == false then | |
| 626 | EFFECT:remove() | |
| 627 | else | |
| 628 | repeat Swait() until SOUND.Playing == false | |
| 629 | EFFECT:remove() | |
| 630 | end | |
| 631 | else | |
| 632 | if PLAYSSOUND == false then | |
| 633 | EFFECT:remove() | |
| 634 | else | |
| 635 | repeat Swait() until SOUND.Playing == false | |
| 636 | EFFECT:remove() | |
| 637 | end | |
| 638 | end | |
| 639 | end)) | |
| 640 | end | |
| 641 | ||
| 642 | function MakeForm(PART,TYPE) | |
| 643 | if TYPE == "Cyl" then | |
| 644 | local MSH = IT("CylinderMesh",PART)
| |
| 645 | elseif TYPE == "Ball" then | |
| 646 | local MSH = IT("SpecialMesh",PART)
| |
| 647 | MSH.MeshType = "Sphere" | |
| 648 | elseif TYPE == "Wedge" then | |
| 649 | local MSH = IT("SpecialMesh",PART)
| |
| 650 | MSH.MeshType = "Wedge" | |
| 651 | end | |
| 652 | end | |
| 653 | ||
| 654 | Debris = game:GetService("Debris")
| |
| 655 | ||
| 656 | function CastProperRay(StartPos, EndPos, Distance, Ignore) | |
| 657 | local DIRECTION = CF(StartPos,EndPos).lookVector | |
| 658 | return Raycast(StartPos, DIRECTION, Distance, Ignore) | |
| 659 | end | |
| 660 | ||
| 661 | function CharacterFade(COLOR,TIMER) | |
| 662 | coroutine.resume(coroutine.create(function() | |
| 663 | local FADE = IT("Model",Effects)
| |
| 664 | for _, c in pairs(Character:GetChildren()) do | |
| 665 | if c.ClassName == "Part" and c ~= RootPart then | |
| 666 | local FADER = c:Clone() | |
| 667 | FADER.Color = COLOR | |
| 668 | FADER.CFrame = c.CFrame | |
| 669 | FADER.Parent = FADE | |
| 670 | FADER.Anchored = true | |
| 671 | FADER.Transparency = 0.25 | |
| 672 | FADER:BreakJoints() | |
| 673 | FADER.Material = "Glass" | |
| 674 | FADER:ClearAllChildren() | |
| 675 | if FADER.Name == "Head" then | |
| 676 | FADER.Size = VT(1,1,1) | |
| 677 | end | |
| 678 | end | |
| 679 | end | |
| 680 | local TRANS = 0.75/TIMER | |
| 681 | for i = 1, TIMER do | |
| 682 | Swait() | |
| 683 | for _, c in pairs(FADE:GetChildren()) do | |
| 684 | if c.ClassName == "Part" then | |
| 685 | c.Transparency = c.Transparency + TRANS | |
| 686 | end | |
| 687 | end | |
| 688 | end | |
| 689 | FADE:remove() | |
| 690 | end)) | |
| 691 | end | |
| 692 | ||
| 693 | local PE=Instance.new("ParticleEmitter")
| |
| 694 | PE.LightEmission=0.3 | |
| 695 | PE.Size=NumberSequence.new(0) | |
| 696 | PE.Transparency=NumberSequence.new(0,1) | |
| 697 | PE.Rotation=NumberRange.new(0,360) | |
| 698 | PE.LockedToPart = false | |
| 699 | PE.Speed = NumberRange.new(0,0,0) | |
| 700 | PE.ZOffset = 0.3 | |
| 701 | PE.Rate = 999 | |
| 702 | PE.VelocitySpread = 25 | |
| 703 | PE.Name = "Particles" | |
| 704 | ||
| 705 | function CreateParticles(art,accel,drag,lifetime,type,isenabledbydefault,locked,size,speed) | |
| 706 | local particle = nil | |
| 707 | coroutine.resume(coroutine.create(function(PART) | |
| 708 | particle = PE:Clone() | |
| 709 | Swait() | |
| 710 | particle.Rate = 999 | |
| 711 | particle.Parent = art | |
| 712 | particle.Acceleration = accel | |
| 713 | if type == "Fire" then | |
| 714 | local EyeSizes={
| |
| 715 | NumberSequenceKeypoint.new(0,size,size/2), | |
| 716 | NumberSequenceKeypoint.new(1,size/4,size/8) | |
| 717 | } | |
| 718 | particle.Size = NumberSequence.new(EyeSizes) | |
| 719 | elseif type == "Smoke" then | |
| 720 | local EyeSizes={
| |
| 721 | NumberSequenceKeypoint.new(0,size/5,0), | |
| 722 | NumberSequenceKeypoint.new(1,size*2,0.5) | |
| 723 | } | |
| 724 | particle.Size = NumberSequence.new(EyeSizes) | |
| 725 | elseif type == "Solid" then | |
| 726 | local EyeSizes={
| |
| 727 | NumberSequenceKeypoint.new(0,size,0), | |
| 728 | NumberSequenceKeypoint.new(1,size,0) | |
| 729 | } | |
| 730 | particle.Size = NumberSequence.new(EyeSizes) | |
| 731 | end | |
| 732 | particle.Lifetime=NumberRange.new(lifetime) | |
| 733 | particle.Drag = drag | |
| 734 | if locked == true then | |
| 735 | particle.LockedToPart = true | |
| 736 | end | |
| 737 | particle.Speed = NumberRange.new(speed*0.8,speed) | |
| 738 | particle.Texture = "http://www.roblox.com/asset/?id=1179557490" | |
| 739 | particle.Enabled = isenabledbydefault | |
| 740 | particle.Color = ColorSequence.new(Color3.new(255/255, 176/255, 0)) | |
| 741 | end)) | |
| 742 | return particle | |
| 743 | end | |
| 744 | ||
| 745 | --//=================================\\ | |
| 746 | --|| RAGDOLL STUFF | |
| 747 | --\\=================================// | |
| 748 | ||
| 749 | function recurse(root,callback,i) | |
| 750 | i= i or 0 | |
| 751 | for _,v in pairs(root:GetChildren()) do | |
| 752 | i = i + 1 | |
| 753 | callback(i,v) | |
| 754 | ||
| 755 | if #v:GetChildren() > 0 then | |
| 756 | i = recurse(v,callback,i) | |
| 757 | end | |
| 758 | end | |
| 759 | ||
| 760 | return i | |
| 761 | end | |
| 762 | ||
| 763 | function ragdollJoint(character, part0, part1, attachmentName, className, properties) | |
| 764 | attachmentName = attachmentName.."RigAttachment" | |
| 765 | local constraint = Instance.new(className.."Constraint") | |
| 766 | constraint.Attachment0 = part0:FindFirstChild(attachmentName) | |
| 767 | constraint.Attachment1 = part1:FindFirstChild(attachmentName) | |
| 768 | constraint.Name = "RagdollConstraint"..part1.Name | |
| 769 | ||
| 770 | for _,propertyData in next,properties or {} do
| |
| 771 | constraint[propertyData[1]] = propertyData[2] | |
| 772 | end | |
| 773 | ||
| 774 | constraint.Parent = character | |
| 775 | end | |
| 776 | ||
| 777 | function getAttachment0(character, attachmentName) | |
| 778 | for _,child in next,character:GetChildren() do | |
| 779 | local attachment = child:FindFirstChild(attachmentName) | |
| 780 | if attachment then | |
| 781 | return attachment | |
| 782 | end | |
| 783 | end | |
| 784 | end | |
| 785 | ||
| 786 | function ArtificialHitbox(Part) | |
| 787 | local HITBOX = CreatePart(3, Part, "Metal", 0, 1, "Really black", "Hitbox", Part.Size/2, false) | |
| 788 | HITBOX.CanCollide = true | |
| 789 | HITBOX.CFrame = Part.CFrame | |
| 790 | weldBetween(Part,HITBOX) | |
| 791 | end | |
| 792 | ||
| 793 | function R15Ragdoll(character,KeepArms) | |
| 794 | character:BreakJoints() | |
| 795 | coroutine.resume(coroutine.create(function() | |
| 796 | recurse(character, function(_,v) | |
| 797 | if v:IsA("Attachment") then
| |
| 798 | v.Axis = Vector3.new(0, 1, 0) | |
| 799 | v.SecondaryAxis = Vector3.new(0, 0, 1) | |
| 800 | v.Rotation = Vector3.new(0, 0, 0) | |
| 801 | end | |
| 802 | end) | |
| 803 | for _,child in next,character:GetChildren() do | |
| 804 | if child:IsA("Accoutrement") then
| |
| 805 | for _,part in next,child:GetChildren() do | |
| 806 | if part:IsA("BasePart") and part.Name ~= "HumanoidRootPart" then
| |
| 807 | local attachment1 = part:FindFirstChildOfClass("Attachment")
| |
| 808 | local attachment0 = getAttachment0(character,attachment1.Name) | |
| 809 | if attachment0 and attachment1 then | |
| 810 | local constraint = Instance.new("HingeConstraint")
| |
| 811 | constraint.Attachment0 = attachment0 | |
| 812 | constraint.Attachment1 = attachment1 | |
| 813 | constraint.LimitsEnabled = true | |
| 814 | constraint.UpperAngle = 0 | |
| 815 | constraint.LowerAngle = 0 | |
| 816 | constraint.Parent = character | |
| 817 | end | |
| 818 | ArtificialHitbox(part) | |
| 819 | elseif part.Name == "HumanoidRootPart" then | |
| 820 | part:remove() | |
| 821 | end | |
| 822 | end | |
| 823 | end | |
| 824 | end | |
| 825 | ||
| 826 | ragdollJoint(character,character.LowerTorso, character.UpperTorso, "Waist", "BallSocket", {
| |
| 827 | {"LimitsEnabled",true};
| |
| 828 | {"UpperAngle",5};
| |
| 829 | }) | |
| 830 | if character:FindFirstChild("Head") then
| |
| 831 | ragdollJoint(character,character.UpperTorso, character.Head, "Neck", "BallSocket", {
| |
| 832 | {"LimitsEnabled",true};
| |
| 833 | {"UpperAngle",15};
| |
| 834 | }) | |
| 835 | end | |
| 836 | ||
| 837 | local handProperties = {
| |
| 838 | {"LimitsEnabled", true};
| |
| 839 | {"UpperAngle",0};
| |
| 840 | {"LowerAngle",0};
| |
| 841 | } | |
| 842 | ragdollJoint(character,character.LeftLowerArm, character.LeftHand, "LeftWrist", "Hinge", handProperties) | |
| 843 | ragdollJoint(character,character.RightLowerArm, character.RightHand, "RightWrist", "Hinge", handProperties) | |
| 844 | ||
| 845 | local shinProperties = {
| |
| 846 | {"LimitsEnabled", true};
| |
| 847 | {"UpperAngle", 0};
| |
| 848 | {"LowerAngle", -75};
| |
| 849 | } | |
| 850 | ragdollJoint(character,character.LeftUpperLeg, character.LeftLowerLeg, "LeftKnee", "Hinge", shinProperties) | |
| 851 | ragdollJoint(character,character.RightUpperLeg, character.RightLowerLeg, "RightKnee", "Hinge", shinProperties) | |
| 852 | ||
| 853 | local footProperties = {
| |
| 854 | {"LimitsEnabled", true};
| |
| 855 | {"UpperAngle", 15};
| |
| 856 | {"LowerAngle", -45};
| |
| 857 | } | |
| 858 | ragdollJoint(character,character.LeftLowerLeg, character.LeftFoot, "LeftAnkle", "Hinge", footProperties) | |
| 859 | ragdollJoint(character,character.RightLowerLeg, character.RightFoot, "RightAnkle", "Hinge", footProperties) | |
| 860 | if KeepArms == true then | |
| 861 | ragdollJoint(character,character.UpperTorso, character.RightUpperArm, "RightShoulder", "BallSocket") | |
| 862 | ragdollJoint(character,character.RightUpperArm, character.RightLowerArm, "RightElbow", "BallSocket") | |
| 863 | ragdollJoint(character,character.UpperTorso, character.LeftUpperArm, "LeftShoulder", "BallSocket") | |
| 864 | ragdollJoint(character,character.LeftUpperArm, character.LeftLowerArm, "LeftElbow", "BallSocket") | |
| 865 | end | |
| 866 | ragdollJoint(character,character.LowerTorso, character.LeftUpperLeg, "LeftHip", "BallSocket") | |
| 867 | ragdollJoint(character,character.LowerTorso, character.RightUpperLeg, "RightHip", "BallSocket") | |
| 868 | Debris:AddItem(character,5) | |
| 869 | end)) | |
| 870 | end | |
| 871 | ||
| 872 | function Ragdoll(Character2,CharTorso,KeepArms) | |
| 873 | coroutine.resume(coroutine.create(function() | |
| 874 | Character2:BreakJoints() | |
| 875 | local hum = Character2:findFirstChild("Humanoid")
| |
| 876 | hum:remove() | |
| 877 | local function Scan(ch) | |
| 878 | local e | |
| 879 | for e = 1,#ch do | |
| 880 | Scan(ch[e]:GetChildren()) | |
| 881 | if ch[e].ClassName == "Weld" or ch[e].ClassName == "Motor6D" then | |
| 882 | ch[e]:remove() | |
| 883 | end | |
| 884 | end | |
| 885 | end | |
| 886 | local NEWHUM = IT("Humanoid")
| |
| 887 | NEWHUM.Name = "Corpse" | |
| 888 | NEWHUM.Health = 0 | |
| 889 | NEWHUM.MaxHealth = 0 | |
| 890 | NEWHUM.PlatformStand = true | |
| 891 | NEWHUM.Parent = Character2 | |
| 892 | NEWHUM.DisplayDistanceType = "None" | |
| 893 | ||
| 894 | local ch = Character2:GetChildren() | |
| 895 | local i | |
| 896 | for i = 1,#ch do | |
| 897 | if ch[i].Name == "THandle1" or ch[i].Name == "THandle2" then | |
| 898 | ch[i]:remove() | |
| 899 | end | |
| 900 | end | |
| 901 | ||
| 902 | local Torso2 = Character2.Torso | |
| 903 | local movevector = Vector3.new() | |
| 904 | ||
| 905 | if Torso2 then | |
| 906 | movevector = CFrame.new(CharTorso.Position,Torso2.Position).lookVector | |
| 907 | local Head = Character2:FindFirstChild("Head")
| |
| 908 | if Head then | |
| 909 | local Neck = Instance.new("Weld")
| |
| 910 | Neck.Name = "Neck" | |
| 911 | Neck.Part0 = Torso2 | |
| 912 | Neck.Part1 = Head | |
| 913 | Neck.C0 = CFrame.new(0, 1.5, 0) | |
| 914 | Neck.C1 = CFrame.new() | |
| 915 | Neck.Parent = Torso2 | |
| 916 | ||
| 917 | end | |
| 918 | local Limb = Character2:FindFirstChild("Right Arm")
| |
| 919 | if Limb and KeepArms == true then | |
| 920 | ||
| 921 | Limb.CFrame = Torso2.CFrame * CFrame.new(1.5, 0, 0) | |
| 922 | local Joint = Instance.new("Glue")
| |
| 923 | Joint.Name = "RightShoulder" | |
| 924 | Joint.Part0 = Torso2 | |
| 925 | Joint.Part1 = Limb | |
| 926 | Joint.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
| 927 | Joint.C1 = CFrame.new(-0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
| 928 | Joint.Parent = Torso2 | |
| 929 | ||
| 930 | local B = Instance.new("Part")
| |
| 931 | B.TopSurface = 0 | |
| 932 | B.BottomSurface = 0 | |
| 933 | B.formFactor = "Symmetric" | |
| 934 | B.Size = Vector3.new(1, 1, 1) | |
| 935 | B.Transparency = 1 | |
| 936 | B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0) | |
| 937 | B.Parent = Character2 | |
| 938 | local W = Instance.new("Weld")
| |
| 939 | W.Part0 = Limb | |
| 940 | W.Part1 = B | |
| 941 | W.C0 = CFrame.new(0, -0.5, 0) | |
| 942 | W.Parent = Limb | |
| 943 | ||
| 944 | end | |
| 945 | local Limb = Character2:FindFirstChild("Left Arm")
| |
| 946 | if Limb and KeepArms == true then | |
| 947 | ||
| 948 | Limb.CFrame = Torso2.CFrame * CFrame.new(-1.5, 0, 0) | |
| 949 | local Joint = Instance.new("Glue")
| |
| 950 | Joint.Name = "LeftShoulder" | |
| 951 | Joint.Part0 = Torso2 | |
| 952 | Joint.Part1 = Limb | |
| 953 | Joint.C0 = CFrame.new(-1.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) | |
| 954 | Joint.C1 = CFrame.new(0, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) | |
| 955 | Joint.Parent = Torso2 | |
| 956 | ||
| 957 | local B = Instance.new("Part")
| |
| 958 | B.TopSurface = 0 | |
| 959 | B.BottomSurface = 0 | |
| 960 | B.formFactor = "Symmetric" | |
| 961 | B.Size = Vector3.new(1, 1, 1) | |
| 962 | B.Transparency = 1 | |
| 963 | B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0) | |
| 964 | B.Parent = Character2 | |
| 965 | local W = Instance.new("Weld")
| |
| 966 | W.Part0 = Limb | |
| 967 | W.Part1 = B | |
| 968 | W.C0 = CFrame.new(0, -0.5, 0) | |
| 969 | W.Parent = Limb | |
| 970 | ||
| 971 | end | |
| 972 | local Limb = Character2:FindFirstChild("Right Leg")
| |
| 973 | if Limb then | |
| 974 | ||
| 975 | Limb.CFrame = Torso2.CFrame * CFrame.new(0.5, -2, 0) | |
| 976 | local Joint = Instance.new("Glue")
| |
| 977 | Joint.Name = "RightHip" | |
| 978 | Joint.Part0 = Torso2 | |
| 979 | Joint.Part1 = Limb | |
| 980 | Joint.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
| 981 | Joint.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
| 982 | Joint.Parent = Torso2 | |
| 983 | ||
| 984 | local B = Instance.new("Part")
| |
| 985 | B.TopSurface = 0 | |
| 986 | B.BottomSurface = 0 | |
| 987 | B.formFactor = "Symmetric" | |
| 988 | B.Size = Vector3.new(1, 1, 1) | |
| 989 | B.Transparency = 1 | |
| 990 | B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0) | |
| 991 | B.Parent = Character2 | |
| 992 | local W = Instance.new("Weld")
| |
| 993 | W.Part0 = Limb | |
| 994 | W.Part1 = B | |
| 995 | W.C0 = CFrame.new(0, -0.5, 0) | |
| 996 | W.Parent = Limb | |
| 997 | ||
| 998 | end | |
| 999 | local Limb = Character2:FindFirstChild("Left Leg")
| |
| 1000 | if Limb then | |
| 1001 | ||
| 1002 | Limb.CFrame = Torso2.CFrame * CFrame.new(-0.5, -2, 0) | |
| 1003 | local Joint = Instance.new("Glue")
| |
| 1004 | Joint.Name = "LeftHip" | |
| 1005 | Joint.Part0 = Torso2 | |
| 1006 | Joint.Part1 = Limb | |
| 1007 | Joint.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) | |
| 1008 | Joint.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) | |
| 1009 | Joint.Parent = Torso2 | |
| 1010 | ||
| 1011 | local B = Instance.new("Part")
| |
| 1012 | B.TopSurface = 0 | |
| 1013 | B.BottomSurface = 0 | |
| 1014 | B.formFactor = "Symmetric" | |
| 1015 | B.Size = Vector3.new(1, 1, 1) | |
| 1016 | B.Transparency = 1 | |
| 1017 | B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0) | |
| 1018 | B.Parent = Character2 | |
| 1019 | local W = Instance.new("Weld")
| |
| 1020 | W.Part0 = Limb | |
| 1021 | W.Part1 = B | |
| 1022 | W.C0 = CFrame.new(0, -0.5, 0) | |
| 1023 | W.Parent = Limb | |
| 1024 | ||
| 1025 | end | |
| 1026 | --[ | |
| 1027 | local Bar = Instance.new("Part")
| |
| 1028 | Bar.TopSurface = 0 | |
| 1029 | Bar.BottomSurface = 0 | |
| 1030 | Bar.formFactor = "Symmetric" | |
| 1031 | Bar.Size = Vector3.new(1, 1, 1) | |
| 1032 | Bar.Transparency = 1 | |
| 1033 | Bar.CFrame = Torso2.CFrame * CFrame.new(0, 0.5, 0) | |
| 1034 | Bar.Parent = Character2 | |
| 1035 | local Weld = Instance.new("Weld")
| |
| 1036 | Weld.Part0 = Torso2 | |
| 1037 | Weld.Part1 = Bar | |
| 1038 | Weld.C0 = CFrame.new(0, 0.5, 0) | |
| 1039 | Weld.Parent = Torso2 | |
| 1040 | --]] | |
| 1041 | end | |
| 1042 | Character2.Parent = workspace | |
| 1043 | Debris:AddItem(Character2,5) | |
| 1044 | ||
| 1045 | return Character2,Torso2 | |
| 1046 | end)) | |
| 1047 | end | |
| 1048 | ||
| 1049 | --//=================================\\ | |
| 1050 | --|| WEAPON CREATION | |
| 1051 | --\\=================================// | |
| 1052 | ||
| 1053 | local DUST = CreateParticles(RightArm,VT(0,0,0),5,2,"Smoke",false,false,5,0) | |
| 1054 | DUST.ZOffset = 1 | |
| 1055 | RightArm.Transparency = 1 | |
| 1056 | local BasePart = CreatePart(3, Weapon, "Metal", 0, 0, "Really black", "Part", VT(1,2,1),false) | |
| 1057 | CreateWeldOrSnapOrMotor("Weld", RightArm, RightArm, BasePart, CF(0,0,0) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
| |
| 1058 | local Sphere = CreatePart(3, Weapon, "Metal", 0, 0, "Really black", "Part", VT(1.4,1.4,1.4),false) | |
| 1059 | MakeForm(Sphere,"Ball") | |
| 1060 | CreateWeldOrSnapOrMotor("Weld", BasePart, BasePart, Sphere, CF(0.2,0.8,0.1) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
| |
| 1061 | local LaserPart = CreatePart(3, Weapon, "Neon", 0, 0, "Hot pink", "Part", VT(0.3,0.3,0.1),false) | |
| 1062 | MakeForm(LaserPart,"Ball") | |
| 1063 | CreateWeldOrSnapOrMotor("Weld", Sphere, Sphere, LaserPart, CF(0,0,-0.65) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
| |
| 1064 | local Bump = CreatePart(3, Weapon, "Metal", 0, 0, "Really black", "Part", VT(0.3,0.3,0.2),false) | |
| 1065 | MakeForm(Bump,"Ball") | |
| 1066 | CreateWeldOrSnapOrMotor("Weld", Sphere, Sphere, Bump, CF(0,0,0.65) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
| |
| 1067 | local BottomLaser = CreatePart(3, Weapon, "Neon", 0, 0, "Hot pink", "Part", VT(0.4,0,0.4),false) | |
| 1068 | MakeForm(BottomLaser,"Cyl") | |
| 1069 | CreateWeldOrSnapOrMotor("Weld", BasePart, BasePart, BottomLaser, CF(0,-1,0) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
| |
| 1070 | local Part1 = CreatePart(3, Weapon, "Neon", 0, 0, "Hot pink", "Part", VT(0,0.5,0.5),false) | |
| 1071 | CreateWeldOrSnapOrMotor("Weld", BasePart, BasePart, Part1, CF(0,-0.76,-0.26) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
| |
| 1072 | local Part2 = CreatePart(3, Weapon, "Neon", 0, 0, "Hot pink", "Part", VT(0,0.5,0.5),false) | |
| 1073 | CreateWeldOrSnapOrMotor("Weld", BasePart, Part1, Part2, CF(0,0.25,0) * ANGLES(RAD(0), RAD(0), RAD(-25)), CF(0, -0.25, 0))
| |
| 1074 | local Part3 = CreatePart(3, Weapon, "Neon", 0, 0, "Hot pink", "Part", VT(0,0.5,0.5),false) | |
| 1075 | CreateWeldOrSnapOrMotor("Weld", BasePart, Part1, Part3, CF(0,0.25,0) * ANGLES(RAD(0), RAD(0), RAD(-90)), CF(0, -0.26, 0))
| |
| 1076 | local Part4 = CreatePart(3, Weapon, "Neon", 0, 0, "Hot pink", "Part", VT(0,0.56,0.5),false) | |
| 1077 | CreateWeldOrSnapOrMotor("Weld", BasePart, Part2, Part4, CF(0,0.25,0) * ANGLES(RAD(0), RAD(0), RAD(90)), CF(0, -0.26, 0))
| |
| 1078 | local Part5 = CreatePart(3, Weapon, "Neon", 0, 0, "Hot pink", "Part", VT(0,0.56,0.5),false) | |
| 1079 | CreateWeldOrSnapOrMotor("Weld", BasePart, Part4, Part5, CF(0,0.25,0) * ANGLES(RAD(0), RAD(0), RAD(-125)), CF(0, -0.26, 0))
| |
| 1080 | local Part = CreatePart(3, Weapon, "Neon", 0, 0, "Hot pink", "Part", VT(0,0.25,0.5),false) | |
| 1081 | CreateWeldOrSnapOrMotor("Weld", BasePart, Part4, Part, CF(0,0.25,0) * ANGLES(RAD(0), RAD(0), RAD(25)), CF(0, -0.26/2, 0))
| |
| 1082 | local Part = CreatePart(3, Weapon, "Neon", 0, 0, "Hot pink", "Part", VT(0,0.3,0.5),false) | |
| 1083 | CreateWeldOrSnapOrMotor("Weld", BasePart, Part2, Part, CF(0,0.25,0) * ANGLES(RAD(0), RAD(0), RAD(-65)), CF(0, -0.31/2, 0))
| |
| 1084 | local Part = CreatePart(3, Weapon, "Neon", 0, 0, "Hot pink", "Part", VT(1.4,0,1.4),false) | |
| 1085 | MakeForm(Part,"Cyl") | |
| 1086 | CreateWeldOrSnapOrMotor("Weld", Sphere, Sphere, Part, CF(0.035,0,0) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
| |
| 1087 | local Part = CreatePart(3, Weapon, "Neon", 0, 0, "Hot pink", "Part", VT(1.4,0,1.4),false) | |
| 1088 | MakeForm(Part,"Cyl") | |
| 1089 | CreateWeldOrSnapOrMotor("Weld", Sphere, Sphere, Part, CF(0,-0.035,0) * ANGLES(RAD(0), RAD(0), RAD(90)), CF(0, 0, 0))
| |
| 1090 | local Sphere = CreatePart(3, Weapon, "Metal", 0, 0, "Really black", "Part", VT(0.3,1.6,0.7),false) | |
| 1091 | MakeForm(Sphere,"Ball") | |
| 1092 | CreateWeldOrSnapOrMotor("Weld", BasePart, BasePart, Sphere, CF(0.45,0.5,0) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
| |
| 1093 | local BODY = {}
| |
| 1094 | for _, c in pairs(Character:GetDescendants()) do | |
| 1095 | if c:IsA("BasePart") then
| |
| 1096 | table.insert(BODY, {
| |
| 1097 | c, | |
| 1098 | c.Parent, | |
| 1099 | c.Material, | |
| 1100 | c.Color | |
| 1101 | }) | |
| 1102 | elseif c:IsA("JointInstance") then
| |
| 1103 | table.insert(BODY, {
| |
| 1104 | c, | |
| 1105 | c.Parent, | |
| 1106 | nil, | |
| 1107 | nil | |
| 1108 | }) | |
| 1109 | end | |
| 1110 | end | |
| 1111 | for _, c in pairs(Weapon:GetChildren()) do | |
| 1112 | if c.ClassName == "Part" then | |
| 1113 | c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0) | |
| 1114 | end | |
| 1115 | end | |
| 1116 | ||
| 1117 | ||
| 1118 | for _, c in pairs(Character:GetDescendants()) do | |
| 1119 | if c:IsA("BasePart") then
| |
| 1120 | table.insert(BODY, {
| |
| 1121 | c, | |
| 1122 | c.Parent, | |
| 1123 | c.Material, | |
| 1124 | c.Color | |
| 1125 | }) | |
| 1126 | elseif c:IsA("JointInstance") then
| |
| 1127 | table.insert(BODY, {
| |
| 1128 | c, | |
| 1129 | c.Parent, | |
| 1130 | nil, | |
| 1131 | nil | |
| 1132 | }) | |
| 1133 | end | |
| 1134 | end | |
| 1135 | ||
| 1136 | for e = 1, #BODY do | |
| 1137 | if BODY[e] ~= nil then | |
| 1138 | do | |
| 1139 | local STUFF = BODY[e] | |
| 1140 | local PART = STUFF[1] | |
| 1141 | local PARENT = STUFF[2] | |
| 1142 | local MATERIAL = STUFF[3] | |
| 1143 | local COLOR = STUFF[4] | |
| 1144 | PART.AncestryChanged:Connect(function() | |
| 1145 | if PART.ClassName == "Part" then | |
| 1146 | PART.Material = MATERIAL | |
| 1147 | PART.Color = COLOR | |
| 1148 | end | |
| 1149 | PART.Parent = PARENT | |
| 1150 | end) | |
| 1151 | end | |
| 1152 | end | |
| 1153 | end | |
| 1154 | function refit() | |
| 1155 | Weapon.Parent = Character | |
| 1156 | Character.Parent = workspace | |
| 1157 | for e = 1, #BODY do | |
| 1158 | if BODY[e] ~= nil then | |
| 1159 | local STUFF = BODY[e] | |
| 1160 | local PART = STUFF[1] | |
| 1161 | local PARENT = STUFF[2] | |
| 1162 | local MATERIAL = STUFF[3] | |
| 1163 | local COLOR = STUFF[4] | |
| 1164 | if PART.Parent ~= PARENT then | |
| 1165 | Humanoid:remove() | |
| 1166 | if PART.ClassName == "Part" then | |
| 1167 | PART.Material = MATERIAL | |
| 1168 | PART.Color = COLOR | |
| 1169 | end | |
| 1170 | PART.Parent = PARENT | |
| 1171 | Humanoid = IT("Humanoid", Character)
| |
| 1172 | end | |
| 1173 | end | |
| 1174 | end | |
| 1175 | end | |
| 1176 | ||
| 1177 | ||
| 1178 | ||
| 1179 | local SKILLTEXTCOLOR = C3(1,0,0) | |
| 1180 | local SKILLFONT = "SciFi" | |
| 1181 | local SKILLTEXTSIZE = 5 | |
| 1182 | ||
| 1183 | Weapon.Parent = Character | |
| 1184 | Humanoid.Died:connect(function() | |
| 1185 | refit() | |
| 1186 | end) | |
| 1187 | ||
| 1188 | ||
| 1189 | local SKILL1FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.8, 0, 0.90, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 1 Frame") | |
| 1190 | local SKILL2FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.8, 0, 0.86, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 2 Frame") | |
| 1191 | local SKILL3FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.8, 0, 0.82, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 3 Frame") | |
| 1192 | local SKILL4FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.8, 0, 0.78, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 4 Frame") | |
| 1193 | local SKILL5FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.8, 0, 0.74, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 5 Frame") | |
| 1194 | local SKILL6FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.8, 0, 0.70, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 6 Frame") | |
| 1195 | ||
| 1196 | local SKILL1TEXT = CreateLabel(SKILL1FRAME, "[Z]", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0.5, "Text 1") | |
| 1197 | local SKILL2TEXT = CreateLabel(SKILL2FRAME, "[B]", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0.5, "Text 2") | |
| 1198 | local SKILL3TEXT = CreateLabel(SKILL3FRAME, "[C]", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0.5, "Text 3") | |
| 1199 | local SKILL4TEXT = CreateLabel(SKILL4FRAME, "[V]", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0.5, "Text 4") | |
| 1200 | local SKILL5TEXT = CreateLabel(SKILL5FRAME, "[E]", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0.5, "Text 5") | |
| 1201 | local SKILL6TEXT = CreateLabel(SKILL6FRAME, "[X]", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0.5, "Text 6") | |
| 1202 | ||
| 1203 | --//=================================\\ | |
| 1204 | --|| ATTACK FUNCTIONS AND STUFF | |
| 1205 | --\\=================================// | |
| 1206 | ||
| 1207 | function Warp() | |
| 1208 | local HITFLOOR,HITPOS = Raycast(Mouse.Hit.p+VT(0,1,0), (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 100, Character) | |
| 1209 | if HITFLOOR then | |
| 1210 | CharacterFade(C3(0.5,0,0),50) | |
| 1211 | HITPOS = HITPOS + VT(0,3.5,0) | |
| 1212 | local POS = RootPart.Position | |
| 1213 | RootPart.CFrame = CF(HITPOS,CF(POS,HITPOS)*CF(0,0,-100000).p) | |
| 1214 | CreateSound(289556450,Torso,2,MRANDOM(8,13)/10,false) | |
| 1215 | end | |
| 1216 | end | |
| 1217 | ||
| 1218 | function Dash() | |
| 1219 | ATTACK = true | |
| 1220 | Rooted = true | |
| 1221 | local SOUND = CreateSound(1165167610, Torso, 1, 1, true) | |
| 1222 | local LOOP = 0 | |
| 1223 | repeat | |
| 1224 | LOOP = LOOP + 1 | |
| 1225 | Swait() | |
| 1226 | local RAY,RAYPOS = Raycast(RootPart.Position, (CF(RootPart.Position, Mouse.Hit.p)).lookVector, 5, workspace) | |
| 1227 | local HITFLOOR,HITPOS,NORMAL = Raycast(RAYPOS+VT(0,1,0), (CF(RAYPOS, RAYPOS + VT(0, -1, 0))).lookVector, 100, Character) | |
| 1228 | if HITFLOOR then | |
| 1229 | CharacterFade(C3(0.5,0,0),35) | |
| 1230 | HITPOS = HITPOS + VT(0,3.5,0) | |
| 1231 | local POS = RootPart.Position | |
| 1232 | RootPart.CFrame = CF(HITPOS,CF(POS,HITPOS)*CF(0,0,-100000).p) | |
| 1233 | RootPart.Velocity = VT(0,0,0) | |
| 1234 | RootPart.RotVelocity = VT(0,0,0) | |
| 1235 | end | |
| 1236 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(75), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1237 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-45), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1238 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(-15), RAD(0), RAD(15)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
| 1239 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-15), RAD(0), RAD(-15)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
| 1240 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(-15), RAD(80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1241 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(-15), RAD(-80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1242 | until KEYHOLD == false | |
| 1243 | coroutine.resume(coroutine.create(function() | |
| 1244 | for i = 1, 20 do | |
| 1245 | Swait() | |
| 1246 | SOUND.Volume = SOUND.Volume - 1/20 | |
| 1247 | end | |
| 1248 | SOUND:remove() | |
| 1249 | end)) | |
| 1250 | if LOOP > 50 then | |
| 1251 | CreateSound(772085046,Torso,5,MRANDOM(8,13)/10,false) | |
| 1252 | for i = 1, 100 do | |
| 1253 | Swait() | |
| 1254 | RootPart.CFrame = RootPart.CFrame * CF(0,0,-(1-(i/100))/3) | |
| 1255 | WACKYEFFECT({Time = 25, EffectType = "Sphere", Size = VT(1,0.5,1), Size2 = VT(2,0,2), Transparency = 0.7, Transparency2 = 1, CFrame = CF(RightLeg.CFrame*CF(0,-1,0).p), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(0.3,0.3,0.3), SoundID = nil, SoundPitch = nil, SoundVolume = nil})
| |
| 1256 | WACKYEFFECT({Time = 25, EffectType = "Sphere", Size = VT(1,0.5,1), Size2 = VT(2,0,2), Transparency = 0.7, Transparency2 = 1, CFrame = CF(LeftLeg.CFrame*CF(0,-1,0).p), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(0.3,0.3,0.3), SoundID = nil, SoundPitch = nil, SoundVolume = nil})
| |
| 1257 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(-15), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1258 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(35), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1259 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(-45), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
| 1260 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-45), RAD(0), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
| 1261 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(70), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1262 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-70), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1263 | end | |
| 1264 | end | |
| 1265 | ATTACK = false | |
| 1266 | Rooted = false | |
| 1267 | end | |
| 1268 | ||
| 1269 | function LimbRip() | |
| 1270 | ATTACK = true | |
| 1271 | Rooted = false | |
| 1272 | local TARGET = nil | |
| 1273 | local ROOT = nil | |
| 1274 | local HUMAN = nil | |
| 1275 | local DIST = 4 | |
| 1276 | Speed = 12 | |
| 1277 | for i=0, 1, 0.1 / Animation_Speed do | |
| 1278 | Swait() | |
| 1279 | local CHILDREN = workspace:GetDescendants() | |
| 1280 | for index, CHILD in pairs(CHILDREN) do | |
| 1281 | if CHILD.ClassName == "Model" and CHILD ~= Character then | |
| 1282 | local HUM = CHILD:FindFirstChildOfClass("Humanoid")
| |
| 1283 | if HUM then | |
| 1284 | local TORSO = CHILD:FindFirstChild("HumanoidRootPart") or CHILD:FindFirstChild("Torso") or CHILD:FindFirstChild("UpperTorso")
| |
| 1285 | if TORSO and HUM.Health > 0 then | |
| 1286 | if (TORSO.Position - RightArm.Position).Magnitude <= DIST then | |
| 1287 | DIST = (TORSO.Position - RightArm.Position).Magnitude | |
| 1288 | ROOT = TORSO | |
| 1289 | HUMAN = HUM | |
| 1290 | TARGET = CHILD:FindFirstChild("Torso") or CHILD:FindFirstChild("UpperTorso")
| |
| 1291 | end | |
| 1292 | end | |
| 1293 | end | |
| 1294 | end | |
| 1295 | end | |
| 1296 | if ROOT then | |
| 1297 | break | |
| 1298 | end | |
| 1299 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(45)), 1 / Animation_Speed) | |
| 1300 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(10), RAD(0), RAD(-25)), 1 / Animation_Speed) | |
| 1301 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.35, 0.5, -0.4) * ANGLES(RAD(90), RAD(0), RAD(45)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
| 1302 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-25), RAD(0), RAD(15)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
| 1303 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1304 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-70), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1305 | end | |
| 1306 | Speed = 16 | |
| 1307 | if ROOT then | |
| 1308 | CreateSound(305685800,Torso,5,1.3,false) | |
| 1309 | Rooted = true | |
| 1310 | local GORED = false | |
| 1311 | coroutine.resume(coroutine.create(function() | |
| 1312 | repeat | |
| 1313 | Swait() | |
| 1314 | ROOT.Anchored = true | |
| 1315 | until GORED == true | |
| 1316 | ROOT.Anchored = false | |
| 1317 | end)) | |
| 1318 | RootPart.CFrame = ROOT.CFrame*CF(0,0,2.25) | |
| 1319 | if TARGET.Name == "Torso" then | |
| 1320 | local RARM = TARGET.Parent:FindFirstChild("Right Arm")
| |
| 1321 | local LARM = TARGET.Parent:FindFirstChild("Left Arm")
| |
| 1322 | if RARM and LARM then | |
| 1323 | for i=0, 1, 0.1 / Animation_Speed do | |
| 1324 | Swait() | |
| 1325 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1326 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-5), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1327 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, -0.4) * ANGLES(RAD(90), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
| 1328 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, -0.4) * ANGLES(RAD(90), RAD(0), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
| 1329 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(70), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1330 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-70), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1331 | end | |
| 1332 | for _, c in pairs(TARGET.Parent:GetDescendants()) do | |
| 1333 | if c:IsA("JointInstance") then
| |
| 1334 | if c.Part1 == RARM or c.Part1 == LARM or c.Part0 == RARM or c.Part0 == LARM then | |
| 1335 | c:remove() | |
| 1336 | end | |
| 1337 | end | |
| 1338 | end | |
| 1339 | CreateSound(363808674, TARGET, 3, MRANDOM(7,9)/10, false) | |
| 1340 | CreateWeldOrSnapOrMotor("Weld", RightArm, RightArm, RARM, CF(0,-1.35,0) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
| |
| 1341 | CreateWeldOrSnapOrMotor("Weld", LeftArm, LeftArm, LARM, CF(0,-1.35,0) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
| |
| 1342 | for i=0, 1, 0.1 / Animation_Speed do | |
| 1343 | Swait() | |
| 1344 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1345 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-5), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1346 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, -0.4) * ANGLES(RAD(160), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
| 1347 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, -0.4) * ANGLES(RAD(160), RAD(0), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
| 1348 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(70), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1349 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-70), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1350 | end | |
| 1351 | for i=0, 1, 0.1 / Animation_Speed do | |
| 1352 | Swait() | |
| 1353 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0.25) * ANGLES(RAD(-25), RAD(0), RAD(80)), 1 / Animation_Speed) | |
| 1354 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(15), RAD(0), RAD(-30)), 1 / Animation_Speed) | |
| 1355 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, -0.4) * ANGLES(RAD(160), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
| 1356 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, -0.4) * ANGLES(RAD(160), RAD(0), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
| 1357 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.6) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-65), RAD(0), RAD(0)) * CF(0,1.5,0), 1 / Animation_Speed) | |
| 1358 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-45), RAD(0)) * ANGLES(RAD(-35), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1359 | end | |
| 1360 | for i=0, 0.1, 0.1 / Animation_Speed do | |
| 1361 | Swait() | |
| 1362 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0.2, 0.25) * ANGLES(RAD(-35), RAD(0), RAD(80)), 1 / Animation_Speed) | |
| 1363 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(15), RAD(0), RAD(-30)), 1 / Animation_Speed) | |
| 1364 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, -0.4) * ANGLES(RAD(160), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
| 1365 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, -0.4) * ANGLES(RAD(160), RAD(0), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
| 1366 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.6) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-65), RAD(0), RAD(0)) * CF(0,-0.3,0), 1 / Animation_Speed) | |
| 1367 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-45), RAD(0)) * ANGLES(RAD(-35), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1368 | end | |
| 1369 | GORED = true | |
| 1370 | Ragdoll(TARGET.Parent,Torso) | |
| 1371 | if ROOT.Name ~= "Torso" then | |
| 1372 | ROOT:remove() | |
| 1373 | end | |
| 1374 | local RGRAB = CreateWeldOrSnapOrMotor("Weld", RightArm, RightArm, RARM, CF(0,-1.35,0) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
| |
| 1375 | local LGRAB = CreateWeldOrSnapOrMotor("Weld", LeftArm, LeftArm, LARM, CF(0,-1.35,0) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
| |
| 1376 | local bv = Instance.new("BodyVelocity",TARGET)
| |
| 1377 | bv.maxForce = Vector3.new(1e9, 1e9, 1e9) | |
| 1378 | bv.velocity = TARGET.CFrame.lookVector*75 | |
| 1379 | Debris:AddItem(bv,0.05) | |
| 1380 | CreateSound(621557962, RightLeg, 1, MRANDOM(7,9)/10, false) | |
| 1381 | for i=0, 0.5, 0.1 / Animation_Speed do | |
| 1382 | Swait() | |
| 1383 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0.2, 0.25) * ANGLES(RAD(-35), RAD(0), RAD(80)), 1 / Animation_Speed) | |
| 1384 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(15), RAD(0), RAD(-30)), 1 / Animation_Speed) | |
| 1385 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, -0.4) * ANGLES(RAD(160), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
| 1386 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, -0.4) * ANGLES(RAD(160), RAD(0), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
| 1387 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.6) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-65), RAD(0), RAD(0)) * CF(0,-0.3,0), 1 / Animation_Speed) | |
| 1388 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-45), RAD(0)) * ANGLES(RAD(-35), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1389 | end | |
| 1390 | for i=0, 1, 0.1 / Animation_Speed do | |
| 1391 | Swait() | |
| 1392 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1393 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(25), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1394 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, -0.4) * ANGLES(RAD(0), RAD(0), RAD(90)) * RIGHTSHOULDERC0, 0.6 / Animation_Speed) | |
| 1395 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, -0.4) * ANGLES(RAD(0), RAD(0), RAD(-90)) * LEFTSHOULDERC0, 0.6 / Animation_Speed) | |
| 1396 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(70), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1397 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-70), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1398 | end | |
| 1399 | local HITBOX = CreatePart(3, RARM, "Metal", 0, 1, "Really black", "Part", RARM.Size, false) | |
| 1400 | HITBOX.CFrame = RARM.CFrame | |
| 1401 | HITBOX.CanCollide = true | |
| 1402 | weldBetween(RARM,HITBOX) | |
| 1403 | local HITBOX = CreatePart(3, LARM, "Metal", 0, 1, "Really black", "Part", RARM.Size, false) | |
| 1404 | HITBOX.CFrame = LARM.CFrame | |
| 1405 | HITBOX.CanCollide = true | |
| 1406 | weldBetween(LARM,HITBOX) | |
| 1407 | RGRAB:remove() | |
| 1408 | LGRAB:remove() | |
| 1409 | for i=0, 0.4, 0.1 / Animation_Speed do | |
| 1410 | Swait() | |
| 1411 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1412 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(25), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1413 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, -0.4) * ANGLES(RAD(0), RAD(0), RAD(110)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
| 1414 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, -0.4) * ANGLES(RAD(0), RAD(0), RAD(-110)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
| 1415 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(70), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1416 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-70), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1417 | end | |
| 1418 | end | |
| 1419 | elseif TARGET.Name == "UpperTorso" then | |
| 1420 | if TARGET.Parent:FindFirstChild("RightUpperArm") and TARGET.Parent:FindFirstChild("LeftUpperArm") then
| |
| 1421 | for i=0, 0.3, 0.1 / Animation_Speed do | |
| 1422 | Swait() | |
| 1423 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(45)), 1 / Animation_Speed) | |
| 1424 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(-45)), 1 / Animation_Speed) | |
| 1425 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.45, 0.5, -0.5) * ANGLES(RAD(140), RAD(0), RAD(45)) * ANGLES(RAD(0), RAD(25), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
| 1426 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
| 1427 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(70), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1428 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1429 | end | |
| 1430 | local SAWBLADE = CreatePart(3, Weapon, "Neon", 0, 0.5, "Hot pink", "Part", VT(0,0,0),false) | |
| 1431 | local WELD = CreateWeldOrSnapOrMotor("Weld", RightArm, RightArm, SAWBLADE, CF(0,-1,0) * ANGLES(RAD(0), RAD(90), RAD(0)), CF(0, 0, 0))
| |
| 1432 | local BLADE = true | |
| 1433 | CreateMesh("SpecialMesh", SAWBLADE, "FileMesh", "74322089", "", VT(1,1,1), VT(0,0,0))
| |
| 1434 | coroutine.resume(coroutine.create(function() | |
| 1435 | repeat | |
| 1436 | Swait() | |
| 1437 | WELD.C1 = WELD.C1 * ANGLES(RAD(0), RAD(0), RAD(25)) | |
| 1438 | until BLADE == false | |
| 1439 | SAWBLADE:remove() | |
| 1440 | end)) | |
| 1441 | CreateSound(1165167936, SAWBLADE, 2, 1, true) | |
| 1442 | for i=0, 1, 0.1 / Animation_Speed do | |
| 1443 | Swait() | |
| 1444 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(45)), 1 / Animation_Speed) | |
| 1445 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(-45)), 1 / Animation_Speed) | |
| 1446 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.45, 0.5, -0.5) * ANGLES(RAD(140), RAD(0), RAD(45)) * ANGLES(RAD(0), RAD(25), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
| 1447 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
| 1448 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(70), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1449 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1450 | end | |
| 1451 | for i=0, 3, 0.1 / Animation_Speed do | |
| 1452 | Swait() | |
| 1453 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(45)), 1 / Animation_Speed) | |
| 1454 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(-45)), 1 / Animation_Speed) | |
| 1455 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.45, 0.5, -0.5) * ANGLES(RAD(15), RAD(0), RAD(45)) * ANGLES(RAD(0), RAD(-25), RAD(0)) * RIGHTSHOULDERC0, 0.1 / Animation_Speed) | |
| 1456 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
| 1457 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(70), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1458 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1459 | end | |
| 1460 | CreateSound(363808674, TARGET, 3, MRANDOM(7,9)/10, false) | |
| 1461 | TARGET.Parent:FindFirstChild("RightUpperArm").RightShoulder:remove()
| |
| 1462 | for i=0, 1, 0.1 / Animation_Speed do | |
| 1463 | Swait() | |
| 1464 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(1, 0, 0.3) * ANGLES(RAD(0), RAD(0), RAD(90)), 1 / Animation_Speed) | |
| 1465 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(-80)), 1 / Animation_Speed) | |
| 1466 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.45, 0.5, 0) * ANGLES(RAD(140), RAD(0), RAD(90)) * ANGLES(RAD(0), RAD(45), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
| 1467 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
| 1468 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(70), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1469 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1470 | end | |
| 1471 | for i=0, 3, 0.1 / Animation_Speed do | |
| 1472 | Swait() | |
| 1473 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(1, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(90)), 1 / Animation_Speed) | |
| 1474 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(-80)), 1 / Animation_Speed) | |
| 1475 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(15)) * ANGLES(RAD(0), RAD(-45), RAD(0)) * RIGHTSHOULDERC0, 0.1 / Animation_Speed) | |
| 1476 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
| 1477 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(70), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1478 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1479 | end | |
| 1480 | CreateSound(363808674, TARGET, 3, MRANDOM(7,9)/10, false) | |
| 1481 | TARGET.Parent:FindFirstChild("LeftUpperArm").LeftShoulder:remove()
| |
| 1482 | BLADE = false | |
| 1483 | for i=0, 0.5, 0.1 / Animation_Speed do | |
| 1484 | Swait() | |
| 1485 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0.25) * ANGLES(RAD(-25), RAD(0), RAD(80)), 1 / Animation_Speed) | |
| 1486 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(15), RAD(0), RAD(-30)), 1 / Animation_Speed) | |
| 1487 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(45), RAD(0)) * ANGLES(RAD(-25), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
| 1488 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-15), RAD(0), RAD(-25)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
| 1489 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.6) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-65), RAD(0), RAD(0)) * CF(0,1.5,0), 1 / Animation_Speed) | |
| 1490 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-45), RAD(0)) * ANGLES(RAD(-35), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1491 | end | |
| 1492 | for i=0, 0.1, 0.1 / Animation_Speed do | |
| 1493 | Swait() | |
| 1494 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0.2, 0.25) * ANGLES(RAD(-35), RAD(0), RAD(80)), 1 / Animation_Speed) | |
| 1495 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(15), RAD(0), RAD(-30)), 1 / Animation_Speed) | |
| 1496 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(45), RAD(0)) * ANGLES(RAD(-32), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
| 1497 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-20), RAD(0), RAD(-25)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
| 1498 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.6) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-65), RAD(0), RAD(0)) * CF(0,-0.3,0), 1 / Animation_Speed) | |
| 1499 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-45), RAD(0)) * ANGLES(RAD(-35), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1500 | end | |
| 1501 | GORED = true | |
| 1502 | TARGET.Parent:BreakJoints() | |
| 1503 | R15Ragdoll(TARGET.Parent) | |
| 1504 | if ROOT.Name ~= "Torso" then | |
| 1505 | ROOT:remove() | |
| 1506 | end | |
| 1507 | local bv = Instance.new("BodyVelocity",TARGET)
| |
| 1508 | bv.maxForce = Vector3.new(1e9, 1e9, 1e9) | |
| 1509 | bv.velocity = TARGET.CFrame.lookVector*75 | |
| 1510 | Debris:AddItem(bv,0.05) | |
| 1511 | CreateSound(621557962, RightLeg, 1, MRANDOM(7,9)/10, false) | |
| 1512 | for i=0, 0.3, 0.1 / Animation_Speed do | |
| 1513 | Swait() | |
| 1514 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0.2, 0.25) * ANGLES(RAD(-35), RAD(0), RAD(80)), 1 / Animation_Speed) | |
| 1515 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(15), RAD(0), RAD(-30)), 1 / Animation_Speed) | |
| 1516 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(45), RAD(0)) * ANGLES(RAD(-32), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
| 1517 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-20), RAD(0), RAD(-25)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
| 1518 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.6) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-65), RAD(0), RAD(0)) * CF(0,-0.3,0), 1 / Animation_Speed) | |
| 1519 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-45), RAD(0)) * ANGLES(RAD(-35), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1520 | end | |
| 1521 | end | |
| 1522 | end | |
| 1523 | end | |
| 1524 | ATTACK = false | |
| 1525 | Rooted = false | |
| 1526 | end | |
| 1527 | ||
| 1528 | function Buzzsaw() | |
| 1529 | ATTACK = true | |
| 1530 | Rooted = false | |
| 1531 | local ARMSPEED = 0.1 | |
| 1532 | local TARGET = nil | |
| 1533 | local ROOT = nil | |
| 1534 | local HUMAN = nil | |
| 1535 | local DIST = 4 | |
| 1536 | local SAWBLADE = CreatePart(3, Weapon, "Neon", 0, 0.5, "Hot pink", "Part", VT(0,0,0),false) | |
| 1537 | local WELD = CreateWeldOrSnapOrMotor("Weld", RightArm, RightArm, SAWBLADE, CF(0,-1,0) * ANGLES(RAD(0), RAD(90), RAD(0)), CF(0, 0, 0))
| |
| 1538 | local BLADE = true | |
| 1539 | CreateMesh("SpecialMesh", SAWBLADE, "FileMesh", "74322089", "", VT(2,2,1), VT(0,0,0))
| |
| 1540 | coroutine.resume(coroutine.create(function() | |
| 1541 | repeat | |
| 1542 | Swait() | |
| 1543 | WELD.C1 = WELD.C1 * ANGLES(RAD(0), RAD(0), RAD(25)) | |
| 1544 | until BLADE == false | |
| 1545 | SAWBLADE:remove() | |
| 1546 | end)) | |
| 1547 | CreateSound(1165167936, SAWBLADE, 2, 1, true) | |
| 1548 | for i=0, 1, 0.1 / Animation_Speed do | |
| 1549 | Swait() | |
| 1550 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(45)), 1 / Animation_Speed) | |
| 1551 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(-45)), 1 / Animation_Speed) | |
| 1552 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.55, 0.5, -0.5) * ANGLES(RAD(175), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
| 1553 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
| 1554 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(70), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1555 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1556 | end | |
| 1557 | for i=0, 2, 0.1 / Animation_Speed do | |
| 1558 | Swait() | |
| 1559 | local CHILDREN = workspace:GetDescendants() | |
| 1560 | for index, CHILD in pairs(CHILDREN) do | |
| 1561 | if CHILD.ClassName == "Model" and CHILD ~= Character then | |
| 1562 | local HUM = CHILD:FindFirstChildOfClass("Humanoid")
| |
| 1563 | if HUM then | |
| 1564 | local TORSO = CHILD:FindFirstChild("HumanoidRootPart") or CHILD:FindFirstChild("Torso") or CHILD:FindFirstChild("UpperTorso")
| |
| 1565 | if TORSO and HUM.Health > 0 then | |
| 1566 | if (TORSO.Position - RightArm.Position).Magnitude <= DIST then | |
| 1567 | DIST = (TORSO.Position - RightArm.Position).Magnitude | |
| 1568 | ROOT = TORSO | |
| 1569 | HUMAN = HUM | |
| 1570 | TARGET = CHILD:FindFirstChild("Torso") or CHILD:FindFirstChild("UpperTorso")
| |
| 1571 | end | |
| 1572 | end | |
| 1573 | end | |
| 1574 | end | |
| 1575 | end | |
| 1576 | if ROOT then | |
| 1577 | break | |
| 1578 | end | |
| 1579 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(45)), 1 / Animation_Speed) | |
| 1580 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(-45)), 1 / Animation_Speed) | |
| 1581 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.55, 0.5, -0.5) * ANGLES(RAD(15), RAD(0), RAD(45)) * ANGLES(RAD(0), RAD(-45), RAD(0)) * RIGHTSHOULDERC0, ARMSPEED / Animation_Speed) | |
| 1582 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
| 1583 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(70), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1584 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1585 | end | |
| 1586 | if ROOT then | |
| 1587 | ARMSPEED = 0.03 | |
| 1588 | Rooted = true | |
| 1589 | RootPart.CFrame = ROOT.CFrame*CF(0,0,2.5) | |
| 1590 | repeat | |
| 1591 | HUMAN.Health = HUMAN.Health - 0.5 | |
| 1592 | Swait() | |
| 1593 | ROOT.Anchored = true | |
| 1594 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(1, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(45)), 1 / Animation_Speed) | |
| 1595 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(-45)), 1 / Animation_Speed) | |
| 1596 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0, 0) * ANGLES(RAD(15), RAD(0), RAD(45)) * ANGLES(RAD(0), RAD(-45), RAD(0)) * RIGHTSHOULDERC0, ARMSPEED / Animation_Speed) | |
| 1597 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
| 1598 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(70), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1599 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1600 | until RightArm.Position.Y < Torso.Position.Y-0.15 or HUMAN.Health == 0 | |
| 1601 | ROOT.Anchored = false | |
| 1602 | if HUMAN.Health == 0 then | |
| 1603 | if ROOT.Name ~= "Torso" then | |
| 1604 | ROOT:remove() | |
| 1605 | end | |
| 1606 | if TARGET.Name == "Torso" then | |
| 1607 | Ragdoll(HUMAN.Parent,Torso,true) | |
| 1608 | elseif TARGET.Name == "UpperTorso" then | |
| 1609 | R15Ragdoll(HUMAN.Parent,true) | |
| 1610 | end | |
| 1611 | end | |
| 1612 | end | |
| 1613 | BLADE = false | |
| 1614 | ATTACK = false | |
| 1615 | Rooted = false | |
| 1616 | end | |
| 1617 | ||
| 1618 | function ReeeEEEEEE() | |
| 1619 | ATTACK = true | |
| 1620 | Rooted = false | |
| 1621 | Speed = 12 | |
| 1622 | local FX = CreateSound(198165368, Head, 4, 0.5, false) | |
| 1623 | repeat | |
| 1624 | Swait() | |
| 1625 | FX.Parent = Head | |
| 1626 | local CHILDREN = workspace:GetDescendants() | |
| 1627 | for index, CHILD in pairs(CHILDREN) do | |
| 1628 | if CHILD.ClassName == "Model" and CHILD ~= Character then | |
| 1629 | local HUM = CHILD:FindFirstChildOfClass("Humanoid")
| |
| 1630 | if HUM then | |
| 1631 | local TORSO = CHILD:FindFirstChild("Head")
| |
| 1632 | if TORSO then | |
| 1633 | if (TORSO.Position - Head.Position).Magnitude <= 25 then | |
| 1634 | WACKYEFFECT({Time = 45, EffectType = "Sphere", Size = VT(1,1,1), Size2 = VT(5,5,5), Transparency = 0, Transparency2 = 1, CFrame = CF(TORSO.Position), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(1,0,0), SoundID = nil, SoundPitch = nil, SoundVolume = nil})
| |
| 1635 | TORSO:remove() | |
| 1636 | if CHILD:FindFirstChild("Torso") then
| |
| 1637 | Ragdoll(CHILD,Torso,true) | |
| 1638 | elseif CHILD:FindFirstChild("UpperTorso") then
| |
| 1639 | R15Ragdoll(CHILD,true) | |
| 1640 | end | |
| 1641 | end | |
| 1642 | end | |
| 1643 | end | |
| 1644 | end | |
| 1645 | end | |
| 1646 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0.5, 0) * ANGLES(RAD(-45), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1647 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-45), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1648 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(-35), RAD(0), RAD(15)) * ANGLES(RAD(0), RAD(15), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
| 1649 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-35), RAD(0), RAD(-15)) * ANGLES(RAD(0), RAD(-15), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
| 1650 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(-45), RAD(80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1651 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(-45), RAD(-80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1652 | until FX.Playing == false | |
| 1653 | Speed = 16 | |
| 1654 | ATTACK = false | |
| 1655 | Rooted = false | |
| 1656 | end | |
| 1657 | ||
| 1658 | function Needle() | |
| 1659 | ATTACK = true | |
| 1660 | Rooted = true | |
| 1661 | local GYRO = IT("BodyGyro",RootPart)
| |
| 1662 | GYRO.D = 2 | |
| 1663 | GYRO.P = 2000 | |
| 1664 | GYRO.MaxTorque = VT(0,4000000,0) | |
| 1665 | local NEEDGYRO = true | |
| 1666 | coroutine.resume(coroutine.create(function() | |
| 1667 | repeat | |
| 1668 | Swait() | |
| 1669 | GYRO.CFrame = CF(RootPart.Position,Mouse.Hit.p) | |
| 1670 | until NEEDGYRO == false | |
| 1671 | GYRO:Remove() | |
| 1672 | end)) | |
| 1673 | for i=0, 0.3, 0.1 / Animation_Speed do | |
| 1674 | Swait() | |
| 1675 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -1) * ANGLES(RAD(0), RAD(0), RAD(45)), 1 / Animation_Speed) | |
| 1676 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(-45)), 1 / Animation_Speed) | |
| 1677 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.25, 0.5, -0.5) * ANGLES(RAD(90), RAD(0), RAD(45)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
| 1678 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1, 0.5, -0.5) * ANGLES(RAD(25), RAD(0), RAD(80)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
| 1679 | RightHip.C0 = Clerp(RightHip.C0, CF(1, 0, -1) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1680 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1.5, 0) * ANGLES(RAD(-90), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1681 | end | |
| 1682 | for i=0, 1, 0.1 / Animation_Speed do | |
| 1683 | Swait() | |
| 1684 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -1) * ANGLES(RAD(0), RAD(0), RAD(45)), 1 / Animation_Speed) | |
| 1685 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(15), RAD(-45)), 1 / Animation_Speed) | |
| 1686 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.15, 0.5, -0.5) * ANGLES(RAD(90), RAD(0), RAD(45)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
| 1687 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1, 0.5, -0.5) * ANGLES(RAD(25), RAD(0), RAD(80)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
| 1688 | RightHip.C0 = Clerp(RightHip.C0, CF(1, 0, -1) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1689 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1.5, 0) * ANGLES(RAD(-90), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1690 | end | |
| 1691 | local HIT,POS = CastProperRay(RightArm.CFrame*CF(0,-1,0).p,Mouse.Hit.p,300,Character) | |
| 1692 | WACKYEFFECT({Time = 45, EffectType = "Wave", Size = VT(1,0,1), Size2 = VT(5,1,5), Transparency = 0, Transparency2 = 1, CFrame = RightArm.CFrame*CF(0,-1,0) * ANGLES(RAD(180), RAD(0), RAD(0)), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(0,0,0), SoundID = 90655239, SoundPitch = 1, SoundVolume = 2})
| |
| 1693 | NEEDGYRO = false | |
| 1694 | if HIT then | |
| 1695 | local NEEDLE = IT("Model",Effects)
| |
| 1696 | local BASE = CreatePart(3, NEEDLE, "Glass", 0, 0.5, "Pearl", "Part", VT(0.3,0.6,0.3), false) | |
| 1697 | MakeForm(BASE,"Cyl") | |
| 1698 | BASE.CFrame = CF(POS,RightArm.CFrame*CF(0,-1,0).p) * ANGLES(RAD(90), RAD(0), RAD(0))*CF(0,-0.35,0) | |
| 1699 | weldBetween(BASE,HIT) | |
| 1700 | local FLUID = CreatePart(3, NEEDLE, "Neon", 0, 0, "Royal purple", "Part", VT(0.28,0.58,0.28), false) | |
| 1701 | MakeForm(FLUID,"Cyl") | |
| 1702 | FLUID.CFrame = BASE.CFrame | |
| 1703 | weldBetween(BASE,FLUID) | |
| 1704 | local PART = CreatePart(3, NEEDLE, "Metal", 0, 0, "Pearl", "Part", VT(0,0.2,0), false) | |
| 1705 | PART.CFrame = BASE.CFrame*CF(0,0.4,0) | |
| 1706 | weldBetween(BASE,PART) | |
| 1707 | local PART = CreatePart(3, NEEDLE, "Metal", 0, 0, "Pearl", "Part", VT(0.1,0.1,0.1), false) | |
| 1708 | PART.CFrame = BASE.CFrame*CF(0,-0.35,0) | |
| 1709 | weldBetween(BASE,PART) | |
| 1710 | local PART = CreatePart(3, NEEDLE, "Metal", 0, 0, "Pearl", "Part", VT(0.2,0.1,0.2), false) | |
| 1711 | PART.CFrame = BASE.CFrame*CF(0,-0.4,0) | |
| 1712 | weldBetween(BASE,PART) | |
| 1713 | Debris:AddItem(NEEDLE,7) | |
| 1714 | if HIT.Parent:FindFirstChildOfClass("Humanoid") then
| |
| 1715 | local HUMAN = HIT.Parent:FindFirstChildOfClass("Humanoid")
| |
| 1716 | coroutine.resume(coroutine.create(function() | |
| 1717 | for i = 1, 500 do | |
| 1718 | HUMAN.Health = HUMAN.Health - MRANDOM(1,6)/5 | |
| 1719 | if HUMAN.Health == 0 then | |
| 1720 | break | |
| 1721 | end | |
| 1722 | Swait(2) | |
| 1723 | end | |
| 1724 | if HUMAN.Health == 0 then | |
| 1725 | local CHILD = HUMAN.Parent | |
| 1726 | if CHILD:FindFirstChild("Torso") then
| |
| 1727 | CHILD:FindFirstChild("Torso").CFrame = CHILD:FindFirstChild("Torso").CFrame * ANGLES(RAD(2), RAD(0), RAD(0))
| |
| 1728 | Ragdoll(CHILD,Torso,true) | |
| 1729 | elseif CHILD:FindFirstChild("UpperTorso") then
| |
| 1730 | R15Ragdoll(CHILD,true) | |
| 1731 | end | |
| 1732 | end | |
| 1733 | end)) | |
| 1734 | end | |
| 1735 | end | |
| 1736 | for i=0, 1, 0.1 / Animation_Speed do | |
| 1737 | Swait() | |
| 1738 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -1) * ANGLES(RAD(0), RAD(0), RAD(45)), 1 / Animation_Speed) | |
| 1739 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(15), RAD(-45)), 1 / Animation_Speed) | |
| 1740 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.1, 0.5, 0) * ANGLES(RAD(90), RAD(0), RAD(45)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
| 1741 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1, 0.5, -0.5) * ANGLES(RAD(25), RAD(0), RAD(80)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
| 1742 | RightHip.C0 = Clerp(RightHip.C0, CF(1, 0, -1) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1743 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1.5, 0) * ANGLES(RAD(-90), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1744 | end | |
| 1745 | ATTACK = false | |
| 1746 | Rooted = false | |
| 1747 | end | |
| 1748 | ||
| 1749 | function ScrewThis() | |
| 1750 | ATTACK = true | |
| 1751 | Rooted = true | |
| 1752 | local SCREW = CreatePart(3, Weapon, "Neon", 0, 1, "Hot pink", "Part", VT(2, 0.4, 0.4)/2,false) | |
| 1753 | SCREW.CanCollide = true | |
| 1754 | local WELD = CreateWeldOrSnapOrMotor("Weld", LeftArm, LeftArm, SCREW, CF(0,-1,0.2) * ANGLES(RAD(0), RAD(90), RAD(0)), CF(0, 0, 0))
| |
| 1755 | CreateMesh("SpecialMesh", SCREW, "FileMesh", "70265804", "70265794", VT(1,1,1)/1.5, VT(0,0,0))
| |
| 1756 | for i=0, 0.4, 0.1 / Animation_Speed do | |
| 1757 | Swait() | |
| 1758 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1759 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(15), RAD(0), RAD(45)), 1 / Animation_Speed) | |
| 1760 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.25, 0.5, -0.5) * ANGLES(RAD(90), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
| 1761 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-5), RAD(0), RAD(15)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
| 1762 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1763 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1764 | end | |
| 1765 | SCREW.Transparency = 0 | |
| 1766 | for i=0, 0.1, 0.1 / Animation_Speed do | |
| 1767 | Swait() | |
| 1768 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1769 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(15), RAD(0), RAD(-25)), 1 / Animation_Speed) | |
| 1770 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.25, 0.5, -0.5) * ANGLES(RAD(60), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
| 1771 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(90), RAD(0), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
| 1772 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1773 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1774 | end | |
| 1775 | for i=0, 1, 0.1 / Animation_Speed do | |
| 1776 | Swait() | |
| 1777 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1778 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(15), RAD(0), RAD(-25)), 1 / Animation_Speed) | |
| 1779 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.25, 0.15, -0.5) * ANGLES(RAD(40), RAD(0), RAD(-35)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
| 1780 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-0.7, 0.5, -0.3) * ANGLES(RAD(120), RAD(0), RAD(80)) * ANGLES(RAD(0), RAD(15), RAD(-25)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
| 1781 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1782 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1783 | end | |
| 1784 | for i = 1, 3 do | |
| 1785 | for i=0, 0.3, 0.1 / Animation_Speed do | |
| 1786 | Swait() | |
| 1787 | WELD.C1 = WELD.C1 * ANGLES(RAD(5), RAD(0), RAD(0)) | |
| 1788 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1789 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(15), RAD(0), RAD(-25)), 1 / Animation_Speed) | |
| 1790 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.25, 0.15, -0.5) * ANGLES(RAD(40), RAD(0), RAD(-35)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
| 1791 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-0.7, 0.5, -0.3) * ANGLES(RAD(120), RAD(0), RAD(78)) * ANGLES(RAD(0), RAD(15), RAD(-25)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
| 1792 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1793 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1794 | end | |
| 1795 | for i=0, 1, 0.1 / Animation_Speed do | |
| 1796 | Swait() | |
| 1797 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1798 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(15), RAD(0), RAD(-25)), 1 / Animation_Speed) | |
| 1799 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.25, 0.15, -0.5) * ANGLES(RAD(40), RAD(0), RAD(-35)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
| 1800 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-0.7, 0.5, -0.3) * ANGLES(RAD(120), RAD(0), RAD(80)) * ANGLES(RAD(0), RAD(15), RAD(-25)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
| 1801 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1802 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1803 | end | |
| 1804 | end | |
| 1805 | if MRANDOM(1, 5) == 1 then | |
| 1806 | DUST:Emit(25) | |
| 1807 | WELD:remove() | |
| 1808 | CreateSound(328460122, RightArm, 3, 1, false) | |
| 1809 | SCREW.Velocity = CF(RightArm.Position,SCREW.Position).lookVector*65 | |
| 1810 | Debris:AddItem(SCREW,6) | |
| 1811 | for i=0, 3, 0.1 / Animation_Speed do | |
| 1812 | Swait() | |
| 1813 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1814 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(15), RAD(0), RAD(-25)), 1 / Animation_Speed) | |
| 1815 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.25, 0.15, -0.5) * ANGLES(RAD(40), RAD(0), RAD(-35)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
| 1816 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-0.7, 0.5, -0.3) * ANGLES(RAD(120), RAD(0), RAD(80)) * ANGLES(RAD(0), RAD(15), RAD(-25)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
| 1817 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1818 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1819 | end | |
| 1820 | for i = 1, 3 do | |
| 1821 | for i=0, 0.35, 0.1 / Animation_Speed do | |
| 1822 | Swait() | |
| 1823 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1824 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(15), RAD(0), RAD(15)), 1 / Animation_Speed) | |
| 1825 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.25, 0.15, -0.5) * ANGLES(RAD(40), RAD(0), RAD(-35)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
| 1826 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-0.7, 0.5, -0.3) * ANGLES(RAD(120), RAD(0), RAD(80)) * ANGLES(RAD(0), RAD(15), RAD(-25)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
| 1827 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1828 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1829 | end | |
| 1830 | for i=0, 0.35, 0.1 / Animation_Speed do | |
| 1831 | Swait() | |
| 1832 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1833 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(15), RAD(0), RAD(-15)), 1 / Animation_Speed) | |
| 1834 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.25, 0.15, -0.5) * ANGLES(RAD(40), RAD(0), RAD(-35)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
| 1835 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-0.7, 0.5, -0.3) * ANGLES(RAD(120), RAD(0), RAD(80)) * ANGLES(RAD(0), RAD(15), RAD(-25)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
| 1836 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1837 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1838 | end | |
| 1839 | end | |
| 1840 | else | |
| 1841 | for i=0, 0.5, 0.1 / Animation_Speed do | |
| 1842 | Swait() | |
| 1843 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1844 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(60)), 1 / Animation_Speed) | |
| 1845 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
| 1846 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-90)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
| 1847 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1848 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1849 | end | |
| 1850 | WELD:remove() | |
| 1851 | for i=0, 0.15, 0.1 / Animation_Speed do | |
| 1852 | Swait() | |
| 1853 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1854 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(60)), 1 / Animation_Speed) | |
| 1855 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
| 1856 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-110)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
| 1857 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1858 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1859 | end | |
| 1860 | Debris:AddItem(SCREW,6) | |
| 1861 | end | |
| 1862 | ATTACK = false | |
| 1863 | Rooted = false | |
| 1864 | end | |
| 1865 | ||
| 1866 | --//=================================\\ | |
| 1867 | --|| ASSIGN THINGS TO KEYS | |
| 1868 | --\\=================================// | |
| 1869 | ||
| 1870 | function MouseDown(Mouse) | |
| 1871 | if ATTACK == false then | |
| 1872 | end | |
| 1873 | end | |
| 1874 | ||
| 1875 | function MouseUp(Mouse) | |
| 1876 | HOLD = false | |
| 1877 | end | |
| 1878 | ||
| 1879 | function KeyDown(Key) | |
| 1880 | KEYHOLD = true | |
| 1881 | if Key == "z" and ATTACK == false then | |
| 1882 | Warp() | |
| 1883 | end | |
| 1884 | ||
| 1885 | if Key == "b" and ATTACK == false then | |
| 1886 | Dash() | |
| 1887 | end | |
| 1888 | ||
| 1889 | if Key == "c" and ATTACK == false then | |
| 1890 | LimbRip() | |
| 1891 | end | |
| 1892 | ||
| 1893 | if Key == "v" and ATTACK == false then | |
| 1894 | Buzzsaw() | |
| 1895 | end | |
| 1896 | ||
| 1897 | if Key == "e" and ATTACK == false then | |
| 1898 | ReeeEEEEEE() | |
| 1899 | end | |
| 1900 | ||
| 1901 | if Key == "x" and ATTACK == false then | |
| 1902 | Needle() | |
| 1903 | end | |
| 1904 | ||
| 1905 | if Key == "t" and ATTACK == false then | |
| 1906 | ScrewThis() | |
| 1907 | end | |
| 1908 | end | |
| 1909 | ||
| 1910 | function KeyUp(Key) | |
| 1911 | KEYHOLD = false | |
| 1912 | end | |
| 1913 | ||
| 1914 | Mouse.Button1Down:connect(function(NEWKEY) | |
| 1915 | MouseDown(NEWKEY) | |
| 1916 | end) | |
| 1917 | Mouse.Button1Up:connect(function(NEWKEY) | |
| 1918 | MouseUp(NEWKEY) | |
| 1919 | end) | |
| 1920 | Mouse.KeyDown:connect(function(NEWKEY) | |
| 1921 | KeyDown(NEWKEY) | |
| 1922 | end) | |
| 1923 | Mouse.KeyUp:connect(function(NEWKEY) | |
| 1924 | KeyUp(NEWKEY) | |
| 1925 | end) | |
| 1926 | ||
| 1927 | --//=================================\\ | |
| 1928 | --\\=================================// | |
| 1929 | ||
| 1930 | function AntiTimeStop() | |
| 1931 | for _, c in pairs(Character:GetChildren()) do | |
| 1932 | if c:IsA("BasePart") then
| |
| 1933 | c.Anchored = false | |
| 1934 | end | |
| 1935 | end | |
| 1936 | for _, c in pairs(Weapon:GetChildren()) do | |
| 1937 | if c:IsA("BasePart") then
| |
| 1938 | c.Anchored = false | |
| 1939 | end | |
| 1940 | end | |
| 1941 | end | |
| 1942 | ||
| 1943 | --//=================================\\ | |
| 1944 | --|| WRAP THE WHOLE SCRIPT UP | |
| 1945 | --\\=================================// | |
| 1946 | ||
| 1947 | Humanoid.Changed:connect(function(Jump) | |
| 1948 | if Jump == "Jump" and (Disable_Jump == true) then | |
| 1949 | Humanoid.Jump = false | |
| 1950 | end | |
| 1951 | end) | |
| 1952 | ||
| 1953 | local sick = IT("Sound")
| |
| 1954 | ||
| 1955 | while true do | |
| 1956 | Swait() | |
| 1957 | script.Parent = WEAPONGUI | |
| 1958 | ANIMATE.Parent = nil | |
| 1959 | for _,v in next, Humanoid:GetPlayingAnimationTracks() do | |
| 1960 | v:Stop(); | |
| 1961 | end | |
| 1962 | SINE = SINE + CHANGE | |
| 1963 | local TORSOVELOCITY = (RootPart.Velocity * VT(1, 0, 1)).magnitude | |
| 1964 | local TORSOVERTICALVELOCITY = RootPart.Velocity.y | |
| 1965 | local HITFLOOR = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4, Character) | |
| 1966 | local WALKSPEEDVALUE = 6 / (Humanoid.WalkSpeed / 16) | |
| 1967 | if ANIM == "Walk" and TORSOVELOCITY > 1 then | |
| 1968 | RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, -0.15 * COS(SINE / (WALKSPEEDVALUE / 2))) * ANGLES(RAD(0), RAD(0) - RootPart.RotVelocity.Y / 75, RAD(0)), 2 * (Humanoid.WalkSpeed / 16) / Animation_Speed) | |
| 1969 | Neck.C1 = Clerp(Neck.C1, CF(0, -0.5, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) * ANGLES(RAD(2.5 * SIN(SINE / (WALKSPEEDVALUE / 2))), RAD(0), RAD(0) - Head.RotVelocity.Y / 30), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed) | |
| 1970 | RightHip.C1 = Clerp(RightHip.C1, CF(0.5, 0.875 - 0.125 * SIN(SINE / WALKSPEEDVALUE) - 0.15 * COS(SINE / WALKSPEEDVALUE*2), -0.125 * COS(SINE / WALKSPEEDVALUE) +0.2- 0.2 * COS(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0) - RightLeg.RotVelocity.Y / 75, RAD(0), RAD(90 * COS(SINE / WALKSPEEDVALUE))), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed) | |
| 1971 | LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5, 0.875 + 0.125 * SIN(SINE / WALKSPEEDVALUE) - 0.15 * COS(SINE / WALKSPEEDVALUE*2), 0.125 * COS(SINE / WALKSPEEDVALUE) +0.2+ 0.2 * COS(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0) + LeftLeg.RotVelocity.Y / 75, RAD(0), RAD(90 * COS(SINE / WALKSPEEDVALUE))), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed) | |
| 1972 | elseif (ANIM ~= "Walk") or (TORSOVELOCITY < 1) then | |
| 1973 | RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
| 1974 | Neck.C1 = Clerp(Neck.C1, CF(0, -0.5, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
| 1975 | RightHip.C1 = Clerp(RightHip.C1, CF(0.5, 1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
| 1976 | LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5, 1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
| 1977 | end | |
| 1978 | if HITFLOOR == nil then | |
| 1979 | ANIM = "Midair" | |
| 1980 | if ATTACK == false then | |
| 1981 | RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0 ) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1982 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0 , 0 + ((1) - 1)) * ANGLES(RAD(20), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1983 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.75, 0) * ANGLES(RAD(-15), RAD(0), RAD(25)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
| 1984 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.75, 0) * ANGLES(RAD(-15), RAD(0), RAD(-25)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
| 1985 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.2, -0.6) * ANGLES(RAD(15), RAD(70), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1986 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -0.2, -0.6) * ANGLES(RAD(15), RAD(-70), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1987 | end | |
| 1988 | elseif TORSOVELOCITY < 1 and HITFLOOR ~= nil then | |
| 1989 | ANIM = "Idle" | |
| 1990 | if ATTACK == false then | |
| 1991 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.1 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
| 1992 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
| 1993 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5 + 0.35 * SIN(SINE / 12), 0) * ANGLES(RAD(0), RAD(0), RAD(10 - 15 * COS(SINE / 12))) * ANGLES(RAD(0), RAD(-15), RAD(0)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed) | |
| 1994 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5 + 0.35 * SIN(SINE / 12), 0) * ANGLES(RAD(0), RAD(0), RAD(-10 + 15 * COS(SINE / 12))) * ANGLES(RAD(0), RAD(15), RAD(0)) * LEFTSHOULDERC0, 0.15 / Animation_Speed) | |
| 1995 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), 0) * ANGLES(RAD(0), RAD(80), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1996 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), 0) * ANGLES(RAD(0), RAD(-80), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(0)), 1 / Animation_Speed) | |
| 1997 | end | |
| 1998 | elseif TORSOVELOCITY > 1 and HITFLOOR ~= nil then | |
| 1999 | ANIM = "Walk" | |
| 2000 | if ATTACK == false then | |
| 2001 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.1) * ANGLES(RAD(5), RAD(0), RAD(10 * COS(SINE / WALKSPEEDVALUE))), 0.5 / Animation_Speed) | |
| 2002 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(5), RAD(0), RAD(-10 * COS(SINE / WALKSPEEDVALUE))), 0.5 / Animation_Speed) | |
| 2003 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0.5 * SIN(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(60 * COS(SINE / WALKSPEEDVALUE)), RAD(0), RAD(5)) * ANGLES(RAD(0), RAD(-15), RAD(0)) * RIGHTSHOULDERC0, 0.8 / Animation_Speed) | |
| 2004 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, -0.5 * SIN(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(-60 * COS(SINE / WALKSPEEDVALUE)), RAD(0), RAD(-5)) * ANGLES(RAD(0), RAD(15), RAD(0)) * LEFTSHOULDERC0, 0.8 / Animation_Speed) | |
| 2005 | RightHip.C0 = Clerp(RightHip.C0, CF(1 , -1, 0) * ANGLES(RAD(0), RAD(80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(-15)), 2 / Animation_Speed) | |
| 2006 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(15)), 2 / Animation_Speed) | |
| 2007 | end | |
| 2008 | end | |
| 2009 | Humanoid.MaxHealth = "inf" | |
| 2010 | Humanoid.Health = "inf" | |
| 2011 | sick.SoundId = "rbxassetid://491888075" | |
| 2012 | sick.Looped = true | |
| 2013 | sick.Pitch = 1 | |
| 2014 | sick.Volume = 2 | |
| 2015 | sick.Playing = true | |
| 2016 | sick.Parent = Effects | |
| 2017 | AntiTimeStop() | |
| 2018 | refit() | |
| 2019 | if Rooted == false then | |
| 2020 | Disable_Jump = false | |
| 2021 | Humanoid.WalkSpeed = Speed | |
| 2022 | elseif Rooted == true then | |
| 2023 | Disable_Jump = true | |
| 2024 | Humanoid.WalkSpeed = 0 | |
| 2025 | end | |
| 2026 | ---Humanoid.Name = "Killbot" | |
| 2027 | --end | |
| 2028 | end | |
| 2029 | ||
| 2030 | --//=================================\\ | |
| 2031 | --\\=================================// | |
| 2032 | ||
| 2033 | --//====================================================\\-- | |
| 2034 | --|| END OF SCRIPT | |
| 2035 | --\\====================================================//-- |