SHOW:
|
|
- or go back to the newest paste.
| 1 | if game:GetService("RunService"):IsClient() then error("Please run as a server script. Use h/ instead of hl/.") end
| |
| 2 | print("FE Compatibility: by WaverlyCole & Mokiros")
| |
| 3 | InternalData = {}
| |
| 4 | do | |
| 5 | script.Parent = owner.Character | |
| 6 | local Event = Instance.new("RemoteEvent")
| |
| 7 | Event.Name = "UserInput" | |
| 8 | local function NewFakeEvent() | |
| 9 | local Fake = {fakeEvent=true,Connect=function(self,Func)self.Function=Func end}Fake.connect = Fake.Connect
| |
| 10 | return Fake | |
| 11 | end | |
| 12 | local Mouse = {Target=nil,Hit=CFrame.new(),KeyUp=NewFakeEvent(),KeyDown=NewFakeEvent(),Button1Up=NewFakeEvent(),Button1Down=NewFakeEvent()}
| |
| 13 | local UserInputService = {InputBegan=NewFakeEvent(),InputEnded=NewFakeEvent()}
| |
| 14 | local ContextActionService = {Actions={},BindAction = function(self,actionName,Func,touch,...)
| |
| 15 | self.Actions[actionName] = Func and {Name=actionName,Function=Func,Keys={...}} or nil
| |
| 16 | end};ContextActionService.UnBindAction = ContextActionService.BindAction | |
| 17 | local function TriggerEvent(self,Event,...) | |
| 18 | local Trigger = Mouse[Event] | |
| 19 | if Trigger and Trigger.fakeEvent and Trigger.Function then | |
| 20 | Trigger.Function(...) | |
| 21 | end | |
| 22 | end | |
| 23 | Mouse.TrigEvent = TriggerEvent | |
| 24 | UserInputService.TrigEvent = TriggerEvent | |
| 25 | Event.OnServerEvent:Connect(function(FiredBy,Input) | |
| 26 | if FiredBy.Name ~= owner.Name then end | |
| 27 | if Input.MouseEvent then | |
| 28 | Mouse.Target = Input.Target | |
| 29 | Mouse.Hit = Input.Hit | |
| 30 | else | |
| 31 | local Begin = Input.UserInputState == Enum.UserInputState.Begin | |
| 32 | if Input.UserInputType == Enum.UserInputType.MouseButton1 then | |
| 33 | return Mouse:TrigEvent(Begin and "Button1Down" or "Button1Up") | |
| 34 | end | |
| 35 | for _,Action in pairs(ContextActionService.Actions) do | |
| 36 | for _,Key in pairs(Action.Keys) do | |
| 37 | if Key==Input.KeyCode then | |
| 38 | Action.Function(Action.Name,Input.UserInputState,Input) | |
| 39 | end | |
| 40 | end | |
| 41 | end | |
| 42 | Mouse:TrigEvent(Begin and "KeyDown" or "KeyUp",Input.KeyCode.Name:lower()) | |
| 43 | UserInputService:TrigEvent(Begin and "InputBegan" or "InputEnded",Input,false) | |
| 44 | end | |
| 45 | end) | |
| 46 | InternalData["Mouse"] = Mouse | |
| 47 | InternalData["ContextActionService"] = ContextActionService | |
| 48 | InternalData["UserInputService"] = UserInputService | |
| 49 | Event.Parent = NLS([[ | |
| 50 | local Player = owner | |
| 51 | local Event = script:WaitForChild("UserInput")
| |
| 52 | local UserInputService = game:GetService("UserInputService")
| |
| 53 | local Mouse = Player:GetMouse() | |
| 54 | local Input = function(Input,gameProcessedEvent) | |
| 55 | if gameProcessedEvent then return end | |
| 56 | Event:FireServer({KeyCode=Input.KeyCode,UserInputType=Input.UserInputType,UserInputState=Input.UserInputState})
| |
| 57 | end | |
| 58 | UserInputService.InputBegan:Connect(Input) | |
| 59 | UserInputService.InputEnded:Connect(Input) | |
| 60 | local Hit,Target | |
| 61 | while wait(1/30) do | |
| 62 | if Hit ~= Mouse.Hit or Target ~= Mouse.Target then | |
| 63 | Hit,Target = Mouse.Hit,Mouse.Target | |
| 64 | Event:FireServer({["MouseEvent"]=true,["Target"]=Target,["Hit"]=Hit})
| |
| 65 | end | |
| 66 | end | |
| 67 | ]],owner.Character) | |
| 68 | end | |
| 69 | RealGame = game;game = setmetatable({},{
| |
| 70 | __index = function (self,Index) | |
| 71 | local Sandbox = function (Thing) | |
| 72 | if Thing:IsA("Player") then
| |
| 73 | local RealPlayer = Thing | |
| 74 | return setmetatable({},{
| |
| 75 | __index = function (self,Index) | |
| 76 | local Type = type(RealPlayer[Index]) | |
| 77 | if Type == "function" then | |
| 78 | if Index:lower() == "getmouse" or Index:lower() == "mouse" then | |
| 79 | return function (self) | |
| 80 | return InternalData["Mouse"] | |
| 81 | end | |
| 82 | end | |
| 83 | return function (self,...) | |
| 84 | return RealPlayer[Index](RealPlayer,...) | |
| 85 | end | |
| 86 | else | |
| 87 | return RealPlayer[Index] | |
| 88 | end | |
| 89 | end; | |
| 90 | __tostring = function(self) | |
| 91 | return RealPlayer.Name | |
| 92 | end | |
| 93 | }) | |
| 94 | end | |
| 95 | end | |
| 96 | if RealGame[Index] then | |
| 97 | local Type = type(RealGame[Index]) | |
| 98 | if Type == "function" then | |
| 99 | if Index:lower() == "getservice" or Index:lower() == "service" then | |
| 100 | return function (self,Service) | |
| 101 | if Service:lower() == "players" then | |
| 102 | return setmetatable({},{
| |
| 103 | __index = function (self2,Index2) | |
| 104 | local RealService = RealGame:GetService(Service) | |
| 105 | local Type2 = type(Index2) | |
| 106 | if Type2 == "function" then | |
| 107 | return function (self,...) | |
| 108 | return RealService[Index2](RealService,...) | |
| 109 | end | |
| 110 | else | |
| 111 | if Index2:lower() == "localplayer" then | |
| 112 | return Sandbox(owner) | |
| 113 | end | |
| 114 | return RealService[Index2] | |
| 115 | end | |
| 116 | end; | |
| 117 | __tostring = function(self) | |
| 118 | return RealGame:GetService(Service).Name | |
| 119 | end | |
| 120 | }) | |
| 121 | elseif Service:lower() == "contextactionservice" then | |
| 122 | return InternalData["ContextActionService"] | |
| 123 | elseif Service:lower() == "contextactionservice" then | |
| 124 | return InternalData["UserInputService"] | |
| 125 | elseif Service:lower() == "runservice" then | |
| 126 | return setmetatable({},{
| |
| 127 | __index = function(self2,Index2) | |
| 128 | local RealService = RealGame:GetService(Service) | |
| 129 | local Type2 = type(Index2) | |
| 130 | if Type2 == "function" then | |
| 131 | return function (self,...) | |
| 132 | return RealService[Index2](RealService,...) | |
| 133 | end | |
| 134 | else | |
| 135 | if Index2:lower() == "bindtorenderstep" then | |
| 136 | return function (self,Name,Priority,Function) | |
| 137 | return RealGame:GetService("RunService").Stepped:Connect(Function)
| |
| 138 | end | |
| 139 | end | |
| 140 | if Index2:lower() == "renderstepped" then | |
| 141 | return RealService["Stepped"] | |
| 142 | end | |
| 143 | return RealService[Index2] | |
| 144 | end | |
| 145 | end | |
| 146 | }) | |
| 147 | else | |
| 148 | return RealGame:GetService(Service) | |
| 149 | end | |
| 150 | end | |
| 151 | end | |
| 152 | return function (self,...) | |
| 153 | return RealGame[Index](RealGame,...) | |
| 154 | end | |
| 155 | else | |
| 156 | if game:GetService(Index) then | |
| 157 | return game:GetService(Index) | |
| 158 | end | |
| 159 | return RealGame[Index] | |
| 160 | end | |
| 161 | else | |
| 162 | return nil | |
| 163 | end | |
| 164 | end | |
| 165 | });Game = game;owner = game:GetService("Players").LocalPlayer
| |
| 166 | ||
| 167 | local plr = game.Players.LocalPlayer | |
| 168 | local good = true | |
| 169 | local R15 = false | |
| 170 | while plr.Character == nil or plr.Character:FindFirstChildOfClass('Humanoid') == nil do
| |
| 171 | wait() | |
| 172 | end | |
| 173 | if plr.Character:FindFirstChildOfClass('Humanoid').RigType == Enum.HumanoidRigType.R15 then
| |
| 174 | R15 = true | |
| 175 | end | |
| 176 | ||
| 177 | function makegui() | |
| 178 | -- Objects | |
| 179 | ||
| 180 | local ScreenGui = Instance.new("ScreenGui")
| |
| 181 | local Frame = Instance.new("Frame")
| |
| 182 | local TextBox = Instance.new("TextLabel")
| |
| 183 | ||
| 184 | -- Properties | |
| 185 | ||
| 186 | ScreenGui.Parent = plr.PlayerGui | |
| 187 | ||
| 188 | Frame.Parent = ScreenGui | |
| 189 | Frame.BackgroundColor3 = Color3.new(0.117647, 0.117647, 0.117647) | |
| 190 | Frame.BackgroundTransparency = 0.5 | |
| 191 | Frame.BorderSizePixel = 0 | |
| 192 | Frame.Size = UDim2.new(1, 0, 0, 0) | |
| 193 | ||
| 194 | TextBox.Parent = Frame | |
| 195 | TextBox.BackgroundColor3 = Color3.new(1, 1, 1) | |
| 196 | TextBox.BackgroundTransparency = 1 | |
| 197 | TextBox.Position = UDim2.new(0.05, 0, 0.05, 0) | |
| 198 | TextBox.Size = UDim2.new(0.899999976, 0, 0.899999976, 0) | |
| 199 | TextBox.Font = Enum.Font.Code | |
| 200 | TextBox.FontSize = Enum.FontSize.Size14 | |
| 201 | TextBox.Text = "" | |
| 202 | TextBox.TextColor3 = Color3.new(1, 1, 1) | |
| 203 | TextBox.TextScaled = true | |
| 204 | TextBox.TextSize = 14 | |
| 205 | TextBox.TextWrapped = true | |
| 206 | Frame:TweenSize(UDim2.new(1, 0, 0.2, 0),Enum.EasingDirection.Out,Enum.EasingStyle.Bounce,1,false) | |
| 207 | wait(1.5) | |
| 208 | local text = "This script doesn't work in R15, sorry!" | |
| 209 | for i=1,string.len(text) do | |
| 210 | TextBox.Text = string.sub(text,1,i) | |
| 211 | wait() | |
| 212 | end | |
| 213 | wait(2) | |
| 214 | TextBox.Text = "" | |
| 215 | Frame:TweenSize(UDim2.new(1, 0, 0, 0),Enum.EasingDirection.Out,Enum.EasingStyle.Bounce,1,false) | |
| 216 | end | |
| 217 | function makegui2() | |
| 218 | -- Objects | |
| 219 | ||
| 220 | local ScreenGui = Instance.new("ScreenGui")
| |
| 221 | local Frame = Instance.new("Frame")
| |
| 222 | local TextBox = Instance.new("TextLabel")
| |
| 223 | ||
| 224 | -- Properties | |
| 225 | ||
| 226 | ScreenGui.Parent = plr.PlayerGui | |
| 227 | ||
| 228 | Frame.Parent = ScreenGui | |
| 229 | Frame.BackgroundColor3 = Color3.new(0.117647, 0.117647, 0.117647) | |
| 230 | Frame.BackgroundTransparency = 0.5 | |
| 231 | Frame.BorderSizePixel = 0 | |
| 232 | Frame.Size = UDim2.new(1, 0, 0, 0) | |
| 233 | ||
| 234 | TextBox.Parent = Frame | |
| 235 | TextBox.BackgroundColor3 = Color3.new(1, 1, 1) | |
| 236 | TextBox.BackgroundTransparency = 1 | |
| 237 | TextBox.Position = UDim2.new(0.05, 0, 0.05, 0) | |
| 238 | TextBox.Size = UDim2.new(0.899999976, 0, 0.899999976, 0) | |
| 239 | TextBox.Font = Enum.Font.Code | |
| 240 | TextBox.FontSize = Enum.FontSize.Size14 | |
| 241 | TextBox.Text = "" | |
| 242 | TextBox.TextColor3 = Color3.new(1, 1, 1) | |
| 243 | TextBox.TextScaled = true | |
| 244 | TextBox.TextSize = 14 | |
| 245 | TextBox.TextWrapped = true | |
| 246 | Frame:TweenSize(UDim2.new(1, 0, 0.2, 0),Enum.EasingDirection.Out,Enum.EasingStyle.Bounce,1,false) | |
| 247 | wait(1.5) | |
| 248 | local text = "This script doesn't work in Filtering Enabled, sorry!" | |
| 249 | for i=1,string.len(text) do | |
| 250 | TextBox.Text = string.sub(text,1,i) | |
| 251 | wait() | |
| 252 | end | |
| 253 | wait(2) | |
| 254 | TextBox.Text = "" | |
| 255 | Frame:TweenSize(UDim2.new(1, 0, 0, 0),Enum.EasingDirection.Out,Enum.EasingStyle.Bounce,1,false) | |
| 256 | end | |
| 257 | function makegui3() | |
| 258 | -- Objects | |
| 259 | ||
| 260 | local ScreenGui = Instance.new("ScreenGui")
| |
| 261 | local Frame = Instance.new("Frame")
| |
| 262 | local TextBox = Instance.new("TextLabel")
| |
| 263 | ||
| 264 | -- Properties | |
| 265 | ||
| 266 | ScreenGui.Parent = plr.PlayerGui | |
| 267 | ||
| 268 | Frame.Parent = ScreenGui | |
| 269 | Frame.BackgroundColor3 = Color3.new(0.117647, 0.117647, 0.117647) | |
| 270 | Frame.BackgroundTransparency = 0.5 | |
| 271 | Frame.BorderSizePixel = 0 | |
| 272 | Frame.Size = UDim2.new(1, 0, 0, 0) | |
| 273 | ||
| 274 | TextBox.Parent = Frame | |
| 275 | TextBox.BackgroundColor3 = Color3.new(1, 1, 1) | |
| 276 | TextBox.BackgroundTransparency = 1 | |
| 277 | TextBox.Position = UDim2.new(0.05, 0, 0.05, 0) | |
| 278 | TextBox.Size = UDim2.new(0.899999976, 0, 0.899999976, 0) | |
| 279 | TextBox.Font = Enum.Font.Code | |
| 280 | TextBox.FontSize = Enum.FontSize.Size14 | |
| 281 | TextBox.Text = "" | |
| 282 | TextBox.TextColor3 = Color3.new(1, 1, 1) | |
| 283 | TextBox.TextScaled = true | |
| 284 | TextBox.TextSize = 14 | |
| 285 | TextBox.TextWrapped = true | |
| 286 | Frame:TweenSize(UDim2.new(1, 0, 0.2, 0),Enum.EasingDirection.Out,Enum.EasingStyle.Bounce,1,false) | |
| 287 | wait(1.5) | |
| 288 | local text = "Press F on a player to force choke them, and hold G to use force lightning." | |
| 289 | for i=1,string.len(text) do | |
| 290 | TextBox.Text = string.sub(text,1,i) | |
| 291 | wait() | |
| 292 | end | |
| 293 | wait(2) | |
| 294 | TextBox.Text = "" | |
| 295 | Frame:TweenSize(UDim2.new(1, 0, 0, 0),Enum.EasingDirection.Out,Enum.EasingStyle.Bounce,1,false) | |
| 296 | end | |
| 297 | ||
| 298 | ||
| 299 | local coru = coroutine.wrap(function() | |
| 300 | if R15 then | |
| 301 | good = false | |
| 302 | makegui() | |
| 303 | elseif workspace.FilteringEnabled then | |
| 304 | good = false | |
| 305 | makegui2() | |
| 306 | else | |
| 307 | makegui3() | |
| 308 | end | |
| 309 | end) | |
| 310 | coru() | |
| 311 | ||
| 312 | ||
| 313 | if good then | |
| 314 | local mou = plr:GetMouse() | |
| 315 | local choking = false | |
| 316 | local zapping = false | |
| 317 | local target = nil | |
| 318 | local lastzap = nil | |
| 319 | local oldHit = nil | |
| 320 | local startpos = CFrame.new(0,0,0) | |
| 321 | local beforehealth = 100 | |
| 322 | local timez = 0 | |
| 323 | ||
| 324 | Gibs = workspace | |
| 325 | ||
| 326 | function Kill(Character,yee,oh) | |
| 327 | if Character:FindFirstChildOfClass('Humanoid') then
| |
| 328 | Character:FindFirstChildOfClass('Humanoid').Health = 0
| |
| 329 | local svch = Character | |
| 330 | local hum = Character:findFirstChild("Humanoid")
| |
| 331 | Character.Archivable = true | |
| 332 | local chrclone = Character:clone() | |
| 333 | Character.Archivable = false | |
| 334 | ||
| 335 | local ch = chrclone:GetChildren() | |
| 336 | local i | |
| 337 | for i = 1,#ch do | |
| 338 | if ch[i].Name == "THandle1" or ch[i].Name == "THandle2" or ch[i].ClassName == "Script" then | |
| 339 | ch[i]:remove() | |
| 340 | end | |
| 341 | end | |
| 342 | local function Scan(ch) | |
| 343 | local e | |
| 344 | for e = 1,#ch do | |
| 345 | Scan(ch[e]:GetChildren()) | |
| 346 | if ch[e].ClassName == "Weld" or ch[e].ClassName == "Motor6D" then | |
| 347 | ch[e]:remove() | |
| 348 | end | |
| 349 | end | |
| 350 | end | |
| 351 | Scan(chrclone:GetChildren()) | |
| 352 | ||
| 353 | local hum2 = chrclone:findFirstChild("Humanoid")
| |
| 354 | ||
| 355 | ||
| 356 | if hum2 ~= nil then | |
| 357 | hum2.Name = "Humanoid2" | |
| 358 | hum2.PlatformStand = true | |
| 359 | hum2.Sit = true | |
| 360 | hum2.MaxHealth = 0 | |
| 361 | hum2.Health = 0 | |
| 362 | end | |
| 363 | ||
| 364 | local ch = Character:GetChildren() | |
| 365 | local i | |
| 366 | for i = 1,#ch do | |
| 367 | if ch[i].Name == "THandle1" or ch[i].Name == "THandle2" then | |
| 368 | ch[i]:remove() | |
| 369 | end | |
| 370 | end | |
| 371 | ||
| 372 | wait(0.2) | |
| 373 | ||
| 374 | local ch = Character:GetChildren() | |
| 375 | local i | |
| 376 | for i = 1,#ch do | |
| 377 | if ch[i].ClassName == "Part" or ch[i].ClassName == "Hat" or ch[i].Name == "THandle1" or ch[i].Name == "THandle2" then | |
| 378 | ch[i]:remove() | |
| 379 | end | |
| 380 | end | |
| 381 | Character = chrclone | |
| 382 | local Torso = Character.Torso | |
| 383 | local movevector = Vector3.new() | |
| 384 | if Character.Torso ~= nil then | |
| 385 | local killtors = Character:findFirstChild("Torso")
| |
| 386 | if killtors ~= nil then | |
| 387 | movevector = CFrame.new(plr.Character["Right Arm"].Position,Torso.Position).lookVector | |
| 388 | end | |
| 389 | end | |
| 390 | if Torso then | |
| 391 | local Head = Character:FindFirstChild("Head")
| |
| 392 | if Head and yee == false then | |
| 393 | local Neck = Instance.new("Weld")
| |
| 394 | Neck.Name = "Neck" | |
| 395 | Neck.Part0 = Torso | |
| 396 | Neck.Part1 = Head | |
| 397 | Neck.C0 = CFrame.new(0, 1.5, 0) | |
| 398 | Neck.C1 = CFrame.new() | |
| 399 | Neck.Parent = Torso | |
| 400 | end | |
| 401 | local Limb = Character:FindFirstChild("Right Arm")
| |
| 402 | if Limb then | |
| 403 | Limb.CFrame = Torso.CFrame * CFrame.new(1.5, 0, 0) | |
| 404 | local Joint = Instance.new("Glue")
| |
| 405 | Joint.Name = "RightShoulder" | |
| 406 | Joint.Part0 = Torso | |
| 407 | Joint.Part1 = Limb | |
| 408 | Joint.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
| 409 | Joint.C1 = CFrame.new(-0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
| 410 | Joint.Parent = Torso | |
| 411 | local B = Instance.new("Part")
| |
| 412 | B.TopSurface = 0 | |
| 413 | B.BottomSurface = 0 | |
| 414 | B.formFactor = "Symmetric" | |
| 415 | B.Size = Vector3.new(1, 1, 1) | |
| 416 | B.Transparency = 1 | |
| 417 | B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0) | |
| 418 | B.Parent = Character | |
| 419 | local W = Instance.new("Weld")
| |
| 420 | W.Part0 = Limb | |
| 421 | W.Part1 = B | |
| 422 | W.C0 = CFrame.new(0, -0.5, 0) | |
| 423 | W.Parent = Limb | |
| 424 | end | |
| 425 | local Limb = Character:FindFirstChild("Left Arm")
| |
| 426 | if Limb then | |
| 427 | Limb.CFrame = Torso.CFrame * CFrame.new(-1.5, 0, 0) | |
| 428 | local Joint = Instance.new("Glue")
| |
| 429 | Joint.Name = "LeftShoulder" | |
| 430 | Joint.Part0 = Torso | |
| 431 | Joint.Part1 = Limb | |
| 432 | Joint.C0 = CFrame.new(-1.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) | |
| 433 | Joint.C1 = CFrame.new(0, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) | |
| 434 | Joint.Parent = Torso | |
| 435 | ||
| 436 | local B = Instance.new("Part")
| |
| 437 | B.TopSurface = 0 | |
| 438 | B.BottomSurface = 0 | |
| 439 | B.formFactor = "Symmetric" | |
| 440 | B.Size = Vector3.new(1, 1, 1) | |
| 441 | B.Transparency = 1 | |
| 442 | B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0) | |
| 443 | B.Parent = Character | |
| 444 | local W = Instance.new("Weld")
| |
| 445 | W.Part0 = Limb | |
| 446 | W.Part1 = B | |
| 447 | W.C0 = CFrame.new(0, -0.5, 0) | |
| 448 | W.Parent = Limb | |
| 449 | end | |
| 450 | local Limb = Character:FindFirstChild("Right Leg")
| |
| 451 | if Limb then | |
| 452 | ||
| 453 | Limb.CFrame = Torso.CFrame * CFrame.new(0.5, -2, 0) | |
| 454 | local Joint = Instance.new("Glue")
| |
| 455 | Joint.Name = "RightHip" | |
| 456 | Joint.Part0 = Torso | |
| 457 | Joint.Part1 = Limb | |
| 458 | Joint.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
| 459 | Joint.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
| 460 | Joint.Parent = Torso | |
| 461 | ||
| 462 | local B = Instance.new("Part")
| |
| 463 | B.TopSurface = 0 | |
| 464 | B.BottomSurface = 0 | |
| 465 | B.formFactor = "Symmetric" | |
| 466 | B.Size = Vector3.new(1, 1, 1) | |
| 467 | B.Transparency = 1 | |
| 468 | B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0) | |
| 469 | B.Parent = Character | |
| 470 | local W = Instance.new("Weld")
| |
| 471 | W.Part0 = Limb | |
| 472 | W.Part1 = B | |
| 473 | W.C0 = CFrame.new(0, -0.5, 0) | |
| 474 | W.Parent = Limb | |
| 475 | ||
| 476 | end | |
| 477 | local Limb = Character:FindFirstChild("Left Leg")
| |
| 478 | if Limb then | |
| 479 | ||
| 480 | Limb.CFrame = Torso.CFrame * CFrame.new(-0.5, -2, 0) | |
| 481 | local Joint = Instance.new("Glue")
| |
| 482 | Joint.Name = "LeftHip" | |
| 483 | Joint.Part0 = Torso | |
| 484 | Joint.Part1 = Limb | |
| 485 | Joint.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) | |
| 486 | Joint.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) | |
| 487 | Joint.Parent = Torso | |
| 488 | ||
| 489 | local B = Instance.new("Part")
| |
| 490 | B.TopSurface = 0 | |
| 491 | B.BottomSurface = 0 | |
| 492 | B.formFactor = "Symmetric" | |
| 493 | B.Size = Vector3.new(1, 1, 1) | |
| 494 | B.Transparency = 1 | |
| 495 | B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0) | |
| 496 | B.Parent = Character | |
| 497 | local W = Instance.new("Weld")
| |
| 498 | W.Part0 = Limb | |
| 499 | W.Part1 = B | |
| 500 | W.C0 = CFrame.new(0, -0.5, 0) | |
| 501 | W.Parent = Limb | |
| 502 | ||
| 503 | end | |
| 504 | --[ | |
| 505 | local Bar = Instance.new("Part")
| |
| 506 | Bar.TopSurface = 0 | |
| 507 | Bar.BottomSurface = 0 | |
| 508 | Bar.formFactor = "Symmetric" | |
| 509 | Bar.Size = Vector3.new(1, 1, 1) | |
| 510 | Bar.Transparency = 1 | |
| 511 | Bar.CFrame = Torso.CFrame * CFrame.new(0, 0.5, 0) | |
| 512 | Bar.Parent = Character | |
| 513 | local Weld = Instance.new("Weld")
| |
| 514 | Weld.Part0 = Torso | |
| 515 | Weld.Part1 = Bar | |
| 516 | Weld.C0 = CFrame.new(0, 0.5, 0) | |
| 517 | Weld.Parent = Torso | |
| 518 | --]] | |
| 519 | end | |
| 520 | Character.Parent = Gibs | |
| 521 | game.Debris:AddItem(Character, 12) | |
| 522 | Character.Torso.Velocity = plr.Character.Torso.CFrame.lookVector*10 | |
| 523 | Character.Head.Velocity = plr.Character.Torso.CFrame.lookVector*10 | |
| 524 | if oh then | |
| 525 | local repulse = Instance.new('BodyForce',Torso)
| |
| 526 | repulse.Force = movevector*10000 + Vector3.new(0,1000,0) | |
| 527 | game.Debris:AddItem(repulse,0.05) | |
| 528 | for i,v in pairs(chrclone:GetChildren()) do | |
| 529 | if v:IsA('BasePart') then
| |
| 530 | v.BrickColor = BrickColor.Black() | |
| 531 | end | |
| 532 | end | |
| 533 | local sound = Instance.new('Sound',Torso)
| |
| 534 | sound.EmitterSize = 50 | |
| 535 | sound.MaxDistance = 100 | |
| 536 | sound.Volume = 6 | |
| 537 | sound.SoundId = 'rbxassetid://157325701' | |
| 538 | sound:Play() | |
| 539 | sound.Ended:connect(function() | |
| 540 | sound:Destroy() | |
| 541 | end) | |
| 542 | end | |
| 543 | local duh = Torso | |
| 544 | if yee == true then | |
| 545 | ee = Instance.new("Part")
| |
| 546 | ee.Anchored = false | |
| 547 | ee.CanCollide = false | |
| 548 | ee.Parent = duh | |
| 549 | ee.Transparency =1 | |
| 550 | ee.Size = Vector3.new(0.15, 0.15, 0.15) | |
| 551 | wee = Instance.new("Weld")
| |
| 552 | wee.Parent = duh | |
| 553 | wee.Part0 = duh | |
| 554 | wee.Part1 = ee | |
| 555 | wee.C0 = CFrame.new(0, 1, 0) | |
| 556 | ge = Instance.new('ParticleEmitter')
| |
| 557 | ge.Parent = ee | |
| 558 | ge.Texture = "rbxassetid://29712167" | |
| 559 | ge.Size = NumberSequence.new(0.2,0.05) | |
| 560 | ge.Acceleration = Vector3.new(0, -20, 0) | |
| 561 | ge.Rate = 100000 | |
| 562 | ge.Speed = NumberRange.new(7,8) | |
| 563 | ge.Lifetime = NumberRange.new(3,4) | |
| 564 | ge.VelocitySpread = 10 | |
| 565 | ge.VelocityInheritance = 0.3 | |
| 566 | ea = Instance.new("Part")
| |
| 567 | ea.Anchored = false | |
| 568 | ea.CanCollide = false | |
| 569 | ea.Parent = Character.Head | |
| 570 | ea.Transparency =1 | |
| 571 | ea.Size = Vector3.new(0.15, 0.15, 0.15) | |
| 572 | wea = Instance.new("Weld")
| |
| 573 | wea.Parent = Character.Head | |
| 574 | wea.Part0 = Character.Head | |
| 575 | wea.Part1 = ea | |
| 576 | wea.C0 = CFrame.new(0, -0.7, 0) | |
| 577 | ga = Instance.new('ParticleEmitter')
| |
| 578 | ga.Parent = ea | |
| 579 | ga.Texture = "rbxassetid://29712167" | |
| 580 | ga.Size = NumberSequence.new(0.2,0.05) | |
| 581 | ga.Acceleration = Vector3.new(0, -20, 0) | |
| 582 | ga.Rate = 100000 | |
| 583 | ga.Speed = NumberRange.new(7,8) | |
| 584 | ga.Lifetime = NumberRange.new(3,4) | |
| 585 | ga.VelocitySpread = 10 | |
| 586 | ga.VelocityInheritance = 0.3 | |
| 587 | ga.EmissionDirection = Enum.NormalId.Bottom | |
| 588 | end | |
| 589 | end | |
| 590 | end | |
| 591 | ||
| 592 | function gettouching(startpos,endpos,dont) | |
| 593 | local ray = Ray.new(startpos,(endpos-startpos).unit*300) | |
| 594 | local ignore = {}
| |
| 595 | for i,v in pairs(game:GetService('Players'):GetChildren()) do
| |
| 596 | if v.Character and v ~= plr then | |
| 597 | table.insert(ignore,v.Character) | |
| 598 | end | |
| 599 | end | |
| 600 | local part,pos = workspace:FindPartOnRayWithWhitelist(ray,ignore,false) | |
| 601 | if part then | |
| 602 | if part.Parent:FindFirstChildOfClass('Humanoid') and part.Parent:FindFirstChildOfClass('Humanoid').Health > 0 then
| |
| 603 | local coru = coroutine.wrap(function() | |
| 604 | Kill(part.Parent,false,true) | |
| 605 | end) | |
| 606 | coru() | |
| 607 | end | |
| 608 | end | |
| 609 | table.insert(ignore,dont) | |
| 610 | local part2,pos2 = workspace:FindPartOnRayWithIgnoreList(ray,ignore,false,true) | |
| 611 | if part2 and part2.Parent and part2.Parent ~= plr.Character and part2.Parent:FindFirstChildOfClass('Humanoid') and part2.Parent:FindFirstChildOfClass('Humanoid').Health > 0 then
| |
| 612 | local coru = coroutine.wrap(function() | |
| 613 | Kill(part2.Parent,false,true) | |
| 614 | end) | |
| 615 | coru() | |
| 616 | end | |
| 617 | end | |
| 618 | ||
| 619 | function makelaser(parent) | |
| 620 | local part = Instance.new('Part',parent)
| |
| 621 | part.Size = Vector3.new(0.2,0.2,0.2) | |
| 622 | part.Transparency = 1 | |
| 623 | part.CanCollide = false | |
| 624 | local weld = Instance.new('Weld',part)
| |
| 625 | weld.Part0 = part | |
| 626 | weld.Part1 = plr.Character["Right Arm"] | |
| 627 | weld.C0 = CFrame.new(0,1.25,0) | |
| 628 | for i=1,5 do | |
| 629 | local mouse = mou | |
| 630 | targ = mouse.Target | |
| 631 | if targ then | |
| 632 | hum = targ.Parent:findFirstChild("Humanoid")
| |
| 633 | Hit = mouse.hit | |
| 634 | local P = Instance.new("Part")
| |
| 635 | P.Name = "Guideline" | |
| 636 | P.Material = Enum.Material.Neon | |
| 637 | local Place0 = part.CFrame | |
| 638 | P.formFactor = 0 | |
| 639 | P.Size = Vector3.new(1,1,(Place0.p - Hit.p).magnitude) | |
| 640 | if plr.Character:FindFirstChild('Right Arm') then
| |
| 641 | for i,v in pairs(plr.Character:FindFirstChild('Right Arm'):GetChildren()) do
| |
| 642 | if v:IsA('Sound') and v.Name == "Electricity" then
| |
| 643 | if Place0 and Hit and (Place0.p - Hit.p).magnitude >= 20 then | |
| 644 | v.MaxDistance = (Place0.p - Hit.p).magnitude | |
| 645 | v.EmitterSize = (Place0.p - Hit.p).magnitude | |
| 646 | elseif Place0 and Hit then | |
| 647 | v.MaxDistance = 20 | |
| 648 | v.EmitterSize = 20 | |
| 649 | end | |
| 650 | end | |
| 651 | end | |
| 652 | end | |
| 653 | P.CFrame = CFrame.new((Place0.p + Hit.p)/2,Place0.p) | |
| 654 | P.Parent = parent | |
| 655 | P.BrickColor = BrickColor.Yellow() | |
| 656 | P.Anchored = true | |
| 657 | P.CanCollide = false | |
| 658 | P.Transparency = 1 | |
| 659 | local m = Instance.new("BlockMesh")
| |
| 660 | m.Scale = Vector3.new(0.1,0.1,1) | |
| 661 | m.Parent = P | |
| 662 | local mh = mouse.Hit | |
| 663 | for c1 = 1, 1 do | |
| 664 | oldHit = part.CFrame | |
| 665 | for count = 1, 9 do | |
| 666 | local val1 = Vector3.new(math.random(-1,1),math.random(-1,1),math.random(-1,1)) | |
| 667 | local val2 = P.Size.z / 10 | |
| 668 | local val3 = P.CFrame.lookVector * -1 | |
| 669 | local val4 = count * val2 | |
| 670 | local val5 = val4 * val3 | |
| 671 | local val6 = part.CFrame.p | |
| 672 | local Hit = CFrame.new(val5 + val1 + val6) | |
| 673 | local s = Instance.new("Part")
| |
| 674 | s.Name = "Spark" | |
| 675 | s.Material = Enum.Material.Neon | |
| 676 | local Place0 = oldHit | |
| 677 | s.formFactor = 0 | |
| 678 | s.Size = Vector3.new(1,1,(Place0.p - Hit.p).magnitude) | |
| 679 | s.CFrame = CFrame.new((Place0.p + Hit.p)/2,Place0.p) | |
| 680 | s.Parent = parent | |
| 681 | s.BrickColor = BrickColor.new('Instatutional white')
| |
| 682 | s.Anchored = true | |
| 683 | s.CanCollide = false | |
| 684 | m = Instance.new("BlockMesh")
| |
| 685 | m.Scale = Vector3.new(0.1,0.1,1) | |
| 686 | m.Parent = s | |
| 687 | local clone = s:clone() | |
| 688 | clone.Mesh.Scale = Vector3.new(0.3,0.3,1.1) | |
| 689 | clone.BrickColor = BrickColor.new('Electric blue')
| |
| 690 | clone.Transparency = 0.8 | |
| 691 | clone.Parent = s.Parent | |
| 692 | oldHit = Hit | |
| 693 | end | |
| 694 | Hit = oldHit | |
| 695 | local s = Instance.new("Part")
| |
| 696 | s.Name = "Spark" | |
| 697 | s.Material = Enum.Material.Neon | |
| 698 | local Place0 = mh | |
| 699 | s.formFactor = 0 | |
| 700 | s.Size = Vector3.new(1,1,(Place0.p - Hit.p).magnitude) | |
| 701 | s.CFrame = CFrame.new((Place0.p + Hit.p)/2,Place0.p) | |
| 702 | s.Parent = parent | |
| 703 | s.BrickColor = BrickColor.new('Instatutional white')
| |
| 704 | s.Anchored = true | |
| 705 | s.CanCollide = false | |
| 706 | m = Instance.new("BlockMesh")
| |
| 707 | m.Scale = Vector3.new(0.1,0.1,1) | |
| 708 | m.Parent = s | |
| 709 | local clone = s:clone() | |
| 710 | clone.Mesh.Scale = Vector3.new(0.3,0.3,1.1) | |
| 711 | clone.BrickColor = BrickColor.new('Electric blue')
| |
| 712 | clone.Transparency = 0.8 | |
| 713 | clone.Parent = s.Parent | |
| 714 | gettouching(part.Position,mou.Hit.p,parent) | |
| 715 | end | |
| 716 | P:remove() | |
| 717 | end | |
| 718 | end | |
| 719 | end | |
| 720 | ||
| 721 | function chokearms(chr) | |
| 722 | if chr:FindFirstChild('Torso') then
| |
| 723 | if chr:FindFirstChild('Right Arm') then
| |
| 724 | if chr.Torso:FindFirstChild('Right Shoulder') then
| |
| 725 | chr.Torso["Right Shoulder"]:Destroy() | |
| 726 | end | |
| 727 | local thing = Instance.new('Weld',chr.Torso)
| |
| 728 | thing.Name = "Right Shoulder" | |
| 729 | thing.Part0 = chr.Torso | |
| 730 | thing.Part1 = chr["Right Arm"] | |
| 731 | thing.C0 = CFrame.new(0.811074257, 0.835914135, -0.381313324, 0.27563563, 0.961260796, 2.0569455e-06, 0.488285512, -0.140010983, -0.861379266, -0.828009903, 0.237427771, -0.50796169) | |
| 732 | end | |
| 733 | if chr:FindFirstChild('Left Arm') then
| |
| 734 | if chr.Torso:FindFirstChild('Left Shoulder') then
| |
| 735 | chr.Torso["Left Shoulder"]:Destroy() | |
| 736 | end | |
| 737 | local thing = Instance.new('Weld',chr.Torso)
| |
| 738 | thing.Name = "Left Shoulder" | |
| 739 | thing.Part0 = chr["Left Arm"] | |
| 740 | thing.Part1 = chr.Torso | |
| 741 | thing.C0 = CFrame.new(0.962814331, -0.457080841, 0.306755066, 0.309041202, -0.579310298, 0.754249752, -0.951046288, -0.188228443, 0.245104745, -2.09111568e-05, -0.793076754, -0.609121859) | |
| 742 | end | |
| 743 | end | |
| 744 | end | |
| 745 | ||
| 746 | function fixarms(chr) | |
| 747 | if chr:FindFirstChild('Torso') then
| |
| 748 | for i,v in pairs(chr.Torso:GetChildren()) do | |
| 749 | if v.Name == "Right Shoulder" or v.Name == "Left Shoulder" then | |
| 750 | v:Destroy() | |
| 751 | end | |
| 752 | end | |
| 753 | if chr:FindFirstChild('Right Arm') then
| |
| 754 | local rs = Instance.new('Motor6D',chr.Torso)
| |
| 755 | rs.Name = "Right Shoulder" | |
| 756 | rs.Part0 = chr.Torso | |
| 757 | rs.Part1 = chr:FindFirstChild('Right Arm')
| |
| 758 | rs.C0 = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
| 759 | rs.C1 = CFrame.new(-0.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
| 760 | end | |
| 761 | if chr:FindFirstChild('Left Arm') then
| |
| 762 | local ls = Instance.new('Motor6D',chr.Torso)
| |
| 763 | ls.Name = "Left Shoulder" | |
| 764 | ls.Part0 = chr.Torso | |
| 765 | ls.Part1 = chr:FindFirstChild('Left Arm')
| |
| 766 | ls.C0 = CFrame.new(-1, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) | |
| 767 | ls.C1 = CFrame.new(0.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) | |
| 768 | end | |
| 769 | end | |
| 770 | end | |
| 771 | ||
| 772 | mou.KeyDown:connect(function(key) | |
| 773 | if key == "f" and mou.Target and zapping == false then | |
| 774 | if choking == false then | |
| 775 | local hum = mou.Target.Parent:FindFirstChildOfClass('Humanoid')
| |
| 776 | ||
| 777 | if hum == nil then | |
| 778 | hum = mou.Target.Parent.Parent:FindFirstChildOfClass('Humanoid')
| |
| 779 | end | |
| 780 | ||
| 781 | if hum and hum.Parent:FindFirstChild('Torso') and hum.Health > 0 then
| |
| 782 | beforehealth = hum.Health | |
| 783 | choking = true | |
| 784 | target = hum.Parent.Torso | |
| 785 | local sound = Instance.new('Sound',target)
| |
| 786 | sound.Volume = 5 | |
| 787 | sound.EmitterSize = 50 | |
| 788 | sound.MaxDistance = 100 | |
| 789 | sound.SoundId = 'rbxassetid://418658161' | |
| 790 | sound.Looped = false | |
| 791 | sound.PlaybackSpeed = 0.75 | |
| 792 | sound.Name = "Choking" | |
| 793 | sound:Play() | |
| 794 | startpos = target.CFrame | |
| 795 | chokearms(target.Parent) | |
| 796 | local bod = Instance.new('BodyPosition',hum.Parent.Torso)
| |
| 797 | bod.Position = target.Position+Vector3.new(0,12,0) | |
| 798 | bod.MaxForce = Vector3.new(100000,100000,100000) | |
| 799 | bod.P = 1000 | |
| 800 | bod.D = 500 | |
| 801 | end | |
| 802 | if target and target:FindFirstChild('Breathing') then
| |
| 803 | target.Breathing:Destroy() | |
| 804 | end | |
| 805 | local coru = coroutine.wrap(function() | |
| 806 | while timez < 5 and choking do | |
| 807 | timez = timez + 0.1 | |
| 808 | if target.Parent:FindFirstChildOfClass('Humanoid') then
| |
| 809 | if target.Parent:FindFirstChildOfClass('Humanoid').Health - (beforehealth/49) > 0 then
| |
| 810 | target.Parent:FindFirstChildOfClass('Humanoid').Health = target.Parent:FindFirstChildOfClass('Humanoid').Health - (beforehealth/49)
| |
| 811 | end | |
| 812 | end | |
| 813 | wait(0.1) | |
| 814 | end | |
| 815 | if timez >= 5 then | |
| 816 | if target and target.Parent and target.Parent:FindFirstChildOfClass('Humanoid') and target.Parent:FindFirstChildOfClass('Humanoid').Health > 0 then
| |
| 817 | if target and target:FindFirstChild('Choking') then
| |
| 818 | target.Choking:Stop() | |
| 819 | target.Choking:Destroy() | |
| 820 | end | |
| 821 | if target then | |
| 822 | for i,v in pairs(target:GetChildren()) do | |
| 823 | if v:IsA("BodyPosition") then
| |
| 824 | v:Destroy() | |
| 825 | end | |
| 826 | end | |
| 827 | end | |
| 828 | Kill(target.Parent,false,false) | |
| 829 | end | |
| 830 | end | |
| 831 | target = nil | |
| 832 | choking = false | |
| 833 | startpos = CFrame.new(0,0,0) | |
| 834 | timez = 0 | |
| 835 | for i,v in pairs(plr.Character.Torso:GetChildren()) do | |
| 836 | if v.Name == "Right Shoulder" and v:IsA('Weld') then
| |
| 837 | v:Destroy() | |
| 838 | end | |
| 839 | end | |
| 840 | if plr.Character.Torso:FindFirstChild('Right Shoulder') == nil then
| |
| 841 | local rs = Instance.new('Motor6D',plr.Character.Torso)
| |
| 842 | rs.Name = "Right Shoulder" | |
| 843 | rs.Part0 = plr.Character.Torso | |
| 844 | rs.Part1 = plr.Character:FindFirstChild('Right Arm')
| |
| 845 | rs.C0 = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
| 846 | rs.C1 = CFrame.new(-0.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
| 847 | end | |
| 848 | end) | |
| 849 | coru() | |
| 850 | else | |
| 851 | if target and target:FindFirstChild('Choking') then
| |
| 852 | fixarms(target.Parent) | |
| 853 | target.Choking:Stop() | |
| 854 | target.Choking:Destroy() | |
| 855 | local sound = Instance.new('Sound',target)
| |
| 856 | sound.Volume = 5 | |
| 857 | sound.EmitterSize = 50 | |
| 858 | sound.MaxDistance = 100 | |
| 859 | sound.SoundId = 'rbxassetid://304511128' | |
| 860 | sound.Looped = true | |
| 861 | sound.PlaybackSpeed = 1 | |
| 862 | sound.Name = "Breathing" | |
| 863 | sound:Play() | |
| 864 | game:GetService('Debris'):AddItem(sound,timez)
| |
| 865 | for i,v in pairs(target:GetChildren()) do | |
| 866 | if v:IsA("BodyPosition") then
| |
| 867 | v:Destroy() | |
| 868 | end | |
| 869 | end | |
| 870 | end | |
| 871 | if target.Parent:FindFirstChildOfClass('Humanoid') then
| |
| 872 | target.Parent:FindFirstChildOfClass('Humanoid').Health = beforehealth
| |
| 873 | end | |
| 874 | target = nil | |
| 875 | choking = false | |
| 876 | startpos = CFrame.new(0,0,0) | |
| 877 | timez = 0 | |
| 878 | end | |
| 879 | elseif key == "g" and choking == false then | |
| 880 | zapping = true | |
| 881 | local electricity = Instance.new("Sound",plr.Character:FindFirstChild('Right Arm'))
| |
| 882 | electricity.Name = "Electricity" | |
| 883 | electricity.SoundId = "rbxassetid://379557765" | |
| 884 | electricity.Volume = 5 | |
| 885 | electricity.EmitterSize = 100 | |
| 886 | electricity.MaxDistance = 100 | |
| 887 | electricity.Looped = true | |
| 888 | electricity:Play() | |
| 889 | end | |
| 890 | end) | |
| 891 | ||
| 892 | mou.KeyUp:connect(function(key) | |
| 893 | if key == "g" then | |
| 894 | zapping = false | |
| 895 | if plr.Character:FindFirstChild('Right Arm') then
| |
| 896 | for i,v in pairs(plr.Character:FindFirstChild('Right Arm'):GetChildren()) do
| |
| 897 | if v:IsA('Sound') and v.Name == "Electricity" then
| |
| 898 | v:Destroy() | |
| 899 | end | |
| 900 | end | |
| 901 | end | |
| 902 | end | |
| 903 | end) | |
| 904 | ||
| 905 | ||
| 906 | while true do | |
| 907 | if choking and plr.Character and target and target.Parent and plr.Character:FindFirstChild('Head') and plr.Character:FindFirstChild('Right Arm') and plr.Character:FindFirstChild('Torso') then
| |
| 908 | for i,v in pairs(plr.Character.Torso:GetChildren()) do | |
| 909 | if v.Name == "Right Shoulder" then | |
| 910 | v:Destroy() | |
| 911 | end | |
| 912 | end | |
| 913 | local Head = plr.Character.Head | |
| 914 | local RightArm = plr.Character["Right Arm"] | |
| 915 | local RightShoulder = Instance.new('Weld',plr.Character.Torso)
| |
| 916 | RightShoulder.Name = "Right Shoulder" | |
| 917 | RightShoulder.Part0 = plr.Character.Torso | |
| 918 | RightShoulder.Part1 = RightArm | |
| 919 | RightShoulder.C0 = CFrame.new(1,1,-0.75) | |
| 920 | local MousePosition = target.Position+(target.Size/2) | |
| 921 | local ToMouse = (MousePosition - Head.Position).unit | |
| 922 | local Angle = math.acos(ToMouse:Dot(Vector3.new(0, 1, 0))) | |
| 923 | local FromRightArmPos = (Head.Position + Head.CFrame:vectorToWorldSpace(Vector3.new(((Head.Size.X / 2) + (RightArm.Size.X / 2)), ((Head.Size.Y / 2) - (RightArm.Size.Z / 2)), 0))) | |
| 924 | local ToMouseRightArm = ((MousePosition - FromRightArmPos) * Vector3.new(1 ,0, 1)).unit | |
| 925 | local Look = (Head.CFrame.lookVector * Vector3.new(1, 0, 1)).unit | |
| 926 | local LateralAngle = math.acos(ToMouseRightArm:Dot(Look)) | |
| 927 | if tostring(LateralAngle) == "-1.#IND" then | |
| 928 | LateralAngle = 0 | |
| 929 | end | |
| 930 | local Cross = Head.CFrame.lookVector:Cross(ToMouseRightArm) | |
| 931 | local change = false | |
| 932 | if LateralAngle > (math.pi / 2) then | |
| 933 | LateralAngle = (math.pi / 2) | |
| 934 | change = true | |
| 935 | end | |
| 936 | if Cross.Y < 0 then | |
| 937 | LateralAngle = -LateralAngle | |
| 938 | end | |
| 939 | RightShoulder.C0 = CFrame.new(RightShoulder.C0.p) * CFrame.Angles(((math.pi / 2) - Angle), ((math.pi / 2) + LateralAngle), math.pi/2) | |
| 940 | for i,v in pairs(target.Parent:GetChildren()) do | |
| 941 | if v:IsA('Tool') then
| |
| 942 | v.ManualActivationOnly = true | |
| 943 | end | |
| 944 | end | |
| 945 | elseif zapping == false and plr and plr.Character and plr.Character:FindFirstChild("Torso") and plr.Character:FindFirstChild('Right Arm') then
| |
| 946 | for i,v in pairs(plr.Character.Torso:GetChildren()) do | |
| 947 | if v.Name == "Right Shoulder" and v:IsA('Weld') then
| |
| 948 | v:Destroy() | |
| 949 | end | |
| 950 | end | |
| 951 | if target then | |
| 952 | for i,v in pairs(target:GetChildren()) do | |
| 953 | if v:IsA("BodyPosition") then
| |
| 954 | v:Destroy() | |
| 955 | end | |
| 956 | end | |
| 957 | if plr.Character.Torso:FindFirstChild('Right Shoulder') == nil then
| |
| 958 | local rs = Instance.new('Motor6D',plr.Character.Torso)
| |
| 959 | rs.Name = "Right Shoulder" | |
| 960 | rs.Part0 = plr.Character.Torso | |
| 961 | rs.Part1 = plr.Character:FindFirstChild('Right Arm')
| |
| 962 | rs.C0 = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
| 963 | rs.C1 = CFrame.new(-0.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
| 964 | end | |
| 965 | if target.Parent then | |
| 966 | for i,v in pairs(target.Parent:GetChildren()) do | |
| 967 | if v:IsA('Tool') then
| |
| 968 | v.ManualActivationOnly = false | |
| 969 | end | |
| 970 | end | |
| 971 | end | |
| 972 | end | |
| 973 | target = nil | |
| 974 | choking = false | |
| 975 | startpos = CFrame.new(0,0,0) | |
| 976 | timez = 0 | |
| 977 | end | |
| 978 | if zapping and plr.Character and mou.Hit and plr.Character:FindFirstChild('Head') and plr.Character:FindFirstChild('Right Arm') and plr.Character:FindFirstChild('Torso') then
| |
| 979 | if lastzap then | |
| 980 | lastzap:Destroy() | |
| 981 | lastzap = nil | |
| 982 | end | |
| 983 | for i,v in pairs(plr.Character.Torso:GetChildren()) do | |
| 984 | if v.Name == "Right Shoulder" then | |
| 985 | v:Destroy() | |
| 986 | end | |
| 987 | end | |
| 988 | local Head = plr.Character.Head | |
| 989 | local RightArm = plr.Character["Right Arm"] | |
| 990 | local RightShoulder = Instance.new('Weld',plr.Character.Torso)
| |
| 991 | RightShoulder.Name = "Right Shoulder" | |
| 992 | RightShoulder.Part0 = plr.Character.Torso | |
| 993 | RightShoulder.Part1 = RightArm | |
| 994 | RightShoulder.C0 = CFrame.new(1,1,-0.75) | |
| 995 | local MousePosition = mou.Hit.p | |
| 996 | local ToMouse = (MousePosition - Head.Position).unit | |
| 997 | local Angle = math.acos(ToMouse:Dot(Vector3.new(0, 1, 0))) | |
| 998 | local FromRightArmPos = (Head.Position + Head.CFrame:vectorToWorldSpace(Vector3.new(((Head.Size.X / 2) + (RightArm.Size.X / 2)), ((Head.Size.Y / 2) - (RightArm.Size.Z / 2)), 0))) | |
| 999 | local ToMouseRightArm = ((MousePosition - FromRightArmPos) * Vector3.new(1 ,0, 1)).unit | |
| 1000 | local Look = (Head.CFrame.lookVector * Vector3.new(1, 0, 1)).unit | |
| 1001 | local LateralAngle = math.acos(ToMouseRightArm:Dot(Look)) | |
| 1002 | if tostring(LateralAngle) == "-1.#IND" then | |
| 1003 | LateralAngle = 0 | |
| 1004 | end | |
| 1005 | local Cross = Head.CFrame.lookVector:Cross(ToMouseRightArm) | |
| 1006 | local change = false | |
| 1007 | if LateralAngle > (math.pi / 2) then | |
| 1008 | LateralAngle = (math.pi / 2) | |
| 1009 | change = true | |
| 1010 | end | |
| 1011 | if Cross.Y < 0 then | |
| 1012 | LateralAngle = -LateralAngle | |
| 1013 | end | |
| 1014 | RightShoulder.C0 = CFrame.new(RightShoulder.C0.p) * CFrame.Angles(((math.pi / 2) - Angle), ((math.pi / 2) + LateralAngle), math.pi/2) | |
| 1015 | local thing = Instance.new('Model',workspace)
| |
| 1016 | thing.Name = "Zap" | |
| 1017 | lastzap = thing | |
| 1018 | makelaser(thing) | |
| 1019 | elseif choking == false and zapping == false then | |
| 1020 | if lastzap then | |
| 1021 | lastzap:Destroy() | |
| 1022 | lastzap = nil | |
| 1023 | end | |
| 1024 | if plr.Character:FindFirstChild('Torso') then
| |
| 1025 | for i,v in pairs(plr.Character.Torso:GetChildren()) do | |
| 1026 | if v.Name == "Right Shoulder" and v:IsA('Weld') then
| |
| 1027 | v:Destroy() | |
| 1028 | end | |
| 1029 | end | |
| 1030 | if plr.Character.Torso:FindFirstChild('Right Shoulder') == nil then
| |
| 1031 | local rs = Instance.new('Motor6D',plr.Character.Torso)
| |
| 1032 | rs.Name = "Right Shoulder" | |
| 1033 | rs.Part0 = plr.Character.Torso | |
| 1034 | rs.Part1 = plr.Character:FindFirstChild('Right Arm')
| |
| 1035 | rs.C0 = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
| 1036 | rs.C1 = CFrame.new(-0.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
| 1037 | end | |
| 1038 | end | |
| 1039 | end | |
| 1040 | wait() | |
| 1041 | end | |
| 1042 | end |