SHOW:
|
|
- or go back to the newest paste.
| 1 | - | local player = game.Players.boshadog |
| 1 | + | --VOID RING BY ETHANCOMPUTERMAD, My first attempt at a tool |
| 2 | - | local char = player.Character |
| 2 | + | lp = game.Players.LocalPlayer |
| 3 | - | -- Body parts |
| 3 | + | script.Name = "VoidRing" |
| 4 | - | local torso = char.Torso |
| 4 | + | repeat wait() until lp |
| 5 | - | -- Tool declarations |
| 5 | + | c = lp.StarterGear:GetChildren() |
| 6 | - | local mouseDown = false |
| 6 | + | hr = false |
| 7 | - | local keysDown = {}
|
| 7 | + | for i= 1, #c do |
| 8 | - | local raisingAir = false |
| 8 | + | if c[i].Name == "VoidRing" then hr = true end end |
| 9 | - | local raisingTower = false |
| 9 | + | if hr == false then s = script:Clone() s.Parent = lp.StarterGear end |
| 10 | - | local ra1singTower = false |
| 10 | + | mouse = lp:GetMouse() |
| 11 | - | local groundAttack = false |
| 11 | + | cam = game.Workspace.CurrentCamera |
| 12 | - | local Lightbendd = false |
| 12 | + | repeat wait() until cam |
| 13 | - | local AvatarField = false |
| 13 | + | function loadring(name) |
| 14 | - | local lastTower = nil |
| 14 | + | -- 2 - VoidRing |
| 15 | - | local raisingTow3r = false |
| 15 | + | obj2 = Instance.new("Part")
|
| 16 | - | local disabled = {}
|
| 16 | + | obj2.Anchored = true |
| 17 | - | local frames = {}
|
| 17 | + | obj2.CanCollide = false |
| 18 | - | local parts = {}
|
| 18 | + | obj2.CFrame = CFrame.new(Vector3.new(-62.5, 4.5, -42.5)) * CFrame.Angles(1.5707963705063, -0, -3.1415927410126) |
| 19 | - | -- Main |
| 19 | + | obj2.FormFactor = Enum.FormFactor.Plate |
| 20 | - | function main(mouse) |
| 20 | + | obj2.Size = Vector3.new(1, 0.400000006, 1) |
| 21 | - | while true do wait(1/30) |
| 21 | + | obj2.BrickColor = BrickColor.new("Really black")
|
| 22 | - | local look = CFrame.new(torso.Position, torso.Position + mouse.Hit.lookVector) |
| 22 | + | obj2.Friction = 0.30000001192093 |
| 23 | - | |
| 23 | + | obj2.Shape = Enum.PartType.Block |
| 24 | - | -- Reset parts |
| 24 | + | obj2.Name = name .. "VoidRing" |
| 25 | - | parts = {}
|
| 25 | + | obj2.Parent = game.Workspace |
| 26 | - | |
| 26 | + | -- 3 - Mesh |
| 27 | - | -- Get parts |
| 27 | + | obj3 = Instance.new("SpecialMesh")
|
| 28 | - | for x = -20, 20, 10 do |
| 28 | + | obj3.MeshType = Enum.MeshType.FileMesh |
| 29 | - | for y = -20, 20, 10 do |
| 29 | + | obj3.Scale = Vector3.new(1.20000005, 1.20000005, 1.20000005) |
| 30 | - | for z = -30, -10, 10 do |
| 30 | + | obj3.MeshId = "http://www.roblox.com/asset/?id=3270017" |
| 31 | - | local pos = look * Vector3.new(x, y, z) |
| 31 | + | obj3.Parent = obj2 |
| 32 | - | getPartsInRegion3( |
| 32 | + | -- 4 - Fire |
| 33 | - | Region3.new( |
| 33 | + | obj4 = Instance.new("Fire", obj2)
|
| 34 | - | pos + Vector3.new(1,1,1)*-9, |
| 34 | + | obj4.Color = Color3.new(0, 0, 0) |
| 35 | - | pos + Vector3.new(1,1,1)* 9 |
| 35 | + | obj4.SecondaryColor = Color3.new(0, 0, 0) |
| 36 | - | ), |
| 36 | + | obj4.Size = 4 |
| 37 | - | parts |
| 37 | + | obj4.Heat = 3 |
| 38 | - | ) |
| 38 | + | obj2:MakeJoints() |
| 39 | - | end |
| 39 | + | return obj2 |
| 40 | - | end |
| 40 | + | |
| 41 | - | end |
| 41 | + | function loadshield(name) |
| 42 | - | |
| 42 | + | -- 2 - BlackHole |
| 43 | - | -- Mouse down |
| 43 | + | obj2 = Instance.new("Part")
|
| 44 | - | if mouseDown then |
| 44 | + | obj2.Anchored = true |
| 45 | - | -- Create dif and bodies |
| 45 | + | obj2.CFrame = CFrame.new(Vector3.new(-61, 1000, -32.5)) * CFrame.Angles(3.1415927410126, -0, -3.1415927410126) |
| 46 | - | for _, part in pairs(parts) do |
| 46 | + | obj2.Transparency = 0.20000000298023 |
| 47 | - | if part.Name == "Air" and not disabled[part] then |
| 47 | + | obj2.TopSurface = Enum.SurfaceType.Smooth |
| 48 | - | if not frames[part] and part ~= lastTower then |
| 48 | + | obj2.BottomSurface = Enum.SurfaceType.Smooth |
| 49 | - | frames[part] = look:toObjectSpace(part.CFrame) |
| 49 | + | obj2.Size = Vector3.new(42, 26.4000015, 4) |
| 50 | - | |
| 50 | + | obj2.BrickColor = BrickColor.new("Really black")
|
| 51 | - | part:ClearAllChildren() |
| 51 | + | obj2.Friction = 0.30000001192093 |
| 52 | - | part.Anchored = false |
| 52 | + | obj2.Shape = Enum.PartType.Block |
| 53 | - | |
| 53 | + | obj2.Name = name .. "Shield" |
| 54 | - | -- Create bodies |
| 54 | + | obj2.Parent = game.Workspace |
| 55 | - | createBody("Position", part)
|
| 55 | + | -- 3 - Mesh |
| 56 | - | createBody("Gyro", part)
|
| 56 | + | obj3 = Instance.new("SpecialMesh")
|
| 57 | - | end |
| 57 | + | obj3.MeshType = Enum.MeshType.Sphere |
| 58 | - | end |
| 58 | + | obj3.Parent = obj2 |
| 59 | - | end |
| 59 | + | obj3.Scale = Vector3.new(1, 1, 0.25) |
| 60 | - | |
| 60 | + | |
| 61 | - | -- Move bodies |
| 61 | + | function tphole(pos, time, isplayer, deadly) |
| 62 | - | for part in pairs(frames) do |
| 62 | + | obj2 = Instance.new("Part")
|
| 63 | - | local bodyPos = part:FindFirstChild("BodyPosition")
|
| 63 | + | if isplayer == true then |
| 64 | - | local bodyGyr = part:FindFirstChild("BodyGyro")
|
| 64 | + | obj2.CFrame = CFrame.new(0, 0, 0) |
| 65 | - | |
| 65 | + | obj2.Position = pos |
| 66 | - | -- Bodies exist |
| 66 | + | obj2.CFrame = obj2.CFrame * CFrame.Angles(math.pi / 2, 0, 0) + Vector3.new(0, -2.6, 0) |
| 67 | - | if bodyPos and bodyGyr then |
| 67 | + | else |
| 68 | - | local dif = look * frames[part] |
| 68 | + | obj2.CFrame = CFrame.new(0, 0, 0) |
| 69 | - | |
| 69 | + | obj2.Position = pos |
| 70 | - | bodyPos.position = dif.p |
| 70 | + | obj2.CFrame = obj2.CFrame * CFrame.Angles(math.pi / 2, 0, 0) |
| 71 | - | bodyGyr.cframe = dif |
| 71 | + | |
| 72 | - | else |
| 72 | + | obj2.TopSurface = Enum.SurfaceType.Smooth |
| 73 | - | frames[part] = nil |
| 73 | + | obj2.BottomSurface = Enum.SurfaceType.Smooth |
| 74 | - | end |
| 74 | + | obj2.Size = Vector3.new(8, 8, 1) |
| 75 | - | end |
| 75 | + | obj2.Anchored = true |
| 76 | - | else |
| 76 | + | if deadly == true then |
| 77 | - | for part in pairs(frames) do |
| 77 | + | obj2.BrickColor = BrickColor.new("Really red")
|
| 78 | - | if part.Name == "Air" then |
| 78 | + | else |
| 79 | - | frames[part] = nil |
| 79 | + | obj2.BrickColor = BrickColor.new("Really black")
|
| 80 | - | |
| 80 | + | |
| 81 | - | part:ClearAllChildren() |
| 81 | + | obj2.Friction = 0.30000001192093 |
| 82 | - | end |
| 82 | + | obj2.Shape = Enum.PartType.Block |
| 83 | - | end |
| 83 | + | obj2.Name = "BlackHole" |
| 84 | - | end |
| 84 | + | obj2.Parent = game.Workspace |
| 85 | - | end |
| 85 | + | -- 3 - Mesh |
| 86 | obj3 = Instance.new("SpecialMesh")
| |
| 87 | - | -- On key change |
| 87 | + | obj3.VertexColor = Vector3.new(0, 0, 0) |
| 88 | - | function onKeyChange(mouse, key, state) |
| 88 | + | obj3.Scale = Vector3.new(1, 1, 1) |
| 89 | - | -- Raise Air |
| 89 | + | randc = math.random(1000000, 9999999) |
| 90 | - | if key == "e" and state and not raisingAir then |
| 90 | + | randc = coroutine.create(function() |
| 91 | - | raisingAir = true |
| 91 | + | obj3.Scale = Vector3.new(0.1, 0.1, 0.1) |
| 92 | - | while keysDown[key] do |
| 92 | + | random = math.random(1000000, 9999999) |
| 93 | - | local torsoY = torso.Position.y + 5 |
| 93 | + | for random= 1, 10 do |
| 94 | - | local pos = planeY(torso.Position, 0.4 - 4/2) |
| 94 | + | obj3.Scale = Vector3.new(0.1 * random, 0.1 * random, 0.1 * random) wait() end end) |
| 95 | - | local dir = planeY(mouse.Hit.lookVector).unit |
| 95 | + | coroutine.resume(randc) |
| 96 | - | local frame = CFrame.new(pos, pos + dir) * CFrame.new(r(-10, 10), 0, r(-20, -5)) |
| 96 | + | obj3.MeshType = Enum.MeshType.Sphere |
| 97 | - | |
| 97 | + | obj3.Parent = obj2 |
| 98 | - | -- Create Air part |
| 98 | + | game:GetService("Debris"):AddItem(obj2, time)
|
| 99 | - | local part = createAir(workspace) |
| 99 | + | return obj2 |
| 100 | - | part.Anchored = true |
| 100 | + | |
| 101 | - | part.Size = Vector3.new(20, 5, 5) |
| 101 | + | loadring(lp.Name) |
| 102 | - | disabled[part] = true |
| 102 | + | wait() |
| 103 | - | |
| 103 | + | m = Instance.new("Message", cam)
|
| 104 | - | -- Raise Air |
| 104 | + | m.Text = "Launched Void Ring by Ethancomputermad" |
| 105 | - | for i = 1, 4 do i = i/4 |
| 105 | + | game:GetService("Debris"):AddItem(m, 5)
|
| 106 | - | part.CFrame = frame * CFrame.new(0, (torsoY - frame.y)*i, 0) |
| 106 | + | ring = game.Workspace[lp.Name .. "VoidRing"] |
| 107 | - | wait(1/30) |
| 107 | + | mover = true |
| 108 | - | if not part.Anchored then |
| 108 | + | mr = coroutine.create(function() while true do wait() pcall(function() if mover == true then |
| 109 | - | break |
| 109 | + | ring.CFrame = lp.Character["Right Arm"].CFrame * CFrame.Angles(math.pi / 2, 0, 0) * CFrame.new(0, 0, 0.9) end end) end end) |
| 110 | - | end |
| 110 | + | coroutine.resume(mr) |
| 111 | - | end |
| 111 | + | su = false |
| 112 | - | |
| 112 | + | hsu = false |
| 113 | - | disabled[part] = nil |
| 113 | + | shield = nil |
| 114 | - | part.Anchored = false |
| 114 | + | ms = coroutine.create(function() while true do wait() pcall(function() |
| 115 | - | |
| 115 | + | shield.CFrame = lp.Character.Torso.CFrame * CFrame.new(0, 0, 0 - 10) end) end end) |
| 116 | - | wait(1/10) |
| 116 | + | coroutine.resume(ms) |
| 117 | - | end |
| 117 | + | shield = coroutine.create(function() |
| 118 | - | raisingAir = false |
| 118 | + | while true do wait() if su == true then |
| 119 | - | |
| 119 | + | if hsu == false then hsu = true loadshield(lp.Name) wait() shield = game.Workspace[lp.Name .. "Shield"] shield.Mesh.Scale = Vector3.new(1, 1, 1) |
| 120 | - | -- Push Air |
| 120 | + | pcall(function() for i= 1, 20 do wait() shield.Mesh.Scale = Vector3.new(0.05 * i, 0.05 * i, 0.05 * i) end end) shield.Mesh.Scale = Vector3.new(1, 1, 1) end end end end) |
| 121 | - | elseif key == "f" and state then |
| 121 | + | coroutine.resume(shield) |
| 122 | - | for _, part in pairs(parts) do |
| 122 | + | st = coroutine.create(function() shield.Touched:connect(function(c) |
| 123 | - | if part.Name == "Air" and part ~= lastTower then |
| 123 | + | if c.Name == "Base" or c.Name:sub(1, #lp.Name) == lp.Name then else c:Destroy() end end) end) |
| 124 | - | part:ClearAllChildren() |
| 124 | + | coroutine.resume(st) |
| 125 | - | part.Anchored = false |
| 125 | + | c = coroutine.create(function() while true do wait() w = game.Workspace:GetChildren() for i= 1, #w do |
| 126 | - | |
| 126 | + | pcall(function() |
| 127 | - | -- Add force |
| 127 | + | if w[i].Name:sub(1, #lp.Name) == lp.Name then |
| 128 | - | local bodyForce = createBody("Force", part)
|
| 128 | + | if w[i].Name:sub(#lp.Name + 1, #lp.Name) == "VoidRing" and w[i] ~= ring then |
| 129 | - | bodyForce.force = mouse.Hit.lookVector*2.5e4 * part:GetMass() |
| 129 | + | w[i]:Destroy() |
| 130 | - | |
| 130 | + | elseif w[i].Name:sub(#lp.Name + 1, #lp.Name) == "Shield" and w[i] ~= sheild then |
| 131 | - | game.Debris:AddItem(bodyForce, 1/30) |
| 131 | + | w[i]:Destroy() end end end) end end end) |
| 132 | - | |
| 132 | + | coroutine.resume(c) |
| 133 | - | -- Disable part |
| 133 | + | shieldhotkey = 113 |
| 134 | - | disabled[part] = true |
| 134 | + | tphotkey = 116 |
| 135 | - | delay(1, function() |
| 135 | + | killhotkey = 107 |
| 136 | - | disabled[part] = nil |
| 136 | + | ss = false pcall(function() |
| 137 | - | end) |
| 137 | + | if m.Text == "Launched Void Ring by Ethancomputermad" then else |
| 138 | - | end |
| 138 | + | m.Text = "Plagiarism detected." |
| 139 | - | end |
| 139 | + | game.Players.LocalPlayer.StarterGear.VoidRing:Destroy() |
| 140 | - | if key == "c" and state and not Lightbendd then |
| 140 | + | script.Disabled = true |
| 141 | - | Lightbendd = true |
| 141 | + | |
| 142 | - | local Shoot = true |
| 142 | + | |
| 143 | - | function Click(Target) |
| 143 | + | mouse.KeyDown:connect(function(k) |
| 144 | - | if(Target.Target.Parent:findFirstChild("Humanoid")~=nil)then
|
| 144 | + | key = string.byte(k) |
| 145 | - | Target.Target.Parent.Humanoid.Health = 0 |
| 145 | + | if key == shieldhotkey then |
| 146 | - | end |
| 146 | + | print(ss) |
| 147 | - | local P = Instance.new("Part")
|
| 147 | + | if ss == false then |
| 148 | - | P.Name = "Lightning Bending" |
| 148 | + | ss = true |
| 149 | - | local Place0 = script.Parent.Parent.Parent.Character["Left Arm"].CFrame |
| 149 | + | pcall(function() game.Workspace[lp.Name .. "Shield"]:Destroy() end) |
| 150 | - | P.formFactor = 0 |
| 150 | + | shield = loadshield(lp.Name) |
| 151 | - | P.Size = Vector3.new(1,1,(Place0.p - Target.Hit.p).magnitude) |
| 151 | + | su = true |
| 152 | - | P.CFrame = CFrame.new((Place0.p + Target.Hit.p)/2,Place0.p) |
| 152 | + | else |
| 153 | - | P.Parent = game.Workspace |
| 153 | + | pcall(function() game.Workspace[lp.Name .. "Shield"]:Destroy() end) |
| 154 | - | P.Color = Color3.new(0,0,7) |
| 154 | + | su = false |
| 155 | - | P.Transparency = 0.5 |
| 155 | + | hsu = false |
| 156 | - | P.Reflectance = 0.5 |
| 156 | + | ss = false |
| 157 | - | P.Anchored = true |
| 157 | + | |
| 158 | - | P.CanCollide = false |
| 158 | + | |
| 159 | - | local E = Instance.new("Explosion")
|
| 159 | + | if key == tphotkey then |
| 160 | - | E.Position = Target.Hit.p |
| 160 | + | m = mouse |
| 161 | - | E.Parent = game.Workspace |
| 161 | + | if m.Target == nil then return end |
| 162 | - | for i = 1,10 do |
| 162 | + | if m.Target.Parent:FindFirstChild("Humanoid") == nil then
|
| 163 | - | P.Transparency = 0.5+(i*0.05) |
| 163 | + | rawtotp = m.Hit |
| 164 | - | P.Reflectance = i*0.05 |
| 164 | + | totp = rawtotp.p |
| 165 | - | wait(0.0) |
| 165 | + | tphole(lp.Character.Torso.Position + Vector3.new(0, -2.6, 0), 0.7, false, false) |
| 166 | - | end |
| 166 | + | wait(0.3) |
| 167 | - | P:Rremove() |
| 167 | + | for i= 1, 10 do wait() |
| 168 | - | end |
| 168 | + | lp.Character.Torso.Anchored = true |
| 169 | - | function Select(Mouse) |
| 169 | + | lp.Character.Torso.CFrame = lp.Character.Torso.CFrame + Vector3.new(0, 0 - 0.6, 0) |
| 170 | - | local Arm = script.Parent.Parent.Parent.Character:findFirstChild("Left Arm")
|
| 170 | + | |
| 171 | - | if(Arm==nil)then |
| 171 | + | lp.Character.Torso.CFrame = CFrame.new(rawtotp.X, rawtotp.Y, rawtotp.Z) + Vector3.new(0, -2, 0) |
| 172 | - | script.Parent:Remove() |
| 172 | + | tphole(totp, 0.7, false, false) |
| 173 | - | script:Remove() |
| 173 | + | wait(0.3) |
| 174 | - | end |
| 174 | + | for i= 1, 20 do wait() |
| 175 | - | Selected = true |
| 175 | + | lp.Character.Torso.Anchored = true |
| 176 | - | local Torso = script.Parent.Parent.Parent.Character:findFirstChild("Torso")
|
| 176 | + | lp.Character.Torso.CFrame = lp.Character.Torso.CFrame + Vector3.new(0, 0.3, 0) |
| 177 | - | if(Torso==nil)then |
| 177 | + | |
| 178 | - | script.Parent:Remove() |
| 178 | + | lp.Character.Torso.Anchored = false |
| 179 | - | script:Remove() |
| 179 | + | else |
| 180 | - | end |
| 180 | + | |
| 181 | - | local ArmWeld = Torso:findFirstChild("Left Shoulder")
|
| 181 | + | |
| 182 | - | if(ArmWeld~=nil)then |
| 182 | + | if key == killhotkey then |
| 183 | - | ArmWeld.Parent = nil |
| 183 | + | m = mouse |
| 184 | - | end |
| 184 | + | trgt = m.Target |
| 185 | - | Mouse.Button1Down:connect(function()Click(Mouse)end) |
| 185 | + | if trgt == nil then return end |
| 186 | - | Arm.Anchored = true |
| 186 | + | if trgt.Parent:FindFirstChild("Humanoid") == nil then return end
|
| 187 | - | while Selected do |
| 187 | + | if trgt.Parent:IsA("Workspace") then return end
|
| 188 | - | local Place0 = script.Parent.Parent.Parent.Character.Torso.CFrame |
| 188 | + | if game.Players:GetPlayerFromCharacter(trgt.Parent) == nil then else |
| 189 | - | Place0 = Place0 + ((Place0 * CFrame.fromEulerAnglesXYZ(math.pi/2,0,0)).lookVector * 0.5) + (Place0 * CFrame.fromEulerAnglesXYZ(0,math.pi/2,0)).lookVector |
| 189 | + | if game.Players:GetPlayerFromCharacter(trgt.Parent).Name == lp.Name then return end end |
| 190 | - | local Place1 = Place0 + ((Place0.p-Mouse.Hit.p).unit * -2) |
| 190 | + | if trgt.Parent:FindFirstChild("Torso") == nil then return end
|
| 191 | - | Arm.CFrame = CFrame.new((Place0.p + Place1.p)/2,Place0.p) * CFrame.fromEulerAnglesXYZ(-math.pi/2,0,0) |
| 191 | + | tphole(trgt.Parent.Torso.Position + Vector3.new(0, -2.6, 0), 0.7, false, true) |
| 192 | - | wait() |
| 192 | + | wait(0.3) |
| 193 | - | end |
| 193 | + | for i= 1, 15 do wait() |
| 194 | - | Arm.Anchored = false |
| 194 | + | trgt.Parent.Torso.Anchored = true |
| 195 | - | if(ArmWeld~=nil)then |
| 195 | + | trgt.Parent.Torso.CFrame = trgt.Parent.Torso.CFrame + Vector3.new(0, 0 - 0.6, 0) |
| 196 | - | ArmWeld.Parent = Torso |
| 196 | + | |
| 197 | - | end |
| 197 | + | trgt.Parent:BreakJoints() |
| 198 | - | end |
| 198 | + | |
| 199 | - | function Deselect() |
| 199 | + | end) |