Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Player declarations
- local player = game.Players.DragonBxllinGamver
- local char = player.Character
- -- Body parts
- local torso = char.Torso
- -- Tool declarations
- local mouseDown = false
- local keysDown = {}
- -- Earth bending declarations
- local raisingEarth = false
- local raisingTower = false
- local wall = false
- local groundAttack = false
- local lastTower = nil
- local disabled = {}
- local frames = {}
- local parts = {}
- local Taunts = {"Die already!", "DIE, DIE, DIE!", "HRRAAAA!", "I told you it's useless!", "You will not be the first to die by my hand!", "You will suffer!", "Don't try to evade the inevitable!", "I will tear you apart!","You are pathetic!","You will never defeat me!","I AM GOD!"}
- local raisechats = {"I will make you realize the depth of my power, even if I have to grind your body into dust!","I suggest you run.", "Now you're just pissing me off.", "Hmph.", "It's useless.",".....", "Your life ends here!","Foolish!","Do you know who I am?","What stupidity.","Hmm.","Hmph. Your confidence is annoying.","You cannot kill a god."}
- -- Main
- function main(mouse)
- while true do wait(1/30)
- local look = CFrame.new(torso.Position, torso.Position + mouse.Hit.lookVector)
- -- Reset parts
- parts = {}
- -- Get parts
- for x = -20, 20, 10 do
- for y = -20, 20, 10 do
- for z = -30, -10, 10 do
- local pos = look * Vector3.new(x, y, z)
- getPartsInRegion3(
- Region3.new(
- pos + Vector3.new(1,1,1)*-9,
- pos + Vector3.new(1,1,1)* 9
- ),
- parts
- )
- end
- end
- end
- -- Mouse down
- if mouseDown then
- -- Create dif and bodies
- for _, part in pairs(parts) do
- if part.Name == "Earth" and not disabled[part] then
- if not frames[part] and part ~= lastTower then
- frames[part] = look:toObjectSpace(part.CFrame)
- part:ClearAllChildren()
- part.Anchored = false
- -- Create bodies
- createBody("Position", part)
- createBody("Gyro", part)
- end
- end
- end
- -- Move bodies
- for part in pairs(frames) do
- local bodyPos = part:FindFirstChild("BodyPosition")
- local bodyGyr = part:FindFirstChild("BodyGyro")
- -- Bodies exist
- if bodyPos and bodyGyr then
- local dif = look * frames[part]
- bodyPos.position = dif.p
- bodyGyr.cframe = dif
- else
- frames[part] = nil
- end
- end
- else
- for part in pairs(frames) do
- if part.Name == "Earth" then
- frames[part] = nil
- part:ClearAllChildren()
- end
- end
- end
- end
- end
- -- On key change
- function onKeyChange(mouse, key, state)
- -- Raise earth
- if key == "e" and state and not raisingEarth then
- game:GetService("Chat"):Chat(char.Head, raisechats[math.random(1,#raisechats)], Enum.ChatColor.Red)
- raisingEarth = true
- while keysDown[key] do
- local torsoY = torso.Position.y + 3
- local pos = planeY(torso.Position, 0.4 - 4/2)
- local dir = planeY(mouse.Hit.lookVector).unit
- local frame = CFrame.new(pos, pos + dir) * CFrame.new(r(-10, 10), 0, r(-20, -5))
- -- Create earth part
- local part = createEarth(workspace)
- part.Anchored = true
- part.Size = Vector3.new(4, 4, 4)
- disabled[part] = true
- -- Raise earth
- for i = 1, 4 do i = i/4
- part.CFrame = frame * CFrame.new(0, (torsoY - frame.y)*i, 0)
- wait(1/10000000)
- if not part.Anchored then
- break
- end
- end
- disabled[part] = nil
- part.Anchored = false
- wait(1/100)
- end
- raisingEarth = false
- elseif key == "c" and state and not raisingEarth then
- game:GetService("Chat"):Chat(char.Head, raisechats[math.random(1,#raisechats)], Enum.ChatColor.Red)
- raisingEarth = true
- while keysDown[key] do
- local torsoY = torso.Position.y + 3
- local pos = planeY(torso.Position, 0.4 - 4/2)
- local dir = planeY(mouse.Hit.lookVector).unit
- local frame = CFrame.new(pos, pos + dir) * CFrame.new(r(-10, 10), 0, r(-20, -5))
- -- Create earth part
- local part = createEarth(workspace)
- part.Anchored = true
- part.Size = Vector3.new(2, 2, 2)
- disabled[part] = true
- -- Raise earth
- for i = 1, 4 do i = i/4
- part.CFrame = frame * CFrame.new(0, (torsoY - frame.y)*i, 0)
- wait(1/10000000)
- if not part.Anchored then
- break
- end
- end
- disabled[part] = nil
- part.Anchored = false
- wait(1/100)
- end
- raisingEarth = false
- -- Push earth
- elseif key == "f" and state then
- game:GetService("Chat"):Chat(char.Head, Taunts[math.random(1,#Taunts)], Enum.ChatColor.Red)
- for _, part in pairs(parts) do
- if part.Name == "Earth" and part ~= lastTower then
- part:ClearAllChildren()
- part.Anchored = false
- -- Add force
- local bodyForce = createBody("Force", part)
- bodyForce.force = mouse.Hit.lookVector*1.5e4 * part:GetMass()
- game.Debris:AddItem(bodyForce, 1/30)
- -- Disable part
- disabled[part] = true
- delay(1, function()
- disabled[part] = nil
- end)
- end
- end
- -- Monster Ability
- elseif key == "m" and state then
- wait(.1)
- f = Instance.new("Fire")
- f.Parent = char.Head
- f.Color = Color3.new(0.7,0.5,0.9)
- f.Size = 5
- f.Heat = 5
- wait(.1)
- g = Instance.new("Fire")
- g.Parent = char["Right Arm"]
- g.Color = Color3.new(0.7,0.5,0.9)
- g.Size = 5
- g.Heat = 5
- wait(.1)
- h = Instance.new("Fire")
- h.Parent = char["Left Arm"]
- h.Color = Color3.new(0.7,0.5,0.9)
- h.Size = 5
- h.Heat = 5
- wait(.1)
- z = Instance.new("Sound")
- z.Parent = game.Workspace
- z.SoundId = "http://www.roblox.com/asset/?id=159365911"
- z.Looped = false
- z.Volume = 1
- z.Pitch = 0.65
- wait(1.8)
- game:GetService("Chat"):Chat(char.Head, "Hmph.", Enum.ChatColor.Red)
- wait(3.4)
- game:GetService("Chat"):Chat(char.Head, "This has become a pointless battle.", Enum.ChatColor.Red)
- wait(2.4)
- game:GetService("Chat"):Chat(char.Head, "I will end this quickly", Enum.ChatColor.Red)
- wait(.1)
- z:Play()
- char.Humanoid.MaxHealth = 900000000
- wait(1)
- char.Humanoid.Health = 900000000
- wait(182)
- char.Humanoid.MaxHealth = 600
- z:Remove()
- f:Remove()
- g:Remove()
- h:Remove()
- -- N-Rage
- elseif key == "n" and state then
- c = Instance.new("Sound")
- c.Parent = game.Workspace
- c.SoundId = "http://www.roblox.com/asset/?id=157747165"
- c.Looped = false
- c.Volume = 1
- c.Pitch = .7
- wait(1.8)
- game:GetService("Chat"):Chat(char.Head, "What the hell was that?", Enum.ChatColor.Red)
- wait(2)
- game:GetService("Chat"):Chat(char.Head, "Did you actually believe you could harm me?", Enum.ChatColor.Red)
- wait(2.4)
- game:GetService("Chat"):Chat(char.Head, "If you would simply let yourself die, you would not have to go through this pointless suffering.", Enum.ChatColor.Red)
- wait(3.5)
- game:GetService("Chat"):Chat(char.Head, "All you have done is waste my time.", Enum.ChatColor.Red)
- wait(.1)
- c:Play()
- char.Humanoid.MaxHealth = math.huge
- wait(160)
- char.Humanoid.MaxHealth = 10000
- c:Remove()
- -- Break earth
- elseif key == "b" and state then
- game:GetService("Chat"):Char(char.Head, "Hmph.", Enum.ChatColor.Red)
- wait(.01)
- for part in pairs(frames) do
- if part.Size == Vector3.new(4, 4, 4) then
- for x = -1, 2, 2 do
- for y = -1, 2, 2 do
- for z = -1, 1, 2 do
- local oPart = createEarth(workspace)
- oPart.Size = Vector3.new(2, 2, 2)
- oPart.CFrame = part.CFrame * CFrame.new(x*1.1, y*1.1, z*1.1)
- end
- end
- end
- part:Destroy()
- end
- end
- for part in pairs(frames) do
- if part.Size == Vector3.new(25, 15, 25) then
- for x = -3, 2, 2 do
- for y = -3, 2, 2 do
- for z = -3, 1, 2 do
- local oPart = createEarth(workspace)
- oPart.Size = Vector3.new(2, 2, 2)
- oPart.CFrame = part.CFrame * CFrame.new(x*1.1, y*1.1, z*1.1)
- end
- end
- end
- part:Destroy()
- end
- end
- for part in pairs(frames) do
- if part.Size == Vector3.new(2, 2, 2) then
- for x = -0.5, 2, 2 do
- for y = -0.5, 2, 2 do
- for z = -0.5, 1, 2 do
- local oPart = createEarth(workspace)
- oPart.Size = Vector3.new(1, 1, 1)
- oPart.CFrame = part.CFrame * CFrame.new(x*1.1, y*1.1, z*1.1)
- end
- end
- end
- part:Destroy()
- end
- end
- -- Raise tower
- elseif key == "r" and state and not raisingTower then
- game:GetService("Chat"):Chat(char.Head, raisechats[math.random(1,#raisechats)], Enum.ChatColor.Red)
- raisingTower = true
- lastTower = nil
- if torso.Position.y - 5/2 < 20.4 then
- local part = createEarth(workspace)
- part.Anchored = true
- disabled[part] = true
- for i = 0, 20, 4 do
- part.Size = Vector3.new(5, i, 5)
- part.CFrame = CFrame.new(torso.Position.x, 0.4 + part.Size.y/2, torso.Position.z)
- torso.CFrame = (torso.CFrame - torso.CFrame.p) + Vector3.new(torso.Position.x, part.Position.y + part.Size.y/2 + 5/2, torso.Position.z)
- wait(1/30)
- end
- lastTower = part
- disabled[part] = nil
- part.Anchored = false
- end
- raisingTower = false
- -- Raise wall
- elseif key == "t" and state and not wall then
- game:GetService("Chat"):Chat(char.Head, raisechats[math.random(1,#raisechats)], Enum.ChatColor.Red)
- wall = true
- lastWall = nil
- if torso.Position.y - 5/2 < 20.4 then
- local part = createEarth(workspace)
- part.Anchored = true
- disabled[part] = true
- for i = 0, 1, 20 do
- part.Size = Vector3.new(25, 15, 25)
- part.CFrame = CFrame.new(torso.Position.x, 0.4 + part.Size.y/2, torso.Position.z)
- torso.CFrame = (torso.CFrame - torso.CFrame.p) + Vector3.new(torso.Position.x, part.Position.y + part.Size.y/2 + 5/2, torso.Position.z)
- wait(1/30)
- end
- lastWall = part
- disabled[part] = nil
- part.Anchored = false
- end
- wall = false
- -- Ground attack
- elseif key == "g" and state and not groundAttack then
- game:GetService("Chat"):Chat(char.Head, Taunts[math.random(1,#Taunts)], Enum.ChatColor.Red)
- groundAttack = true
- delay(1, function()
- groundAttack = false
- end)
- local dir = planeY(mouse.Hit.p - torso.Position).unit
- local pos = planeY(torso.Position, 0.4 + 1) + dir*5
- local ground = {}
- delay(5, function()
- for i = 1, 20 do
- for _, part in pairs(ground) do
- if part.Anchored then
- part.CFrame = part.CFrame + Vector3.new(0, -1/7, 0)
- end
- end
- wait(1/30)
- end
- for _, part in pairs(ground) do
- if part.Anchored then
- part:Destroy()
- end
- end
- end)
- for i = 1, 10 do
- local hit, pos2 = rayCast(pos, dir*5, {char})
- local part = createEarth(workspace)
- part.Anchored = true
- part.Size = Vector3.new(4, 4, 4)
- part.CFrame = CFrame.new(pos2, pos2 + dir) * CFrame.Angles(math.rad(-50), 0, 0) + Vector3.new(0, -0, 0)
- ground[#ground + 1] = part
- -- Add force
- if hit then
- local mass = hit:GetMass()
- -- Hit player
- for _, oPlayer in pairs(game.Players:GetPlayers()) do
- if oPlayer.Character and oPlayer.Character:FindFirstChild("Torso") and hit:IsDescendantOf(oPlayer.Character) then
- hit = oPlayer.Character.Torso
- mass = 20
- end
- end
- if hit.Name ~= "Torso" then
- hit:ClearAllChildren()
- end
- hit.Anchored = false
- -- Add force
- local bodyForce = createBody("Force", hit)
- bodyForce.force = (dir + Vector3.new(0, 0.2, 0)).unit*1e4 * mass
- game.Debris:AddItem(bodyForce, 1/30)
- break
- end
- pos = pos2
- wait(1/20)
- end
- end
- end
- --- CORE CODE BELOW --- CORE CODE BELOW --- CORE CODE BELOW ---
- --- CORE CODE BELOW --- CORE CODE BELOW --- CORE CODE BELOW ---
- --- CORE CODE BELOW --- CORE CODE BELOW --- CORE CODE BELOW ---
- -- Clear old tool
- player.Backpack:ClearAllChildren()
- -- Create tool
- local tool = Instance.new("HopperBin")
- tool.Parent = player.Backpack
- tool.Name = "Kronola's Custom"
- -- Tool selected
- tool.Selected:connect(function(mouse)
- mouse.Icon = "rbxasset://textures\\GunCursor.png"
- -- Mouse events
- mouse.Button1Down:connect(function()
- mouseDown = true
- end)
- mouse.Button1Up:connect(function()
- mouseDown = false
- end)
- mouse.KeyDown:connect(function(key)
- keysDown[key:lower()] = true
- onKeyChange(mouse, key:lower(), true)
- end)
- mouse.KeyUp:connect(function(key)
- keysDown[key:lower()] = false
- onKeyChange(mouse, key:lower(), false)
- end)
- -- Call main
- main(mouse)
- end)
- --- LIBRARY BELOW --- LIBRARY BELOW --- LIBRARY BELOW ---
- --- LIBRARY BELOW --- LIBRARY BELOW --- LIBRARY BELOW ---
- --- LIBRARY BELOW --- LIBRARY BELOW --- LIBRARY BELOW ---
- -- Ray cast
- function rayCast(pos, dir, ignore)
- return workspace:FindPartOnRayWithIgnoreList(Ray.new(pos, dir), ignore)
- end
- -- Create body
- function createBody(type, path)
- local body = Instance.new("Body" .. type)
- if type == "Gyro" then
- body.maxTorque = Vector3.new(math.huge, math.huge, math.huge)
- elseif type ~= "Force" then
- body.maxForce = Vector3.new(math.huge, math.huge, math.huge)
- end
- body.Parent = path
- return body
- end
- -- Get parts in region 3
- function getPartsInRegion3(region, parts)
- repeat
- local regParts = workspace:FindPartsInRegion3WithIgnoreList(region, parts, 100)
- for i, part in pairs(regParts) do
- parts[#parts + 1] = part
- end
- until #regParts < 100
- end
- -- Random
- function r(min, max)
- return math.random()*(max - min) + min
- end
- -- Plane y
- function planeY(v, y)
- return Vector3.new(v.x, y or 0, v.z)
- end
- -- Create earth
- function createEarth(path)
- local part = createPart("Earth", path)
- part.BrickColor = BrickColor.new("Really black")
- part.Material = "Slate"
- m = Instance.new("Fire",part)
- m.Heat = 10
- part.Parent = path
- return part
- end
- -- Create part
- function createPart(name, path)
- local part = Instance.new("Part")
- part.FormFactor = "Symmetric"
- part.BottomSurface = "Smooth"
- part.TopSurface = "Smooth"
- part.Size = Vector3.new(1, 1, 1)
- part.Name = name
- part.Parent = path
- return part
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement