Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Player,Mouse,mouse,UserInputService,ContextActionService = owner
- local RealPlayer = Player
- local a=RealPlayer;script.Parent=a.Character;local b=Instance.new("RemoteEvent")b.Name="UserInput_Event"local function c()local d={_fakeEvent=true,Functions={},Connect=function(self,e)table.insert(self.Functions,e)end}d.connect=d.Connect;return d end;local f={Target=nil,Hit=CFrame.new(),KeyUp=c(),KeyDown=c(),Button1Up=c(),Button1Down=c(),Button2Up=c(),Button2Down=c()}local g={InputBegan=c(),InputEnded=c()}local CAS={Actions={},BindAction=function(self,h,i,j,...)CAS.Actions[h]=i and{Name=h,Function=i,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function k(self,l,...)local d=f[l]if d and d._fakeEvent then for m,e in pairs(d.Functions)do e(...)end end end;f.TrigEvent=k;g.TrigEvent=k;b.OnServerEvent:Connect(function(n,o)if n~=a then return end;f.Target=o.Target;f.Hit=o.Hit;if not o.isMouse then local p=o.UserInputState==Enum.UserInputState.Begin;if o.UserInputType==Enum.UserInputType.MouseButton1 then return f:TrigEvent(p and"Button1Down"or"Button1Up")end;if o.UserInputType==Enum.UserInputType.MouseButton2 then return f:TrigEvent(p and"Button2Down"or"Button2Up")end;for m,d in pairs(CAS.Actions)do for m,q in pairs(d.Keys)do if q==o.KeyCode then d.Function(d.Name,o.UserInputState,o)end end end;f:TrigEvent(p and"KeyDown"or"KeyUp",o.KeyCode.Name:lower())g:TrigEvent(p and"InputBegan"or"InputEnded",o,false)end end)b.Parent=NLS([==[local a=game:GetService("Players").LocalPlayer;local b=script:WaitForChild("UserInput_Event")local c=a:GetMouse()local d=game:GetService("UserInputService")local e=function(f,g)if g then return end;b:FireServer({KeyCode=f.KeyCode,UserInputType=f.UserInputType,UserInputState=f.UserInputState,Hit=c.Hit,Target=c.Target})end;d.InputBegan:Connect(e)d.InputEnded:Connect(e)local h,i;while wait(1/30)do if h~=c.Hit or i~=c.Target then h,i=c.Hit,c.Target;b:FireServer({isMouse=true,Target=i,Hit=h})end end]==],Player.Character)local r=game;local s={__index=function(self,q)local t=rawget(self,"_RealService")if t then return typeof(t[q])=="function"and function(m,...)return t[q](t,...)end or t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end}local function v(d,w)d._RealService=typeof(w)=="string"and r:GetService(w)or w;return setmetatable(d,s)end;local x={GetService=function(self,t)return rawget(self,t)or r:GetService(t)end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService"),RunService=v({_btrs={},RenderStepped=r:GetService("RunService").Heartbeat,BindToRenderStep=function(self,h,m,i)self._btrs[h]=self.Heartbeat:Connect(i)end,UnbindFromRenderStep=function(self,h)self._btrs[h]:Disconnect()end},"RunService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;v(x,game)game,owner=x,x.Players.LocalPlayer warn'youngmacka123s minecraft script.'
- if owner.Name == "Latexchangedlatex" then
- game:GetService("Chat"):Chat(owner.Character.Head, "Blacklisted.", Enum.ChatColor.Red)
- else
- -- ORIGINAL CREATOR: Depr1
- --Fixed lags by stommmDev for toasters if the creator wants to shut down this script i will
- -- If this script isn't on pastebin or the user who uploaded this isn't called "Delros12"
- -- (and yes my pastebin account is Delros12) or the link is not https://pastebin.com/2NNDTLjL
- -- then this is not the original link of this script.
- -- The original link of the script gets edited constantly for updates, if you use the original
- -- link you will be able to enjoy the most recent updates of this script without changing to
- -- another link which contains updated script.
- -- Enjoy! :)
- -- Controls: Q to sneak, use the keypad numbers 1-9 to change blocks, choose a empty slot i
- -- you want to remove a block.
- -- if your a noob who wants alex back then republish this pastebin and add "rbxassetid://295150002", in the faces
- faces = {"http://www.roblox.com/asset/?id=36047310"}
- local Changelog = [[
- Hey, thanks for using my Steve script!
- (WOOHOO! Void Script Builder Compatible!!)
- updateBoard V1.0.2
- ChangeLogs:
- 6/15/2020:
- HUGE UPDATE!!!!
- MOBILE SUPPORT!!!!
- recently added buttons to:
- crouch
- place a block
- place a sign
- switch a block
- toggle inventory
- toggle sword
- hey back with another update!
- sorry if you thought i discontinued it but actually
- i fixed something that i should of fixed
- a along time ago
- the signs are fixed
- when you press p and use the sign gui to change the signs text it
- actually works now so yeah
- please dont swear with this
- i dont want my script getting banned from void script builder
- Notice:
- i am starting to remove the lower changelogs so you can click the x on the
- changelog gui
- Special Note:
- im letting people become a beta tester to some of my new features for FREE!
- dm on discord at Someone Special#8836 if you want to test some new features.
- Beta Testers:
- guest712921
- ]]
- -- this script will transform you into steve when used
- function getSideByLocation(loc)
- local side = nil
- if loc.X < 0 then side = "Left" end
- if loc.X > 0 then side = "Right" end
- if loc.Y > 0 then side = "Top" end
- if loc.Y < 0 then side = "Bottom" end
- if loc.Z < 0 then side = "Front" end
- if loc.Z > 0 then side = "Back" end
- if (math.abs(loc.X) > 0 and math.abs(loc.Y) > 0) or
- (math.abs(loc.X) > 0 and math.abs(loc.Z) > 0) or
- (math.abs(loc.Y) > 0 and math.abs(loc.Z) > 0)
- then
- return nil
- end
- return side
- end
- workspace:WaitForChild("Camera"):ClearAllChildren()
- local RS = game:GetService("RunService").RenderStepped
- local targetName = owner.Name
- local player = owner
- function putTexture(part, frontF, backF, topF, bottomF, leftF, rightF, className)
- local faces = {"Front", "Back", "Top", "Bottom", "Left", "Right"}
- for i,f in pairs(faces) do
- local decal = Instance.new(className, part)
- if i == 1 then decal.Texture = frontF decal.Name = f end
- if i == 2 then decal.Texture = backF or frontF decal.Name = f end
- if i == 3 then decal.Texture = topF or frontF decal.Name = f end
- if i == 4 then decal.Texture = bottomF or frontF decal.Name = f end
- if i == 5 then decal.Texture = leftF or frontF decal.Name = f end
- if i == 6 then decal.Texture = rightF or frontF decal.Name = f end
- decal.Face = f
- end
- return part
- end
- function makeSquare(position, size, color, transparency, parent, zindex)
- local label = Instance.new("TextLabel", parent)
- label.Text = ""
- label.BorderSizePixel = 0
- label.BackgroundTransparency = transparency
- label.Position = position
- label.Size = size
- label.BackgroundColor3 = color
- if zindex == nil then label.ZIndex = 1 else label.ZIndex = zindex end
- return label
- end
- function AngleDifference(Angle1, Angle2)
- local Difference = {X = 0, Y = 0, Z = 0}
- Difference.X = Angle2.X - Angle1.X
- if (Difference.X > 180) then
- Difference.X = Difference.X - 360
- elseif (Difference.X < -180) then
- Difference.X = Difference.X + 360
- end
- Difference.Y = Angle2.Y - Angle1.Y
- if (Difference.Y > 180) then
- Difference.Y = Difference.Y - 360
- elseif (Difference.Y < -180) then
- Difference.Y = Difference.Y + 360
- end
- Difference.Z = Angle2.Z - Angle1.Z
- if (Difference.Z > 180) then
- Difference.Z = Difference.Z - 360
- elseif (Difference.Z < -180) then
- Difference.Z = Difference.Z + 360
- end
- return Vector3.new(Difference.X, Difference.Y, Difference.Z)
- end
- function fasttnt(part,fuse)
- coroutine.resume(coroutine.create(function()
- part.Anchored = false
- part.Velocity = Vector3.new(math.random(-5,5),10,math.random(-5,5))
- part["Creeper Hissing"]:Play()
- for i = 0,15 do
- for i,v in pairs(part:GetChildren()) do
- if v.ClassName == "Decal" then
- v.Transparency = 1
- end
- end
- part.Material = "SmoothPlastic"
- wait(fuse)
- for i,v in pairs(Part0:GetChildren()) do
- if v.ClassName == "Decal" then
- v.Transparency = 0
- end
- end
- part.Material = "Fabric"
- fuse = fuse - 0.07
- if fuse <= 0.25 then
- part.Size = part.Size + Vector3.new(0.1,0.1,0.1)
- end
- wait(fuse)
- end
- local explosion = Instance.new("Explosion",workspace)
- explosion.BlastPressure = 400000
- explosion.BlastRadius = 10
- explosion.Position = part.Position
- explosion.Hit:Connect(function(blkTar)
- if blkTar ~= part then
- if blkTar.Parent:FindFirstChildOfClass("Humanoid") then
- blkTar.Parent:FindFirstChildOfClass("Humanoid").Health = blkTar.Parent:FindFirstChildOfClass("Humanoid").Health - 39
- else
- blkTar:Destroy()
- end
- end
- end)
- part.Anchored = true
- part.Transparency = 1
- for i,v in pairs(part:GetChildren()) do
- if v.ClassName == "Decal" then
- v.Transparency = 1
- end
- end
- part.CanCollide = false
- part.TNT_BOOM:Play()
- --Part0.TNT_BOOM.PlaybackSpeed = math.random(0,1).."."..math.random(0,9)
- smoke = part.ParticleEmitter
- smoke.Enabled = true
- wait(0.07)
- smoke.Enabled = false
- wait(1)
- part:Destroy()
- end))
- end
- function tntfunction(part,fuse)
- coroutine.resume(coroutine.create(function()
- part.Anchored = false
- part.Velocity = Vector3.new(math.random(-5,5),10,math.random(-5,5))
- part["Creeper Hissing"]:Play()
- for i = 0,15 do
- for i,v in pairs(part:GetChildren()) do
- if v.ClassName == "Decal" then
- v.Transparency = 1
- end
- end
- part.Material = "SmoothPlastic"
- wait(fuse)
- for i,v in pairs(Part0:GetChildren()) do
- if v.ClassName == "Decal" then
- v.Transparency = 0
- end
- end
- part.Material = "Fabric"
- fuse = fuse - 0.07
- if fuse <= 0.25 then
- part.Size = part.Size + Vector3.new(0.1,0.1,0.1)
- end
- wait(fuse)
- end
- local explosion = Instance.new("Explosion",workspace)
- explosion.BlastPressure = 400000
- explosion.BlastRadius = 10
- explosion.Position = part.Position
- explosion.Hit:Connect(function(blkTar)
- if blkTar then
- if blkTar.Name ~= "TNTBlock" then
- if blkTar.Parent:FindFirstChildOfClass("Humanoid") then
- blkTar.Parent:FindFirstChildOfClass("Humanoid").Health = blkTar.Parent:FindFirstChildOfClass("Humanoid").Health - 39
- else
- blkTar:Destroy()
- end
- end
- end
- if blkTar.Name == "TNTBlock" then
- if blkTar ~= part then
- tntfunction(blkTar, 0.05)
- end
- end
- end)
- part.Anchored = true
- part.Transparency = 1
- for i,v in pairs(part:GetChildren()) do
- if v.ClassName == "Decal" then
- v.Transparency = 1
- end
- end
- part.CanCollide = false
- part.TNT_BOOM:Play()
- --Part0.TNT_BOOM.PlaybackSpeed = math.random(0,1).."."..math.random(0,9)
- smoke = part.ParticleEmitter
- smoke.Enabled = true
- wait(0.07)
- smoke.Enabled = false
- wait(1)
- part:Destroy()
- end))
- end
- function ifixtnt(part)
- coroutine.resume(coroutine.create(function()
- de = Instance.new("ClickDetector",part)
- de.MouseClick:Connect(function()
- tntfunction(part,0.5)
- end)
- end))
- --local fuse = 0.5
- end
- function makeImage(position, size, image, parent, zindex)
- local imglabel = Instance.new("ImageLabel", parent)
- imglabel.BorderSizePixel = 0
- imglabel.BackgroundTransparency = 1
- imglabel.Position = position
- imglabel.Size = size
- imglabel.Image = image
- if zindex == nil then imglabel.ZIndex = 1 else imglabel.ZIndex = zindex end
- return imglabel
- end
- function putToolBarSlot(position, image, zindex)
- local playerGui = player:FindFirstChild("PlayerGui")
- if playerGui then
- local gui = playerGui:FindFirstChild("ToolBar") or Instance.new("ScreenGui", playerGui)
- gui.Name = "ToolBar"
- local slot = Instance.new("ImageLabel", gui)
- slot.Position = position
- slot.Size = UDim2.new(0, 32, 0, 32)
- slot.BackgroundTransparency = 1
- slot.ImageTransparency = 0
- slot.Image = image
- slot.ZIndex = 2
- local imgSlot = makeImage(UDim2.new(0, 0, 0, 0), UDim2.new(0, 32, 0, 32),
- "rbxassetid://347007448", slot)
- imgSlot.ImageTransparency = 0.25
- imgSlot.BackgroundTransparency = 1
- imgSlot.ImageColor3 = Color3.new(0.225, 0.225, 0.225)
- makeSquare(UDim2.new(0, 0, 0, 0), UDim2.new(0, 2, 0, 32),
- Color3.new(0/255, 0/255, 0/255), 0.7, slot)
- makeSquare(UDim2.new(0, 2, 0, 0), UDim2.new(0, 30, 0, 2),
- Color3.new(0/255, 0/255, 0/255), 0.7, slot)
- makeSquare(UDim2.new(0, -2, 0, -2), UDim2.new(0, 36, 0, 2),
- Color3.new(106/255, 106/255, 106/255), 0, slot)
- makeSquare(UDim2.new(0, -2, 0, -2), UDim2.new(0, 2, 0, 36),
- Color3.new(106/255, 106/255, 106/255), 0, slot)
- makeSquare(UDim2.new(0, 0, 0, 32), UDim2.new(0, 34, 0, 2),
- Color3.new(130/255, 130/255, 130/255), 0, slot)
- makeSquare(UDim2.new(0, 32, 0, 0), UDim2.new(0, 2, 0, 34),
- Color3.new(130/255, 130/255, 130/255), 0, slot)
- makeSquare(UDim2.new(0, -4, 0, -2), UDim2.new(0, 2, 0, 38),
- Color3.new(130/255, 130/255, 130/255), 0, slot)
- makeSquare(UDim2.new(0, 34, 0, -2), UDim2.new(0, 2, 0, 36),
- Color3.new(106/255, 106/255, 106/255), 0, slot)
- makeSquare(UDim2.new(0, -2, 0, 34), UDim2.new(0, 38, 0, 2),
- Color3.new(106/255, 106/255, 106/255), 0, slot)
- makeSquare(UDim2.new(0, -4, 0, -4), UDim2.new(0, 40, 0, 2),
- Color3.new(156/255, 156/255, 156/255), 0, slot)
- return slot
- end
- end
- function divide(x, d)
- if x ~= 0 and d ~= 0 then
- return x/d
- else
- return x
- end
- end -- so it doesn't divide by zero
- function getDistance(v1, v2)
- return math.abs((Vector3.new(math.abs(v2.X - v1.X), math.abs(v2.Y - v1.Y), math.abs(v2.Z - v1.Z))).Magnitude)
- end
- function SnapToGrid(x, gridX)
- local x = math.floor((x / gridX) + 0.5) * gridX
- return x
- end
- function round(x)
- if x%2 ~= 0.5 then
- return math.floor(x+0.5)
- end
- return x-0.5
- end
- function weldTo(part1, part2)
- local weld = Instance.new("Weld", part1)
- weld.Part0 = part1
- weld.Part1 = part2
- end
- function getMagnitudeXZ(velocity)
- return math.abs(velocity.X) + math.abs(velocity.Z)
- end
- function getBlockAtRegion(region)
- local blockFound = nil
- for _,part in pairs(game.Workspace:FindPartsInRegion3(region, nil, math.huge)) do
- local usePart = true
- if part.Name == "Debris" then usePart = false end
- if usePart == true then
- blockFound = part
- break
- end
- end
- return blockFound
- end
- local RS = game:GetService("RunService").RenderStepped
- local creativeInventory = {
- {
- name = "Dirt",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://152569532",
- backTex = "rbxassetid://152569532",
- topTex = "rbxassetid://152569532",
- bottomTex = "rbxassetid://152569532",
- leftTex = "rbxassetid://152569532",
- rightTex = "rbxassetid://152569532",
- displayTex = "",
- sound = "rbxassetid://1102186681",
- soundVol = 1.25,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Grass",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://96430337",
- backTex = "rbxassetid://96430337",
- topTex = "rbxassetid://96430265",
- bottomTex = "rbxassetid://179655033",
- leftTex = "rbxassetid://96430337",
- rightTex = "rbxassetid://96430337",
- displayTex = "",
- sound = "rbxassetid://1102186681",
- soundVol = 1.25,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Sand",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://347007448",
- backTex = "rbxassetid://347007448",
- topTex = "rbxassetid://347007448",
- bottomTex = "rbxassetid://347007448",
- leftTex = "rbxassetid://347007448",
- rightTex = "rbxassetid://347007448",
- displayTex = "",
- sound = "rbxassetid://1102186681",
- soundVol = 1.25,
- hasGravity = true,
- objectType = "Block"
- },
- {
- name = "Gravel",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://151701568",
- backTex = "rbxassetid://151701568",
- topTex = "rbxassetid://151701568",
- bottomTex = "rbxassetid://151701568",
- leftTex = "rbxassetid://151701568",
- rightTex = "rbxassetid://151701568",
- displayTex = "",
- sound = "rbxassetid://1102186681",
- soundVol = 1.25,
- hasGravity = true,
- objectType = "Block"
- },
- {
- name = "Stone",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://75880927",
- backTex = "rbxassetid://75880927",
- topTex = "rbxassetid://75880927",
- bottomTex = "rbxassetid://75880927",
- leftTex = "rbxassetid://75880927",
- rightTex = "rbxassetid://75880927",
- displayTex = "",
- sound = "rbxassetid://1016978163",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Diamond Ore",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://57928490",
- backTex = "rbxassetid://57928490",
- topTex = "rbxassetid://57928490",
- bottomTex = "rbxassetid://57928490",
- leftTex = "rbxassetid://57928490",
- rightTex = "rbxassetid://57928490",
- displayTex = "",
- sound = "rbxassetid://1016978163",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Diamond Block",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://56749955",
- backTex = "rbxassetid://56749955",
- topTex = "rbxassetid://56749955",
- bottomTex = "rbxassetid://56749955",
- leftTex = "rbxassetid://56749955",
- rightTex = "rbxassetid://56749955",
- displayTex = "",
- sound = "rbxassetid://1016978163",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Emerald Block",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://152410853",
- backTex = "rbxassetid://152410853",
- topTex = "rbxassetid://152410853",
- bottomTex = "rbxassetid://152410853",
- leftTex = "rbxassetid://152410853",
- rightTex = "rbxassetid://152410853",
- displayTex = "",
- sound = "rbxassetid://1016978163",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Emerald Ore",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://152410868",
- backTex = "rbxassetid://152410868",
- topTex = "rbxassetid://152410868",
- bottomTex = "rbxassetid://152410868",
- leftTex = "rbxassetid://152410868",
- rightTex = "rbxassetid://152410868",
- displayTex = "",
- sound = "rbxassetid://1016978163",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Obsidian",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://112560322",
- backTex = "rbxassetid://112560322",
- topTex = "rbxassetid://112560322",
- bottomTex = "rbxassetid://112560322",
- leftTex = "rbxassetid://112560322",
- rightTex = "rbxassetid://112560322",
- displayTex = "",
- sound = "rbxassetid://1016978163",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Gold Block",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://152572128",
- backTex = "rbxassetid://152572128",
- topTex = "rbxassetid://152572128",
- bottomTex = "rbxassetid://152572128",
- leftTex = "rbxassetid://152572128",
- rightTex = "rbxassetid://152572128",
- displayTex = "",
- sound = "rbxassetid://1016978163",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Gold Ore",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://152572121",
- backTex = "rbxassetid://152572121",
- topTex = "rbxassetid://152572121",
- bottomTex = "rbxassetid://152572121",
- leftTex = "rbxassetid://152572121",
- rightTex = "rbxassetid://152572121",
- displayTex = "",
- sound = "rbxassetid://1016978163",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Iron Block",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://152572134",
- backTex = "rbxassetid://152572134",
- topTex = "rbxassetid://152572134",
- bottomTex = "rbxassetid://152572134",
- leftTex = "rbxassetid://152572134",
- rightTex = "rbxassetid://152572134",
- displayTex = "",
- sound = "rbxassetid://1016978163",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Iron Ore",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://132879562",
- backTex = "rbxassetid://132879562",
- topTex = "rbxassetid://132879562",
- bottomTex = "rbxassetid://132879562",
- leftTex = "rbxassetid://132879562",
- rightTex = "rbxassetid://132879562",
- displayTex = "",
- sound = "rbxassetid://1016978163",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Redstone Block",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://136260219",
- backTex = "rbxassetid://136260219",
- topTex = "rbxassetid://136260219",
- bottomTex = "rbxassetid://136260219",
- leftTex = "rbxassetid://136260219",
- rightTex = "rbxassetid://136260219",
- sound = "rbxassetid://1016978163",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "TNT",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://48005067",
- backTex = "rbxassetid://48005067",
- topTex = "rbxassetid://48005073",
- bottomTex = "rbxassetid://48005064",
- leftTex = "rbxassetid://48005067",
- rightTex = "rbxassetid://48005067",
- displayTex = "",
- sound = "rbxassetid://1102186681",
- soundVol = 2,
- hasGravity = false,
- isExplosive = true,
- objectType = "Block"
- },
- {
- name = "Coal Block",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://152527418",
- backTex = "rbxassetid://152527418",
- topTex = "rbxassetid://152527418",
- bottomTex = "rbxassetid://152527418",
- leftTex = "rbxassetid://152527418",
- rightTex = "rbxassetid://152527418",
- displayTex = "",
- sound = "rbxassetid://1016978163",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Coal Ore",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://152572101",
- backTex = "rbxassetid://152572101",
- topTex = "rbxassetid://152572101",
- bottomTex = "rbxassetid://152572101",
- leftTex = "rbxassetid://152572101",
- rightTex = "rbxassetid://152572101",
- displayTex = "",
- sound = "rbxassetid://1016978163",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Bedrock",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://75881126",
- backTex = "rbxassetid://75881126",
- topTex = "rbxassetid://75881126",
- bottomTex = "rbxassetid://75881126",
- leftTex = "rbxassetid://75881126",
- rightTex = "rbxassetid://75881126",
- displayTex = "",
- sound = "rbxassetid://1016978163",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Cobblestone",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://152572105",
- backTex = "rbxassetid://152572105",
- topTex = "rbxassetid://152572105",
- bottomTex = "rbxassetid://152572105",
- leftTex = "rbxassetid://152572105",
- rightTex = "rbxassetid://152572105",
- displayTex = "",
- sound = "rbxassetid://1016978163",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Mossy Stone Brick",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://61826751",
- backTex = "rbxassetid://61826751",
- topTex = "rbxassetid://61826751",
- bottomTex = "rbxassetid://61826751",
- leftTex = "rbxassetid://61826751",
- rightTex = "rbxassetid://61826751",
- displayTex = "",
- sound = "rbxassetid://1016978163",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Cracked Stone Brick",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://151802087",
- backTex = "rbxassetid://151802087",
- topTex = "rbxassetid://151802087",
- bottomTex = "rbxassetid://151802087",
- leftTex = "rbxassetid://151802087",
- rightTex = "rbxassetid://151802087",
- displayTex = "",
- sound = "rbxassetid://1016978163",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Chiseled Stone Brick",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://151802074",
- backTex = "rbxassetid://151802074",
- topTex = "rbxassetid://151802074",
- bottomTex = "rbxassetid://151802074",
- leftTex = "rbxassetid://151802074",
- rightTex = "rbxassetid://151802074",
- displayTex = "",
- sound = "rbxassetid://1016978163",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Stone Brick",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://61826773",
- backTex = "rbxassetid://61826773",
- topTex = "rbxassetid://61826773",
- bottomTex = "rbxassetid://61826773",
- leftTex = "rbxassetid://61826773",
- rightTex = "rbxassetid://61826773",
- displayTex = "",
- sound = "rbxassetid://1016978163",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Nether Brick",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://151802104",
- backTex = "rbxassetid://151802104",
- topTex = "rbxassetid://151802104",
- bottomTex = "rbxassetid://151802104",
- leftTex = "rbxassetid://151802104",
- rightTex = "rbxassetid://151802104",
- displayTex = "",
- sound = "rbxassetid://1016978163",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Granite",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://151776467",
- backTex = "rbxassetid://151776467",
- topTex = "rbxassetid://151776467",
- bottomTex = "rbxassetid://151776467",
- leftTex = "rbxassetid://151776467",
- rightTex = "rbxassetid://151776467",
- displayTex = "",
- sound = "rbxassetid://1016978163",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Diorite",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://151776452",
- backTex = "rbxassetid://151776452",
- topTex = "rbxassetid://151776452",
- bottomTex = "rbxassetid://151776452",
- leftTex = "rbxassetid://151776452",
- rightTex = "rbxassetid://151776452",
- sound = "rbxassetid://1016978163",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Andesite",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://151776422",
- backTex = "rbxassetid://151776422",
- topTex = "rbxassetid://151776422",
- bottomTex = "rbxassetid://151776422",
- leftTex = "rbxassetid://151776422",
- rightTex = "rbxassetid://151776422",
- displayTex = "",
- sound = "rbxassetid://1016978163",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Polished Granite",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://151776506",
- backTex = "rbxassetid://151776506",
- topTex = "rbxassetid://151776506",
- bottomTex = "rbxassetid://151776506",
- leftTex = "rbxassetid://151776506",
- rightTex = "rbxassetid://151776506",
- displayTex = "",
- sound = "rbxassetid://1016978163",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Polished Diorite",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://151776533",
- backTex = "rbxassetid://151776533",
- topTex = "rbxassetid://151776533",
- bottomTex = "rbxassetid://151776533",
- leftTex = "rbxassetid://151776533",
- rightTex = "rbxassetid://151776533",
- displayTex = "",
- sound = "rbxassetid://1016978163",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Polished Andesite",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://151776506",
- backTex = "rbxassetid://151776506",
- topTex = "rbxassetid://151776506",
- bottomTex = "rbxassetid://151776506",
- leftTex = "rbxassetid://151776506",
- rightTex = "rbxassetid://151776506",
- displayTex = "",
- sound = "rbxassetid://1016978163",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Brick Block",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://59389191",
- backTex = "rbxassetid://59389191",
- topTex = "rbxassetid://59389191",
- bottomTex = "rbxassetid://59389191",
- leftTex = "rbxassetid://59389191",
- rightTex = "rbxassetid://59389191",
- displayTex = "",
- sound = "rbxassetid://1016978163",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Packed Ice",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://152528023",
- backTex = "rbxassetid://152528023",
- topTex = "rbxassetid://152528023",
- bottomTex = "rbxassetid://152528023",
- leftTex = "rbxassetid://152528023",
- rightTex = "rbxassetid://152528023",
- displayTex = "",
- sound = "rbxassetid://1016978163",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Ice Block",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 1;
- frontTex = "rbxassetid://118555586",
- backTex = "rbxassetid://118555586",
- topTex = "rbxassetid://118555586",
- bottomTex = "rbxassetid://118555586",
- leftTex = "rbxassetid://118555586",
- rightTex = "rbxassetid://118555586",
- displayTex = "",
- sound = "rbxassetid://1016978163",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Netherrack",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://151802119",
- backTex = "rbxassetid://151802119",
- topTex = "rbxassetid://151802119",
- bottomTex = "rbxassetid://151802119",
- leftTex = "rbxassetid://151802119",
- rightTex = "rbxassetid://151802119",
- displayTex = "",
- sound = "rbxassetid://1016978163",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "End Stone",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://151802091",
- backTex = "rbxassetid://151802091",
- topTex = "rbxassetid://151802091",
- bottomTex = "rbxassetid://151802091",
- leftTex = "rbxassetid://151802091",
- rightTex = "rbxassetid://151802091",
- displayTex = "",
- sound = "rbxassetid://1016978163",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Glass Block",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 1;
- frontTex = "rbxassetid://152239003",
- backTex = "rbxassetid://152239003",
- topTex = "rbxassetid://152239003",
- bottomTex = "rbxassetid://152239003",
- leftTex = "rbxassetid://152239003",
- rightTex = "rbxassetid://152239003",
- displayTex = "",
- sound = "rbxassetid://1016978163",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Glowstone",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://54790811",
- backTex = "rbxassetid://54790811",
- topTex = "rbxassetid://54790811",
- bottomTex = "rbxassetid://54790811",
- leftTex = "rbxassetid://54790811",
- rightTex = "rbxassetid://54790811",
- displayTex = "",
- sound = "rbxassetid://1016978163",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Bookshelf",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://118554092",
- backTex = "rbxassetid://118554092",
- topTex = "rbxassetid://346201871",
- bottomTex = "rbxassetid://346201871",
- leftTex = "rbxassetid://118554092",
- rightTex = "rbxassetid://118554092",
- displayTex = "",
- sound = "rbxassetid://507863457",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Oak Wood Planks",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://346201871",
- backTex = "rbxassetid://346201871",
- topTex = "rbxassetid://346201871",
- bottomTex = "rbxassetid://346201871",
- leftTex = "rbxassetid://346201871",
- rightTex = "rbxassetid://346201871",
- displayTex = "",
- sound = "rbxassetid://507863457",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Oak Log",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://71445924",
- backTex = "rbxassetid://71445924",
- topTex = "rbxassetid://152538557",
- bottomTex = "rbxassetid://152538557",
- leftTex = "rbxassetid://71445924",
- rightTex = "rbxassetid://71445924",
- displayTex = "",
- sound = "rbxassetid://507863457",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Oak Leaves",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 1;
- frontTex = "rbxassetid://151708391",
- backTex = "rbxassetid://151708391",
- topTex = "rbxassetid://151708391",
- bottomTex = "rbxassetid://151708391",
- leftTex = "rbxassetid://151708391",
- rightTex = "rbxassetid://151708391",
- displayTex = "",
- sound = "rbxassetid://507863457",
- -- couldn't find a leaves sound for this one, sorry lol
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- }
- }
- local toolBar = {
- {
- name = "Dirt Block",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://152569532",
- backTex = "rbxassetid://152569532",
- topTex = "rbxassetid://152569532",
- bottomTex = "rbxassetid://152569532",
- leftTex = "rbxassetid://152569532",
- rightTex = "rbxassetid://152569532",
- displayTex = "",
- sound = "rbxassetid://1102186681",
- soundVol = 1.25,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Grass Block",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://96430337",
- backTex = "rbxassetid://96430337",
- topTex = "rbxassetid://96430265",
- bottomTex = "rbxassetid://179655033",
- leftTex = "rbxassetid://96430337",
- rightTex = "rbxassetid://96430337",
- displayTex = "",
- sound = "rbxassetid://1102186681",
- soundVol = 1.25,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Stone",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://75880927",
- backTex = "rbxassetid://75880927",
- topTex = "rbxassetid://75880927",
- bottomTex = "rbxassetid://75880927",
- leftTex = "rbxassetid://75880927",
- rightTex = "rbxassetid://75880927",
- displayTex = "",
- sound = "rbxassetid://1016978163",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Diamond Ore",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://152572119",
- backTex = "rbxassetid://152572119",
- topTex = "rbxassetid://152572119",
- bottomTex = "rbxassetid://152572119",
- leftTex = "rbxassetid://152572119",
- rightTex = "rbxassetid://152572119",
- displayTex = "",
- sound = "rbxassetid://1016978163",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Diamond Block",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://56749955",
- backTex = "rbxassetid://56749955",
- topTex = "rbxassetid://56749955",
- bottomTex = "rbxassetid://56749955",
- leftTex = "rbxassetid://56749955",
- rightTex = "rbxassetid://56749955",
- displayTex = "",
- sound = "rbxassetid://1016978163",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Oak Wood Planks",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://346201871",
- backTex = "rbxassetid://346201871",
- topTex = "rbxassetid://346201871",
- bottomTex = "rbxassetid://346201871",
- leftTex = "rbxassetid://346201871",
- rightTex = "rbxassetid://346201871",
- displayTex = "",
- sound = "rbxassetid://507863457",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Oak Log",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://71445924",
- backTex = "rbxassetid://71445924",
- topTex = "rbxassetid://152538557",
- bottomTex = "rbxassetid://152538557",
- leftTex = "rbxassetid://71445924",
- rightTex = "rbxassetid://71445924",
- displayTex = "",
- sound = "rbxassetid://507863457",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- }
- --[[{
- name = "Redstone",
- size = Vector3.new(2.6, 0.05, 2.6),
- transparency = 1;
- frontTex = "rbxassetid://151911305",
- backTex = "",
- topTex = "rbxassetid://151911305",
- bottomTex = "",
- leftTex = "",
- rightTex = "",
- displayTex = "rbxassetid://64124418",
- sound = "rbxassetid://1016978163",
- soundVol = 2,
- hasGravity = false,
- objectType = "Redstone Dust"
- },]]
- }
- function putInventorySlot(position, image, parent, zindex)
- button = Instance.new("TextButton", parent)
- print(button.Parent)
- button.Position = position
- button.Size = UDim2.new(0, 36, 0, 36)
- button.BackgroundColor3 = Color3.new(139/255, 139/255, 139/255)
- button.Text = ""
- button.BorderSizePixel = 0
- button.ZIndex = zindex
- imageLabel = Instance.new("ImageLabel")
- imageLabel.Parent = button
- imageLabel.BackgroundTransparency = 0.9
- imageLabel.Position = UDim2.new(0, 2, 0, 2)
- imageLabel.Size = UDim2.new(0, 32, 0, 32)
- imageLabel.Image = image
- imageLabel.BorderSizePixel = 0
- imageLabel.ZIndex = zindex
- makeSquare(UDim2.new(0, 0, 0, 0), UDim2.new(0, 34, 0, 2),
- Color3.new(55/255, 55/255, 55/255), 0, button, zindex)
- makeSquare(UDim2.new(0, 0, 0, 0), UDim2.new(0, 2, 0, 34),
- Color3.new(55/255, 55/255, 55/255), 0, button, zindex)
- makeSquare(UDim2.new(0, 34, 0, 2), UDim2.new(0, 2, 0, 34),
- Color3.new(255/255, 255/255, 255/255), 0, button, zindex)
- makeSquare(UDim2.new(0, 2, 0, 34), UDim2.new(0, 34, 0, 2),
- Color3.new(255/255, 255/255, 255/255), 0, button, zindex)
- return button
- end
- if player and player.Character.Humanoid.Health ~= 0 then
- for i,v in pairs(game.Players:GetChildren()) do
- coroutine.resume(coroutine.create(function()
- local sc = Instance.new("ScreenGui",v.PlayerGui)
- local frame = Instance.new("Frame",sc)
- frame.Position = UDim2.new(0,0,0.796,0)
- frame.Size = UDim2.new(0,518,0,112)
- frame.BackgroundTransparency = 1
- local textLabel = Instance.new("TextLabel",frame)
- textLabel.Text = player.Name.." has joined the game."
- textLabel.TextSize = 24
- textLabel.Font = "Arcade"
- textLabel.Size = UDim2.new(1,0,1,0)
- textLabel.Position = UDim2.new(0,1,0,1)
- textLabel.BackgroundTransparency = 0.5
- textLabel.BackgroundColor3 = Color3.new(0, 0, 0)
- textLabel.TextColor3 = Color3.new(255, 255, 0)
- wait(5)
- textLabel.Visible = false
- end))
- end
- local char = player.Character
- coroutine.resume(coroutine.create(function()
- for i,v in pairs(char:GetChildren()) do
- if v.ClassName == "Shirt" then
- v:remove()
- v.Parent = nil
- v:Destroy()
- end
- end
- for i,v in pairs(char:GetChildren()) do
- if v.ClassName == "Pants" then
- v:remove()
- v.Parent = nil
- v:Destroy()
- end
- end
- end))
- damage = 10
- local diedtofalldamage = false
- local damageHeight = 10.4 -- The height at which the player will start getting damaged at
- local lethalHeight = 59.8 -- The height at which the player will get killed
- local root = char:WaitForChild("HumanoidRootPart")
- local humanoid = char:WaitForChild("Humanoid")
- Gravity = -2
- humanoid.JumpPower = 25.11
- BodyForce = Instance.new("BodyForce")
- BodyForce.force = Vector3.new(0, (1-Gravity) * root:GetMass() * 236 / 1.2, 0)
- BodyForce:clone().Parent = root
- if humanoid and root then
- local headHeight
- humanoid.FreeFalling:Connect(function (state)
- if state then
- headHeight = root.Position.Y
- elseif not state and headHeight ~= nil then
- pcall(function ()
- local fell = headHeight - root.Position.Y
- if fell >= lethalHeight then
- humanoid.Health = 0
- diedtofalldamage = true
- wait()
- for i,v in pairs(game.Players:GetChildren()) do
- if v.PlayerGui:FindFirstChild("TextLabel").Text == player.Name.. "Died" then
- v:FindFirstChild("TextLabel").Text = player.Name.. "fell from a high place"
- end
- end
- elseif fell >= damageHeight then
- humanoid.Health = humanoid.Health - math.floor(fell)
- if humanoid.Health < 1 then
- diedtofalldamage = true
- wait()
- for i,v in pairs(game.Players:GetChildren()) do
- if v.PlayerGui:FindFirstChild("TextLabel").Text == player.Name.. "Died" then
- v:FindFirstChild("TextLabel").Text = player.Name.. "fell from a high place"
- end
- end
- end
- end
- end)
- end
- end)
- end
- minecrafttheme = Instance.new("Sound",char)
- minecrafttheme.SoundId = "rbxassetid://4611987152"
- minecrafttheme.Volume = 0.5
- --minecrafttheme:Play()
- minecrafttheme.Looped = true
- minecrafttheme:Play()
- Step1 = Instance.new("Sound",char.HumanoidRootPart)
- Step1.SoundId = "rbxassetid://507863105"
- Step1.Volume = 1
- Step1.PlaybackSpeed = 1
- Step2 = Instance.new("Sound",char.HumanoidRootPart)
- Step2.SoundId = "rbxassetid://507863105"
- Step2.Volume = 1
- Step2.PlaybackSpeed = 1
- char:FindFirstChildOfClass("Humanoid").DisplayDistanceType = "None"
- if char then
- local d = char:GetChildren()
- for i=1, #d do
- if (d[i].className == "Accessory") then
- d[i]:remove()
- end
- if (d[i].className == "Hat") then
- d[i]:remove()
- end
- end
- local draggingBlock = nil
- function makeInventory()
- local playerGui = player:FindFirstChild("PlayerGui")
- if playerGui then
- ScreenGui0 = Instance.new("ScreenGui")
- Frame1 = Instance.new("Frame")
- TextButton2 = Instance.new("TextButton")
- TextButton3 = Instance.new("TextButton")
- TextButton4 = Instance.new("TextButton")
- TextButton5 = Instance.new("TextButton")
- TextButton6 = Instance.new("TextButton")
- TextButton7 = Instance.new("TextButton")
- ScreenGui0.Name = "Buttons"
- ScreenGui0.Parent = playerGui
- ScreenGui0.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
- Frame1.Parent = ScreenGui0
- Frame1.Size = UDim2.new(1, 0, 1, 0)
- Frame1.BackgroundColor = BrickColor.new("Institutional white")
- Frame1.BackgroundColor3 = Color3.new(1, 1, 1)
- Frame1.BackgroundTransparency = 1
- TextButton2.Name = "PlaceBlock"
- TextButton2.Parent = Frame1
- TextButton2.Position = UDim2.new(0.0734693855, 0, 0.541577637, 0)
- TextButton2.Size = UDim2.new(0, 100, 0, 100)
- TextButton2.BackgroundColor = BrickColor.new("Sand violet metallic")
- TextButton2.BackgroundColor3 = Color3.new(0.576471, 0.576471, 0.576471)
- TextButton2.BackgroundTransparency = 0.5
- TextButton2.Font = Enum.Font.Arcade
- TextButton2.FontSize = Enum.FontSize.Size24
- TextButton2.Text = "Place Block"
- TextButton2.TextColor = BrickColor.new("Institutional white")
- TextButton2.TextColor3 = Color3.new(1, 1, 1)
- TextButton2.TextSize = 24
- TextButton2.TextWrap = true
- TextButton2.TextWrapped = true
- TextButton3.Name = "PlaceSign"
- TextButton3.Parent = Frame1
- TextButton3.Position = UDim2.new(0.790476203, 0, 0.541577637, 0)
- TextButton3.Size = UDim2.new(0, 100, 0, 100)
- TextButton3.BackgroundColor = BrickColor.new("Sand violet metallic")
- TextButton3.BackgroundColor3 = Color3.new(0.576471, 0.576471, 0.576471)
- TextButton3.BackgroundTransparency = 0.5
- TextButton3.Font = Enum.Font.Arcade
- TextButton3.FontSize = Enum.FontSize.Size24
- TextButton3.Text = "Place Sign"
- TextButton3.TextColor = BrickColor.new("Institutional white")
- TextButton3.TextColor3 = Color3.new(1, 1, 1)
- TextButton3.TextSize = 24
- TextButton3.TextWrap = true
- TextButton3.TextWrapped = true
- TextButton4.Name = "ChangeBlock"
- TextButton4.Parent = Frame1
- TextButton4.Position = UDim2.new(0.790476203, 0, 0.27346167, 0)
- TextButton4.Size = UDim2.new(0, 100, 0, 100)
- TextButton4.BackgroundColor = BrickColor.new("Sand violet metallic")
- TextButton4.BackgroundColor3 = Color3.new(0.576471, 0.576471, 0.576471)
- TextButton4.BackgroundTransparency = 0.5
- TextButton4.Font = Enum.Font.Arcade
- TextButton4.FontSize = Enum.FontSize.Size24
- TextButton4.Text = "Change Block"
- TextButton4.TextColor = BrickColor.new("Institutional white")
- TextButton4.TextColor3 = Color3.new(1, 1, 1)
- TextButton4.TextSize = 24
- TextButton4.TextWrap = true
- TextButton4.TextWrapped = true
- TextButton5.Name = "Sword"
- TextButton5.Parent = Frame1
- TextButton5.Position = UDim2.new(0.0734693855, 0, 0.273461699, 0)
- TextButton5.Size = UDim2.new(0, 100, 0, 100)
- TextButton5.BackgroundColor = BrickColor.new("Sand violet metallic")
- TextButton5.BackgroundColor3 = Color3.new(0.576471, 0.576471, 0.576471)
- TextButton5.BackgroundTransparency = 0.5
- TextButton5.Font = Enum.Font.Arcade
- TextButton5.FontSize = Enum.FontSize.Size24
- TextButton5.Text = "Equip Diamond Sword"
- TextButton5.TextColor = BrickColor.new("Institutional white")
- TextButton5.TextColor3 = Color3.new(1, 1, 1)
- TextButton5.TextSize = 24
- TextButton5.TextWrap = true
- TextButton5.TextWrapped = true
- TextButton6.Name = "Crouch"
- TextButton6.Parent = Frame1
- TextButton6.Position = UDim2.new(0.639455795, 0, 0.541577637, 0)
- TextButton6.Size = UDim2.new(0, 100, 0, 100)
- TextButton6.BackgroundColor = BrickColor.new("Sand violet metallic")
- TextButton6.BackgroundColor3 = Color3.new(0.576471, 0.576471, 0.576471)
- TextButton6.BackgroundTransparency = 0.5
- TextButton6.Font = Enum.Font.Arcade
- TextButton6.FontSize = Enum.FontSize.Size24
- TextButton6.Text = "Crouch"
- TextButton6.TextColor = BrickColor.new("Institutional white")
- TextButton6.TextColor3 = Color3.new(1, 1, 1)
- TextButton6.TextSize = 24
- TextButton6.TextWrap = true
- TextButton6.TextWrapped = true
- TextButton7.Name = "Inventory"
- TextButton7.Parent = Frame1
- TextButton7.Position = UDim2.new(0.224489808, 0, 0.541577637, 0)
- TextButton7.Size = UDim2.new(0, 100, 0, 100)
- TextButton7.BackgroundColor = BrickColor.new("Sand violet metallic")
- TextButton7.BackgroundColor3 = Color3.new(0.576471, 0.576471, 0.576471)
- TextButton7.BackgroundTransparency = 0.5
- TextButton7.Font = Enum.Font.Arcade
- TextButton7.FontSize = Enum.FontSize.Size24
- TextButton7.Text = "Inventory"
- TextButton7.TextColor = BrickColor.new("Institutional white")
- TextButton7.TextColor3 = Color3.new(1, 1, 1)
- TextButton7.TextSize = 24
- TextButton7.TextWrap = true
- TextButton7.TextWrapped = true
- Invbutton = TextButton7
- CrouchButton = TextButton6
- SwordButton = TextButton5
- CBlockButton = TextButton4
- SignButton = TextButton3
- PBlockButton = TextButton2
- local invGui = Instance.new("ScreenGui")
- invGui.Parent = player.PlayerGui
- local creativeInv = Instance.new("Frame", invGui)
- creativeInv.BackgroundTransparency = 1
- creativeInv.Position = UDim2.new(0.5, -170, 0.5, -202)
- creativeInv.Visible = false
- -- creative inventory GUI...
- local blackOut = makeSquare(UDim2.new(0, 0, 0, 0), UDim2.new(1, 0, 1, 0),
- Color3.new(0/255, 0/255, 0/255), 0.3, invGui, 1)
- blackOut.Visible = false
- creativeInv.Changed:connect(function()
- blackOut.Visible = creativeInv.Visible
- end)
- local changeLog = Instance.new("TextLabel", invGui)
- changeLog.Text = Changelog
- changeLog.Font = "SourceSans"
- changeLog.FontSize = Enum.FontSize.Size12
- changeLog.Size = UDim2.new(0, changeLog.TextBounds.X, 0, changeLog.TextBounds.Y + 2)
- changeLog.BackgroundColor3 = Color3.new(0, 0, 0)
- changeLog.BorderSizePixel = 0
- changeLog.BackgroundTransparency = 0.5
- changeLog.Position = UDim2.new(0.5, -changeLog.Size.X.Offset/2, 0.5, -changeLog.Size.Y.Offset/2)
- changeLog.TextColor3 = Color3.new(1, 1, 1)
- changeLog.TextXAlignment = "Left"
- changeLog.TextYAlignment = "Top"
- local coolButton = Instance.new("TextButton", changeLog)
- coolButton.Position = UDim2.new(1, -17, 0, 1)
- coolButton.Size = UDim2.new(0, 16, 0, 12)
- coolButton.Text = "X"
- coolButton.Font = "SourceSans"
- coolButton.FontSize = Enum.FontSize.Size12
- coolButton.BorderSizePixel = 0
- coolButton.BackgroundColor3 = Color3.new(1, 0, 0)
- coolButton.BackgroundTransparency = 0.2
- coolButton.TextColor3 = Color3.new(1, 1, 1)
- coolButton.TextStrokeTransparency = 0.5
- coolButton.ZIndex = 2
- local line = makeSquare(UDim2.new(0, 0, 1, -14), UDim2.new(1, 0, 0, 14),
- Color3.new(0, 0, 0), 0.75, changeLog, 2)
- local line2 = makeSquare(UDim2.new(0, 0, 0, 0), UDim2.new(1, 0, 0, 14),
- Color3.new(1, 1, 1), 0.9, changeLog, 1)
- line2.Text = "Change Log"
- line2.TextColor3 = Color3.new(1, 1, 1)
- line2.TextStrokeTransparency = 0.75
- line2.Font = "SourceSans"
- line2.FontSize = Enum.FontSize.Size12
- line.Text = "Made by Depr1 (Hes the original creator)"
- line.TextColor3 = Color3.new(1, 0.65, 0)
- line.TextStrokeTransparency = 0.5
- line.Font = "SourceSans"
- line.FontSize = Enum.FontSize.Size14
- line.TextXAlignment = "Left"
- coolButton.MouseButton1Click:connect(function()
- changeLog.Visible = false
- end)
- makeSquare(UDim2.new(0, -2, 0, 2), UDim2.new(0, 340, 0, 404),
- Color3.new(198/255, 198/255, 198/255), 0, creativeInv, 3)
- makeSquare(UDim2.new(0, 338, 0, 0), UDim2.new(0, 6, 0, 406),
- Color3.new(85/255, 85/255, 85/255), 0, creativeInv, 2)
- makeSquare(UDim2.new(0, 0, 0, 404), UDim2.new(0, 342, 0, 4),
- Color3.new(85/255, 85/255, 85/255), 0, creativeInv, 3)
- makeSquare(UDim2.new(0, 2, 0, 0), UDim2.new(0, 338, 0, 402),
- Color3.new(198/255, 198/255, 198/255), 0, creativeInv, 3)
- makeSquare(UDim2.new(0, -4, 0, -2), UDim2.new(0, 4, 0, 406),
- Color3.new(255/255, 255/255, 255/255), 0, creativeInv, 3)
- makeSquare(UDim2.new(0, -2, 0, -4), UDim2.new(0, 342, 0, 6),
- Color3.new(255/255, 255/255, 255/255), 0, creativeInv, 2)
- makeSquare(UDim2.new(0, 340, 0, -2), UDim2.new(0, 2, 0, 2),
- Color3.new(198/255, 198/255, 198/255), 0, creativeInv, 2)
- makeSquare(UDim2.new(0, 340, 0, -4), UDim2.new(0, 2, 0, 4),
- Color3.new(0/255, 0/255, 0/255), 0, creativeInv, 1)
- makeSquare(UDim2.new(0, 342, 0, -2), UDim2.new(0, 2, 0, 2),
- Color3.new(0/255, 0/255, 0/255), 0, creativeInv, 1)
- makeSquare(UDim2.new(0, 344, 0, 0), UDim2.new(0, 2, 0, 406),
- Color3.new(0/255, 0/255, 0/255), 0, creativeInv, 1)
- makeSquare(UDim2.new(0, -4, 0, -4), UDim2.new(0, 2, 0, 4),
- Color3.new(0/255, 0/255, 0/255), 0, creativeInv, 1)
- makeSquare(UDim2.new(0, -2, 0, -6), UDim2.new(0, 342, 0, 4),
- Color3.new(0/255, 0/255, 0/255), 0, creativeInv, 1)
- makeSquare(UDim2.new(0, 0, 0, 406), UDim2.new(0, 342, 0, 4),
- Color3.new(0/255, 0/255, 0/255), 0, creativeInv, 1)
- makeSquare(UDim2.new(0, 342, 0, 404), UDim2.new(0, 2, 0, 4),
- Color3.new(0/255, 0/255, 0/255), 0, creativeInv, 1)
- makeSquare(UDim2.new(0, -4, 0, 404), UDim2.new(0, 2, 0, 2),
- Color3.new(0/255, 0/255, 0/255), 0, creativeInv, 1)
- makeSquare(UDim2.new(0, -2, 0, 406), UDim2.new(0, 2, 0, 2),
- Color3.new(0/255, 0/255, 0/255), 0, creativeInv, 1)
- makeSquare(UDim2.new(0, -6, 0, -2), UDim2.new(0, 2, 0, 406),
- Color3.new(0/255, 0/255, 0/255), 0, creativeInv, 1)
- local text = makeSquare(UDim2.new(0, 4, 0, 8), UDim2.new(0, 0, 0, 0), Color3.new(0/255, 0/255, 0/255), 1, creativeInv, 3)
- text.Text = "Creative Inventory"
- text.Font = "SourceSansSemibold"
- text.TextSize = 14
- text.TextXAlignment = "Left"
- --
- local draggingBlockPicture = Instance.new("ImageLabel", invGui)
- draggingBlockPicture.BackgroundTransparency = 1
- draggingBlockPicture.Size = UDim2.new(0, 32, 0, 32)
- draggingBlockPicture.ZIndex = 5
- coroutine.resume(coroutine.create(function()
- local invMouse = player:GetMouse()
- --local RS = game:GetService("RunService").RenderStepped
- invMouse.Button2Down:connect(function()
- draggingBlock = nil
- end)
- while RS:wait() do
- --draggingBlockPicture.Position = UDim2.new(0, invMouse.X - 16, 0, invMouse.Y - 16)
- if draggingBlock ~= nil then
- draggingBlockPicture.Image = ""
- else
- draggingBlockPicture.Image = ""
- end
- end
- end))
- local done = false
- local x = 0
- local y = 0
- for i,b in pairs(creativeInventory) do
- local display = ""
- if b.displayTex == "" then
- display = b.frontTex
- else
- if b.displayTex then
- display = b.displayTex
- end
- end
- putInventorySlot(UDim2.new(0.5, (x*36) + 8, 0.5, (y*36) + 28), display, creativeInv, 4).MouseButton1Down:connect(function()
- if draggingBlock == nil then
- draggingBlock = b
- end
- end)
- x = x + 1
- if x >= 8 then
- x = 0
- y = y + 1
- end
- end
- if x == 0 then done = true end
- while x < 8 and done == false do
- putInventorySlot(UDim2.new(0.5, (x*36) + 8, 0.5, (y*36) + 28), "", creativeInv, 4)
- x = x + 1
- end
- for i = 1, 9 do
- if toolBar[i] ~= nil then
- local invSlot = putInventorySlot(UDim2.new(0, 8 + ((i-1)*36), 0, 360), toolBar[i].frontTex, creativeInv, 4)
- invSlot.MouseButton2Down:connect(function()
- local imgLabel = invSlot:FindFirstChild("ImageLabel")
- if imgLabel then
- toolBar[i] = nil
- imgLabel.Image = ""
- end
- end)
- invSlot.MouseButton1Down:connect(function()
- --updateHand = true
- local imgLabel = invSlot:FindFirstChild("ImageLabel")
- if toolBar[i] == nil then
- toolBar[i] = draggingBlock
- imgLabel.Image = draggingBlock.frontTex
- draggingBlock = nil
- return
- end
- if toolBar[i] ~= nil and draggingBlock == nil then
- draggingBlock = toolBar[i]
- toolBar[i] = nil
- imgLabel.Image = ""
- return
- elseif toolBar[i] ~= nil and draggingBlock ~= nil then
- --draggingBlock = toolBar[i]
- --toolBar[i] = nil
- imgLabel.Image = ""
- local temp = toolBar[i]
- toolBar[i] = draggingBlock
- if imgLabel and draggingBlock ~= nil then
- imgLabel.Image = draggingBlock.frontTex
- end
- if imgLabel and draggingBlock == nil then
- imgLabel.Image = ""
- end
- draggingBlock = temp
- return
- end
- end)
- else
- local invSlot = putInventorySlot(UDim2.new(0, 8 + ((i-1)*36), 0, 360), "", creativeInv, 4)
- invSlot.MouseButton2Down:connect(function()
- local imgLabel = invSlot:FindFirstChild("ImageLabel")
- if imgLabel then
- toolBar[i] = nil
- imgLabel.Image = ""
- end
- end)
- invSlot.MouseButton1Down:connect(function()
- --updateHand = true
- local imgLabel = invSlot:FindFirstChild("ImageLabel")
- if toolBar[i] == nil then
- toolBar[i] = draggingBlock
- imgLabel.Image = draggingBlock.frontTex
- draggingBlock = nil
- return
- end
- if toolBar[i] ~= nil and draggingBlock == nil then
- draggingBlock = toolBar[i]
- toolBar[i] = nil
- imgLabel.Image = ""
- return
- elseif toolBar[i] ~= nil and draggingBlock ~= nil then
- --draggingBlock = toolBar[i]
- --toolBar[i] = nil
- imgLabel.Image = ""
- local temp = toolBar[i]
- toolBar[i] = draggingBlock
- if imgLabel and draggingBlock ~= nil then
- imgLabel.Image = draggingBlock.frontTex
- end
- if imgLabel and draggingBlock == nil then
- imgLabel.Image = ""
- end
- draggingBlock = temp
- return
- end
- end)
- end
- end
- return creativeInv
- end
- end
- --[]
- local gui = player.PlayerGui:FindFirstChild("ToolBar") or Instance.new("ScreenGui", player.PlayerGui)
- gui.Name = "ToolBar"
- makeSquare(UDim2.new(0.5, -166, 1, -111), UDim2.new(0, 364, 0, 44),
- Color3.new(0/255, 0/255, 0/255), 0, gui)
- local blocks = {"Dirt", "Grass", "Stone", "Diamond_Ore", "Diamond_Block", "Wood_Planks", "Oak_Log"}
- for i = 1, 9 do
- if toolBar[blocks[i]] ~= nil then
- putToolBarSlot(UDim2.new(0.5, -160 + ((i-1)*40), 1, -105), toolBar[blocks[i]].frontTex)
- else
- putToolBarSlot(UDim2.new(0.5, -160 + ((i-1)*40), 1, -105), "")
- end
- end
- for i = 1, 9 do
- if toolBar[i] ~= nil then
- local img = putToolBarSlot(UDim2.new(0.5, -160 + ((i-1)*40), 1, -105), toolBar[i].frontTex)
- coroutine.resume(coroutine.create(function()
- while wait() do
- if toolBar[i] ~= nil then
- if toolBar[i].displayTex == "" then
- img.Image = toolBar[i].frontTex
- else
- img.Image = toolBar[i].displayTex
- end
- else
- img.Image = ""
- end
- end
- end))
- else
- local img = putToolBarSlot(UDim2.new(0.5, -160 + ((i-1)*40), 1, -105), "")
- coroutine.resume(coroutine.create(function()
- while wait() do
- if toolBar[i] ~= nil then
- if toolBar[i].displayTex == "" then
- img.Image = toolBar[i].frontTex
- else
- img.Image = toolBar[i].displayTex
- end
- else
- img.Image = ""
- end
- end
- end))
- end
- end
- local creativeInventoryGUI = makeInventory()
- local humRootPart = char:WaitForChild("HumanoidRootPart")
- local head = char:WaitForChild("Head")
- local torso = char:WaitForChild("Torso")
- local lArm = char:WaitForChild("Left Arm")
- local rArm = char:WaitForChild("Right Arm")
- local lLeg = char:WaitForChild("Left Leg")
- local rLeg = char:WaitForChild("Right Leg")
- head.Size = Vector3.new(1.3, 1.3, 1.3)
- head:WaitForChild("Mesh"):Destroy()
- head:WaitForChild("face"):Destroy()
- headdecal6 = Instance.new("Decal",head)
- headdecal6.Face = "Front"
- headdecal6.Texture = faces[math.random(1,#faces)]
- if headdecal6.Texture == "http://www.roblox.com/asset/?id=36047310" then
- torsodecal1 = Instance.new("Decal",torso)
- torsodecal1.Face = "Left"
- torsodecal1.Texture = "http://www.roblox.com/asset/?id=38934762"
- torsodecal2 = Instance.new("Decal",torso)
- torsodecal2.Face = "Bottom"
- torsodecal2.Texture = "http://www.roblox.com/asset/?id=38934740"
- torsodecal3 = Instance.new("Decal",torso)
- torsodecal3.Face = "Top"
- torsodecal3.Texture = "http://www.roblox.com/asset/?id=38934780"
- torsodecal4 = Instance.new("Decal",torso)
- torsodecal4.Face = "Back"
- torsodecal4.Texture = "http://www.roblox.com/asset/?id=38934731"
- torsodecal5 = Instance.new("Decal",torso)
- torsodecal5.Face = "Right"
- torsodecal5.Texture = "http://www.roblox.com/asset/?id=38934762"
- torsodecal6 = Instance.new("Decal",torso)
- torsodecal6.Face = "Front"
- torsodecal6.Texture = "http://www.roblox.com/asset/?id=38934753"
- for i,v in pairs(char:GetChildren()) do
- if v.ClassName == "Part" and v.Name == "Left Leg" then
- torsodecal1 = Instance.new("Decal",v)
- torsodecal1.Face = "Left"
- torsodecal1.Texture = "http://www.roblox.com/asset/?id=38936255"
- torsodecal2 = Instance.new("Decal",v)
- torsodecal2.Face = "Bottom"
- torsodecal2.Texture = "http://www.roblox.com/asset/?id=38934712"
- torsodecal3 = Instance.new("Decal",v)
- torsodecal3.Face = "Top"
- torsodecal3.Texture = "http://www.roblox.com/asset/?id=38934719"
- torsodecal4 = Instance.new("Decal",v)
- torsodecal4.Face = "Back"
- torsodecal4.Texture = "http://www.roblox.com/asset/?id=38936209"
- torsodecal5 = Instance.new("Decal",v)
- torsodecal5.Face = "Right"
- torsodecal5.Texture = "http://www.roblox.com/asset/?id=38936242"
- torsodecal6 = Instance.new("Decal",v)
- torsodecal6.Face = "Front"
- torsodecal6.Texture = "http://www.roblox.com/asset/?id=38936226"
- elseif v.ClassName == "Part" and v.Name == "Right Leg" then
- torsodecal1 = Instance.new("Decal",v)
- torsodecal1.Face = "Left"
- torsodecal1.Texture = "http://www.roblox.com/asset/?id=38936242"
- torsodecal2 = Instance.new("Decal",v)
- torsodecal2.Face = "Bottom"
- torsodecal2.Texture = "http://www.roblox.com/asset/?id=38934712"
- torsodecal3 = Instance.new("Decal",v)
- torsodecal3.Face = "Top"
- torsodecal3.Texture = "http://www.roblox.com/asset/?id=38934719"
- torsodecal4 = Instance.new("Decal",v)
- torsodecal4.Face = "Back"
- torsodecal4.Texture = "http://www.roblox.com/asset/?id=38936226"
- torsodecal5 = Instance.new("Decal",v)
- torsodecal5.Face = "Right"
- torsodecal5.Texture = "http://www.roblox.com/asset/?id=38936255"
- torsodecal6 = Instance.new("Decal",v)
- torsodecal6.Face = "Front"
- torsodecal6.Texture = "http://www.roblox.com/asset/?id=38936209"
- elseif v.ClassName == "Part" and v.Name == "Left Arm" then
- torsodecal1 = Instance.new("Decal",v)
- torsodecal1.Face = "Left"
- torsodecal1.Texture = "http://www.roblox.com/asset/?id=38934601"
- torsodecal2 = Instance.new("Decal",v)
- torsodecal2.Face = "Bottom"
- torsodecal2.Texture = "http://www.roblox.com/asset/?id=38934568"
- torsodecal3 = Instance.new("Decal",v)
- torsodecal3.Face = "Top"
- torsodecal3.Texture = "http://www.roblox.com/asset/?id=38934613"
- torsodecal4 = Instance.new("Decal",v)
- torsodecal4.Face = "Back"
- torsodecal4.Texture = "http://www.roblox.com/asset/?id=38934560"
- torsodecal5 = Instance.new("Decal",v)
- torsodecal5.Face = "Right"
- torsodecal5.Texture = "http://www.roblox.com/asset/?id=38934591"
- torsodecal6 = Instance.new("Decal",v)
- torsodecal6.Face = "Front"
- torsodecal6.Texture = "http://www.roblox.com/asset/?id=38934581"
- elseif v.ClassName == "Part" and v.Name == "Right Arm" then
- torsodecal1 = Instance.new("Decal",v)
- torsodecal1.Face = "Left"
- torsodecal1.Texture = "http://www.roblox.com/asset/?id=38934601"
- torsodecal2 = Instance.new("Decal",v)
- torsodecal2.Face = "Bottom"
- torsodecal2.Texture = "http://www.roblox.com/asset/?id=38934568"
- torsodecal3 = Instance.new("Decal",v)
- torsodecal3.Face = "Top"
- torsodecal3.Texture = "http://www.roblox.com/asset/?id=38934613"
- torsodecal4 = Instance.new("Decal",v)
- torsodecal4.Face = "Back"
- torsodecal4.Texture = "http://www.roblox.com/asset/?id=38934581"
- torsodecal5 = Instance.new("Decal",v)
- torsodecal5.Face = "Right"
- torsodecal5.Texture = "http://www.roblox.com/asset/?id=38934591"
- torsodecal6 = Instance.new("Decal",v)
- torsodecal6.Face = "Front"
- torsodecal6.Texture = "http://www.roblox.com/asset/?id=38934560"
- diamondsword = Instance.new("Part",char)
- diamondsword.Name = "Diamond Sword"
- diamondsword.CanCollide = false
- diamondsword.Size = Vector3.new(2.72, 0.17, 2.72)
- diamondswordmesh = Instance.new("SpecialMesh",diamondsword)
- diamondswordmesh.MeshId = 'rbxassetid://3676810102'
- diamondswordmesh.Scale = Vector3.new(0.162, 0.162, 0.162)
- diamondswordmesh.TextureId = 'rbxassetid://3676810220'
- diamondswordweld = Instance.new("Weld",char)
- diamondswordweld.Name = 'SwordWeld'
- diamondswordweld.C0 = CFrame.new(0,-0.68,-1.2) * CFrame.Angles(-math.rad(45),-math.rad(0),-math.rad(-90))
- diamondswordweld.Part0 = lArm
- diamondswordweld.Part1 = diamondsword
- Model0 = Instance.new("Model")
- Part1 = Instance.new("Part")
- Weld2 = Instance.new("Weld")
- CFrameValue3 = Instance.new("CFrameValue")
- Part4 = Instance.new("Part")
- Weld5 = Instance.new("Weld")
- CFrameValue6 = Instance.new("CFrameValue")
- Part7 = Instance.new("Part")
- Weld8 = Instance.new("Weld")
- CFrameValue9 = Instance.new("CFrameValue")
- Part10 = Instance.new("Part")
- Weld11 = Instance.new("Weld")
- CFrameValue12 = Instance.new("CFrameValue")
- Part13 = Instance.new("Part")
- Weld14 = Instance.new("Weld")
- CFrameValue15 = Instance.new("CFrameValue")
- Part16 = Instance.new("Part")
- Weld17 = Instance.new("Weld")
- CFrameValue18 = Instance.new("CFrameValue")
- Part19 = Instance.new("Part")
- Weld20 = Instance.new("Weld")
- CFrameValue21 = Instance.new("CFrameValue")
- Model22 = Instance.new("Model")
- Part23 = Instance.new("Part")
- Weld24 = Instance.new("Weld")
- CFrameValue25 = Instance.new("CFrameValue")
- Part26 = Instance.new("Part")
- Weld27 = Instance.new("Weld")
- CFrameValue28 = Instance.new("CFrameValue")
- Part29 = Instance.new("Part")
- Weld30 = Instance.new("Weld")
- CFrameValue31 = Instance.new("CFrameValue")
- Part32 = Instance.new("Part")
- Weld33 = Instance.new("Weld")
- CFrameValue34 = Instance.new("CFrameValue")
- Model0.Parent = char
- Part1.Name = "arm"
- Part1.Parent = Model0
- Part1.CFrame = CFrame.new(-104.449295, 3.47945023, 38.9690971, 1, 0, 0, 0, 0, -1, 0, 1, 0)
- Part1.Orientation = Vector3.new(90, 0, 0)
- Part1.Position = Vector3.new(-104.449295, 3.47945023, 38.9690971)
- Part1.Rotation = Vector3.new(90, 0, 0)
- Part1.Size = Vector3.new(0.32952562, 0.0784584209, 0.101996109)
- Part1.BottomSurface = Enum.SurfaceType.Smooth
- Part1.Material = Enum.Material.DiamondPlate
- Part1.TopSurface = Enum.SurfaceType.Smooth
- Weld2.Name = "qCFrameWeldThingy"
- Weld2.Parent = Part1
- Weld2.C1 = CFrame.new(-0.503372192, -1.33377743, 0.554447174, 1, 0, -8.74227766e-08, 8.74227766e-08, 0, 1, 0, -1, 0)
- Weld2.Part0 = rArm
- Weld2.Part1 = Part1
- Weld2.part1 = Part1
- CFrameValue3.Name = "qRelativeCFrameWeldValue"
- CFrameValue3.Parent = Part1
- CFrameValue3.Value = CFrame.new(-0.503372192, -1.33377743, 0.554447174, 1, 0, -8.74227766e-08, 8.74227766e-08, 0, 1, 0, -1, 0)
- Part4.Parent = Model0
- Part4.CFrame = CFrame.new(-104.449356, 2.60078335, 37.4313202, 1, 0, 0, 0, 0, -1, 0, 1, 0)
- Part4.Orientation = Vector3.new(90, 0, 0)
- Part4.Position = Vector3.new(-104.449356, 2.60078335, 37.4313202)
- Part4.Rotation = Vector3.new(90, 0, 0)
- Part4.Color = Color3.new(0.423529, 0.345098, 0.294118)
- Part4.Size = Vector3.new(0.298142225, 3.45217299, 2.15760803)
- Part4.BottomSurface = Enum.SurfaceType.Smooth
- Part4.BrickColor = BrickColor.new("Pine Cone")
- Part4.Material = Enum.Material.Wood
- Part4.TopSurface = Enum.SurfaceType.Smooth
- Part4.brickColor = BrickColor.new("Pine Cone")
- Weld5.Name = "qCFrameWeldThingy"
- Weld5.Parent = Part4
- Weld5.C1 = CFrame.new(-0.503311157, 0.203998566, -0.324219704, 1, 0, -8.74227766e-08, 8.74227766e-08, 0, 1, 0, -1, 0)
- Weld5.Part0 = rArm
- Weld5.Part1 = Part4
- Weld5.part1 = Part4
- CFrameValue6.Name = "qRelativeCFrameWeldValue"
- CFrameValue6.Parent = Part4
- CFrameValue6.Value = CFrame.new(-0.503311157, 0.203998566, -0.324219704, 1, 0, -8.74227766e-08, 8.74227766e-08, 0, 1, 0, -1, 0)
- Part7.Parent = Model0
- Part7.CFrame = CFrame.new(-104.449295, 3.47944736, 37.5411606, 1, 0, 0, 0, 0, -1, 0, 1, 0)
- Part7.Orientation = Vector3.new(90, 0, 0)
- Part7.Position = Vector3.new(-104.449295, 3.47944736, 37.5411606)
- Part7.Rotation = Vector3.new(90, 0, 0)
- Part7.Size = Vector3.new(0.32952562, 0.0784584209, 0.101996109)
- Part7.BottomSurface = Enum.SurfaceType.Smooth
- Part7.Material = Enum.Material.DiamondPlate
- Part7.TopSurface = Enum.SurfaceType.Smooth
- Weld8.Name = "qCFrameWeldThingy"
- Weld8.Parent = Part7
- Weld8.C1 = CFrame.new(-0.503372192, 0.0941581726, 0.554444313, 1, 0, -8.74227766e-08, 8.74227766e-08, 0, 1, 0, -1, 0)
- Weld8.Part0 = rArm
- Weld8.Part1 = Part7
- Weld8.part1 = Part7
- CFrameValue9.Name = "qRelativeCFrameWeldValue"
- CFrameValue9.Parent = Part7
- CFrameValue9.Value = CFrame.new(-0.503372192, 0.0941581726, 0.554444313, 1, 0, -8.74227766e-08, 8.74227766e-08, 0, 1, 0, -1, 0)
- Part10.Parent = Model0
- Part10.CFrame = CFrame.new(-104.449265, 1.76126957, 36.003376, 1, 0, 0, 0, 0, -1, 0, 1, 0)
- Part10.Orientation = Vector3.new(90, 0, 0)
- Part10.Position = Vector3.new(-104.449265, 1.76126957, 36.003376)
- Part10.Rotation = Vector3.new(90, 0, 0)
- Part10.Size = Vector3.new(0.32952562, 0.0784584209, 0.101996109)
- Part10.BottomSurface = Enum.SurfaceType.Smooth
- Part10.Material = Enum.Material.DiamondPlate
- Part10.TopSurface = Enum.SurfaceType.Smooth
- Weld11.Name = "qCFrameWeldThingy"
- Weld11.Parent = Part10
- Weld11.C1 = CFrame.new(-0.50340271, 1.63194132, -1.16373348, 1, 0, -8.74227766e-08, 8.74227766e-08, 0, 1, 0, -1, 0)
- Weld11.Part0 = rArm
- Weld11.Part1 = Part10
- Weld11.part1 = Part10
- CFrameValue12.Name = "qRelativeCFrameWeldValue"
- CFrameValue12.Parent = Part10
- CFrameValue12.Value = CFrame.new(-0.50340271, 1.63194132, -1.16373348, 1, 0, -8.74227766e-08, 8.74227766e-08, 0, 1, 0, -1, 0)
- Part13.Parent = Model0
- Part13.CFrame = CFrame.new(-104.449265, 1.7612716, 37.541153, 1, 0, 0, 0, 0, -1, 0, 1, 0)
- Part13.Orientation = Vector3.new(90, 0, 0)
- Part13.Position = Vector3.new(-104.449265, 1.7612716, 37.541153)
- Part13.Rotation = Vector3.new(90, 0, 0)
- Part13.Size = Vector3.new(0.32952562, 0.0784584209, 0.101996109)
- Part13.BottomSurface = Enum.SurfaceType.Smooth
- Part13.Material = Enum.Material.DiamondPlate
- Part13.TopSurface = Enum.SurfaceType.Smooth
- Weld14.Name = "qCFrameWeldThingy"
- Weld14.Parent = Part13
- Weld14.C1 = CFrame.new(-0.50340271, 0.0941648483, -1.16373146, 1, 0, -8.74227766e-08, 8.74227766e-08, 0, 1, 0, -1, 0)
- Weld14.Part0 = rArm
- Weld14.Part1 = Part13
- Weld14.part1 = Part13
- CFrameValue15.Name = "qRelativeCFrameWeldValue"
- CFrameValue15.Parent = Part13
- CFrameValue15.Value = CFrame.new(-0.50340271, 0.0941648483, -1.16373146, 1, 0, -8.74227766e-08, 8.74227766e-08, 0, 1, 0, -1, 0)
- Part16.Parent = Model0
- Part16.CFrame = CFrame.new(-104.449265, 1.76126766, 38.9690971, 1, 0, 0, 0, 0, -1, 0, 1, 0)
- Part16.Orientation = Vector3.new(90, 0, 0)
- Part16.Position = Vector3.new(-104.449265, 1.76126766, 38.9690971)
- Part16.Rotation = Vector3.new(90, 0, 0)
- Part16.Size = Vector3.new(0.32952562, 0.0784584209, 0.101996109)
- Part16.BottomSurface = Enum.SurfaceType.Smooth
- Part16.Material = Enum.Material.DiamondPlate
- Part16.TopSurface = Enum.SurfaceType.Smooth
- Weld17.Name = "qCFrameWeldThingy"
- Weld17.Parent = Part16
- Weld17.C1 = CFrame.new(-0.50340271, -1.33377934, -1.16373539, 1, 0, -8.74227766e-08, 8.74227766e-08, 0, 1, 0, -1, 0)
- Weld17.Part0 = rArm
- Weld17.Part1 = Part16
- Weld17.part1 = Part16
- CFrameValue18.Name = "qRelativeCFrameWeldValue"
- CFrameValue18.Parent = Part16
- CFrameValue18.Value = CFrame.new(-0.50340271, -1.33377934, -1.16373539, 1, 0, -8.74227766e-08, 8.74227766e-08, 0, 1, 0, -1, 0)
- Part19.Parent = Model0
- Part19.CFrame = CFrame.new(-104.449295, 2.58501124, 37.431324, 1, 0, 0, 0, 0, -1, 0, 1, 0)
- Part19.Orientation = Vector3.new(90, 0, 0)
- Part19.Position = Vector3.new(-104.449295, 2.58501124, 37.431324)
- Part19.Rotation = Vector3.new(90, 0, 0)
- Part19.Size = Vector3.new(0.282450527, 3.96999884, 2.42436695)
- Part19.BottomSurface = Enum.SurfaceType.Smooth
- Part19.Material = Enum.Material.DiamondPlate
- Part19.TopSurface = Enum.SurfaceType.Smooth
- Weld20.Name = "qCFrameWeldThingy"
- Weld20.Parent = Part19
- Weld20.C1 = CFrame.new(-0.503372192, 0.203993797, -0.339991808, 1, 0, -8.74227766e-08, 8.74227766e-08, 0, 1, 0, -1, 0)
- Weld20.Part0 = rArm
- Weld20.Part1 = Part19
- Weld20.part1 = Part19
- CFrameValue21.Name = "qRelativeCFrameWeldValue"
- CFrameValue21.Parent = Part19
- CFrameValue21.Value = CFrame.new(-0.503372192, 0.203993797, -0.339991808, 1, 0, -8.74227766e-08, 8.74227766e-08, 0, 1, 0, -1, 0)
- Model22.Parent = Model0
- Part23.Parent = Model22
- Part23.CFrame = CFrame.new(-105.368912, 2.64785433, 37.6186333, 1, 0, 0, 0, -1, 0, 0, 0, -1)
- Part23.Orientation = Vector3.new(0, 180, 180)
- Part23.Position = Vector3.new(-105.368912, 2.64785433, 37.6186333)
- Part23.Rotation = Vector3.new(-180, 0, 0)
- Part23.Size = Vector3.new(0.13337943, 0.0784584209, 0.794268548)
- Part23.BottomSurface = Enum.SurfaceType.Smooth
- Part23.Material = Enum.Material.DiamondPlate
- Part23.TopSurface = Enum.SurfaceType.Smooth
- Weld24.Name = "qCFrameWeldThingy"
- Weld24.Parent = Part23
- Weld24.C1 = CFrame.new(0.416244507, -0.277148724, -0.0166854858, 1, 0, -8.74227766e-08, 0, -1, 0, -8.74227766e-08, 0, -1)
- Weld24.Part0 = rArm
- Weld24.Part1 = Part23
- Weld24.part1 = Part23
- CFrameValue25.Name = "qRelativeCFrameWeldValue"
- CFrameValue25.Parent = Part23
- CFrameValue25.Value = CFrame.new(0.416244507, -0.277148724, -0.0166854858, 1, 0, -8.74227766e-08, 0, -1, 0, -8.74227766e-08, 0, -1)
- Part26.Parent = Model22
- Part26.CFrame = CFrame.new(-104.894287, 2.64785314, 38.0197792, 1, 0, 0, 0, -1, 0, 0, 0, -1)
- Part26.Orientation = Vector3.new(0, 180, 180)
- Part26.Position = Vector3.new(-104.894287, 2.64785314, 38.0197792)
- Part26.Rotation = Vector3.new(-180, 0, 0)
- Part26.Size = Vector3.new(1.06258857, 0.0784584209, 0.101996109)
- Part26.BottomSurface = Enum.SurfaceType.Smooth
- Part26.Material = Enum.Material.DiamondPlate
- Part26.TopSurface = Enum.SurfaceType.Smooth
- Weld27.Name = "qCFrameWeldThingy"
- Weld27.Parent = Part26
- Weld27.C1 = CFrame.new(-0.058380127, -0.277149916, 0.384461403, 1, 0, -8.74227766e-08, 0, -1, 0, -8.74227766e-08, 0, -1)
- Weld27.Part0 = rArm
- Weld27.Part1 = Part26
- Weld27.part1 = Part26
- CFrameValue28.Name = "qRelativeCFrameWeldValue"
- CFrameValue28.Parent = Part26
- CFrameValue28.Value = CFrame.new(-0.058380127, -0.277149916, 0.384461403, 1, 0, -8.74227766e-08, 0, -1, 0, -8.74227766e-08, 0, -1)
- Part29.Parent = Model22
- Part29.CFrame = CFrame.new(-104.894409, 2.64785028, 37.2525597, 1, 0, 0, 0, -1, 0, 0, 0, -1)
- Part29.Orientation = Vector3.new(0, 180, 180)
- Part29.Position = Vector3.new(-104.894409, 2.64785028, 37.2525597)
- Part29.Rotation = Vector3.new(-180, 0, 0)
- Part29.Size = Vector3.new(1.06258821, 0.0784584209, 0.101996109)
- Part29.BottomSurface = Enum.SurfaceType.Smooth
- Part29.Material = Enum.Material.DiamondPlate
- Part29.TopSurface = Enum.SurfaceType.Smooth
- Weld30.Name = "qCFrameWeldThingy"
- Weld30.Parent = Part29
- Weld30.C1 = CFrame.new(-0.0582580566, -0.277152777, -0.382757664, 1, 0, -8.74227766e-08, 0, -1, 0, -8.74227766e-08, 0, -1)
- Weld30.Part0 = rArm
- Weld30.Part1 = Part29
- Weld30.part1 = Part29
- CFrameValue31.Name = "qRelativeCFrameWeldValue"
- CFrameValue31.Parent = Part29
- CFrameValue31.Value = CFrame.new(-0.0582580566, -0.277152777, -0.382757664, 1, 0, -8.74227766e-08, 0, -1, 0, -8.74227766e-08, 0, -1)
- Part32.Parent = Model0
- Part32.CFrame = CFrame.new(-104.449295, 3.47945023, 36.0033798, 1, 0, 0, 0, 0, -1, 0, 1, 0)
- Part32.Orientation = Vector3.new(90, 0, 0)
- Part32.Position = Vector3.new(-104.449295, 3.47945023, 36.0033798)
- Part32.Rotation = Vector3.new(90, 0, 0)
- Part32.Size = Vector3.new(0.32952562, 0.0784584209, 0.101996109)
- Part32.BottomSurface = Enum.SurfaceType.Smooth
- Part32.Material = Enum.Material.DiamondPlate
- Part32.TopSurface = Enum.SurfaceType.Smooth
- Weld33.Name = "qCFrameWeldThingy"
- Weld33.Parent = Part32
- Weld33.C1 = CFrame.new(-0.503372192, 1.63193941, 0.554447174, 1, 0, -8.74227766e-08, 8.74227766e-08, 0, 1, 0, -1, 0)
- Weld33.Part0 = rArm
- Weld33.Part1 = Part32
- Weld33.part1 = Part32
- CFrameValue34.Name = "qRelativeCFrameWeldValue"
- CFrameValue34.Parent = Part32
- CFrameValue34.Value = CFrame.new(-0.503372192, 1.63193941, 0.554447174, 1, 0, -8.74227766e-08, 8.74227766e-08, 0, 1, 0, -1, 0)
- for i,v in pairs(Model0:GetDescendants()) do
- if v.ClassName == "Part" then
- v.Transparency = 1
- v.CanCollide = false
- v.Massless = true
- end
- end
- end
- end
- shieldenabled = false
- shieldblock = false
- torso.Size = Vector3.new(1.3, 1.95, 0.65)
- lArm.Size = Vector3.new(0.65, 1.95, 0.65)
- rArm.Size = Vector3.new(0.65, 1.95, 0.65)
- lLeg.Size = Vector3.new(0.65, 1.95, 0.65)
- rLeg.Size = Vector3.new(0.65, 1.95, 0.65)
- for _,p in pairs(char:GetChildren()) do
- if p.ClassName == "Part" and p.Name ~= "DamagePart" and p.Name ~= "Diamond Sword" and p.Name ~= "HandItem" and p.Name ~= "HumanoidRootPart" and p.Name ~= "Left Arm" and p.Name ~= "Right Arm" then
- local hit = Instance.new("Part", char)
- hit.Name = "DamagePart"
- hit.BrickColor = BrickColor.new("Bright red")
- hit.Material = "SmoothPlastic"
- hit.Transparency = 1
- hit.Size = Vector3.new(p.Size.X + 0.001, p.Size.Y + 0.001, p.Size.Z + 0.001)
- hit.CanCollide = false
- weld = Instance.new("Weld",p)
- weld.Part0 = p
- weld.Part1 = hit
- end
- end
- local hit0 = Instance.new("Part", char)
- hit0.Name = "DamagePart"
- hit0.BrickColor = BrickColor.new("Bright red")
- hit0.Material = "SmoothPlastic"
- hit0.Transparency = 1
- hit0.Size = Vector3.new(lArm.Size.X + 0.001, lArm.Size.Y + 0.001, lArm.Size.Z + 0.001)
- hit0.CanCollide = false
- weldd = Instance.new("Weld",hit0)
- weldd.Part0 = lArm
- weldd.Part1 = hit0
- local hit1 = Instance.new("Part", char)
- hit1.Name = "DamagePart"
- hit1.BrickColor = BrickColor.new("Bright red")
- hit1.Material = "SmoothPlastic"
- hit1.Transparency = 1
- hit1.Size = Vector3.new(rArm.Size.X + 0.001, rArm.Size.Y + 0.001, rArm.Size.Z + 0.001)
- hit1.CanCollide = false
- welddd = Instance.new("Weld",hit1)
- welddd.Part0 = rArm
- welddd.Part1 = hit1
- lS = Instance.new("Motor", torso)
- lS.Name = "Left Shoulder"
- lS.Part0 = lArm
- lS.Part1 = torso
- lS.C0 = CFrame.new(-0.325, 0.643, 0) * CFrame.Angles(0, 0, 0)
- lS.C1 = CFrame.new(0.65, 0.643, 0)
- rS = Instance.new("Motor", torso)
- rS.Name = "Right Shoulder"
- rS.Part0 = rArm
- rS.Part1 = torso
- rS.C0 = CFrame.new(-0.325, 0.643, 0) * CFrame.Angles(0, 0, 0)
- rS.C1 = CFrame.new(-0.65, 0.643, 0) * CFrame.Angles(0, -math.rad(180), 0)
- char.Humanoid:ClearAllChildren()
- --char.Animate:Remove()
- for _,cM in pairs(char:GetChildren()) do
- if cM.ClassName == "CharacterMesh" then cM:Destroy() end
- end
- Instance.new("BlockMesh", torso)
- Instance.new("BlockMesh", lLeg)
- Instance.new("BlockMesh", rLeg)
- blockmesharm = Instance.new("BlockMesh", lArm)
- blockmesharm.Offset = Vector3.new(0,0.332,0)
- blockmesharm2 = Instance.new("BlockMesh", rArm)
- blockmesharm2.Offset = Vector3.new(0,0.332,0)
- headdecal1 = Instance.new("Decal",head)
- headdecal1.Face = "Left"
- headdecal1.Texture = "http://www.roblox.com/asset/?id=36047323"
- headdecal2 = Instance.new("Decal",head)
- headdecal2.Face = "Bottom"
- headdecal2.Texture = "http://www.roblox.com/asset/?id=36047347"
- headdecal3 = Instance.new("Decal",head)
- headdecal3.Face = "Top"
- headdecal3.Texture = "http://www.roblox.com/asset/?id=36047341"
- headdecal4 = Instance.new("Decal",head)
- headdecal4.Face = "Back"
- headdecal4.Texture = "http://www.roblox.com/asset/?id=36047330"
- headdecal5 = Instance.new("Decal",head)
- headdecal5.Face = "Right"
- headdecal5.Texture = "http://www.roblox.com/asset/?id=36047315"
- end
- if headdecal6.Texture == "rbxassetid://295150002" then
- torso.Size = Vector3.new(1.3, 1.95, 0.65)
- lArm.Size = Vector3.new(0.58, 1.95, 0.65)
- rArm.Size = Vector3.new(0.58, 1.95, 0.65)
- lLeg.Size = Vector3.new(0.65, 1.95, 0.65)
- rLeg.Size = Vector3.new(0.65, 1.95, 0.65)
- --blockmesh1 = Instance.new("SpecialMesh", lArm)
- --blockmesh1.Scale = Vector3.new(-0.7,1,1)
- --blockmesh1.Offset = Vector3.new(-0.107, 0, 0)
- --blockmesh2 = Instance.new("SpecialMesh", rArm)
- --blockmesh2.Scale = Vector3.new(-0.7,1,1)
- --blockmesh2.Offset = Vector3.new(-0.107, 0, 0)
- char.Humanoid:ClearAllChildren()
- --char.Animate:Remove()
- char.Humanoid:ClearAllChildren()
- --char.Animate:Remove()
- for i,v in pairs(char:GetChildren()) do
- if v.ClassName == "Shirt" and v.ClassName == "Pants" then
- v:Destroy()
- v.Parent = nil
- end
- end
- wait(0.00)
- alexshirt = Instance.new("Shirt",char)
- alexshirt.ShirtTemplate = "rbxassetid://3977861054"
- alexpants = Instance.new("Pants",char)
- alexpants.PantsTemplate = "rbxassetid://2897639977"
- for _,cM in pairs(char:GetChildren()) do
- if cM.ClassName == "CharacterMesh" then cM:Destroy() end
- end
- lS = Instance.new("Motor", torso)
- lS.Name = "Left Shoulder"
- lS.Part0 = lArm
- lS.Part1 = torso
- lS.C0 = CFrame.new(-0.325, 0.975, 0) * CFrame.Angles(0, 0, 0)
- lS.C1 = CFrame.new(0.58, 0.975, 0)
- char:WaitForChild("Body Colors").HeadColor = BrickColor.new("Neon orange")
- head.BrickColor = BrickColor.new("Neon orange")
- head.Material = "SmoothPlastic"
- rS = Instance.new("Motor", torso)
- rS.Name = "Right Shoulder"
- rS.Part0 = rArm
- rS.Part1 = torso
- rS.C0 = CFrame.new(-0.325, 0.975, 0) * CFrame.Angles(0, 0, 0)
- diamondsword = Instance.new("Part",char)
- diamondsword.Name = "Diamond Sword"
- diamondsword.CanCollide = false
- diamondsword.Size = Vector3.new(2.72, 0.17, 2.72)
- diamondswordmesh = Instance.new("SpecialMesh",diamondsword)
- diamondswordmesh.MeshId = 'rbxassetid://3676810102'
- diamondswordmesh.Scale = Vector3.new(0.162, 0.162, 0.162)
- diamondswordmesh.TextureId = 'rbxassetid://3676810220'
- diamondswordweld = Instance.new("Weld",char)
- diamondswordweld.Name = 'SwordWeld'
- diamondswordweld.C0 = CFrame.new(0,-0.68,-1.2) * CFrame.Angles(-math.rad(45),-math.rad(0),-math.rad(-90))
- diamondswordweld.Part0 = lArm
- diamondswordweld.Part1 = diamondsword
- rS.C1 = CFrame.new(-0.58, 0.975, 0) * CFrame.Angles(0, -math.rad(180), 0)
- end
- for _,p in pairs(char:GetChildren()) do
- if p.ClassName == "Part" and p.Name ~= "DamagePart" and p.Name ~= "Diamond Sword" and p.Name ~= "HandItem" and p.Name ~= "HumanoidRootPart" and p.Name ~= "Left Arm" and p.Name ~= "Right Arm" then
- local hit = Instance.new("Part", char)
- hit.Name = "DamagePart"
- hit.BrickColor = BrickColor.new("Bright red")
- hit.Material = "SmoothPlastic"
- hit.Transparency = 1
- hit.Size = Vector3.new(p.Size.X + 0.001, p.Size.Y + 0.001, p.Size.Z + 0.001)
- hit.CanCollide = false
- weld = Instance.new("Weld",p)
- weld.Part0 = p
- weld.Part1 = hit
- end
- end
- coroutine.resume(coroutine.create(function()
- player = game.Players.LocalPlayer
- char = player.Character
- billnametag = Instance.new("BillboardGui",char.Head)
- billnametag.StudsOffset = Vector3.new(0,1.5,0)
- billnametag.ZIndexBehavior = "Global"
- billnametag.LightInfluence = 1
- billnametag.MaxDistance = math.huge
- billnametag.AlwaysOnTop = true
- frame = Instance.new("Frame",billnametag)
- frame.AnchorPoint = Vector2.new(0, 0)
- frame.Size = UDim2.new(1,0,1,0)
- frame.BackgroundTransparency = 1
- frame.BackgroundColor3 = Color3.new(0,0,0)
- frame.Position = UDim2.new(0,0,0,0)
- --billnametag.PlayerToHideFrom = player
- textlabel = Instance.new("TextLabel",frame)
- --textlabel.BorderSizePixel = 0
- textlabel.Font = "Arcade"
- textlabel.Size = UDim2.new(1,0,1,0)
- textlabel.Position = UDim2.new(0,1,0,1)
- textlabel.Text = player.Name
- textlabel.BackgroundColor3 = Color3.new(0,0,0)
- textlabel.TextColor3 = Color3.fromRGB(255,255,255)
- textlabel.BackgroundTransparency = 0.5
- textlabel.AnchorPoint = Vector2.new(0,0)
- --textlabel.ClipsDescendants = true
- --textlabel.TextScaled = true
- textlabel.TextSize = 20
- billnametag.Size = UDim2.new(textlabel.TextBounds.X/100, 0, 0.75, 0)
- frame.Size = UDim2.new(textlabel.TextBounds.X/100, 0, 0.75, 0)
- billnametag.SizeOffset = Vector2.new(-textlabel.TextBounds.X/200 + 0.5, 0)
- if player.Name == "noah878786" or player.Name == "noah878788" then
- textlabel.TextColor3 = Color3.fromRGB(255, 255, 0)
- end
- if player.Name == "guest712921" then
- textlabel.TextColor3 = Color3.fromRGB(255, 255, 0)
- textlabel.Text = textlabel.Text.. " (BETA TESTER!!!)"
- frame.Size = UDim2.new(textlabel.TextBounds.X/100, 0, 0.75, 0)
- billnametag.SizeOffset = Vector2.new(-textlabel.TextBounds.X/200 + 0.5, 0)
- while true do
- i = 0
- for n=1,0,-0.05 do
- i = i + 0.05
- textlabel.TextColor3 = Color3.new(i, 0, n)
- wait()
- end
- i = 0
- for n=1,0,-0.05 do
- i = i + 0.05
- textlabel.TextColor3 = Color3.new(n, i, 0)
- wait()
- end
- i = 0
- for n=1,0,-0.05 do
- i = i + 0.05
- textlabel.TextColor3 = Color3.new(0, n, i)
- wait()
- end
- end
- end
- wait()
- textlabel.TextScaled = true
- textlabel.TextSize = 8
- end))
- -- now for the real stuff
- -- |
- -- |
- -- V
- local Mouse = player:GetMouse()
- --[[local cameraHand = Instance.new("Part", camera)
- cameraHand.Size = Vector3.new(0.65, 1.95, 0.65)
- cameraHand.CanCollide = false
- cameraHand.Anchored = true
- cameraHand.Name = "CameraHand"
- local cameraHandWeld = Instance.new("Motor6D", camPart)
- cameraHandWeld.Part0 = camPart
- cameraHandWeld.Part1 = cameraHand
- cameraHandWeld.C0 = CFrame.new(5, 0, 0)
- ]]--
- local humanoid = char:WaitForChild("Humanoid")
- -- Heart bar
- local hpFrame = makeSquare(UDim2.new(0.5, -166, 1, -130), UDim2.new(0, 162, 0, 18),
- Color3.new(0/255, 0/255, 0/255), 1, gui, 1)
- local hearts = makeSquare(UDim2.new(0, 0, 0, 0), UDim2.new(0, 162, 0, 18),
- Color3.new(0/255, 0/255, 0/255), 1, hpFrame, 1)
- hearts.ClipsDescendants = true
- for i = 1, 10 do
- local heartImg = makeImage(UDim2.new(0, (i-1)*16, 0, 0), UDim2.new(0, 18, 0, 18),
- "rbxassetid://1494233443", hearts, 2)
- makeSquare(UDim2.new(0, 4, 0, 4), UDim2.new(0, 2, 0, 2),
- Color3.new(255/255, 200/255, 200/255), 0, heartImg, 2)
- heartImg.ImageColor3 = Color3.new(240/255, 0, 0)
- local emptyHeart = makeImage(UDim2.new(0, (i-1)*16, 0, 0), UDim2.new(0, 18, 0, 18),
- "rbxassetid://1494233443", hpFrame, 1)
- emptyHeart.ImageColor3 = Color3.new(0.3, 0.3, 0.3)
- local outline = makeImage(UDim2.new(0, 0, 0, 0), UDim2.new(0, 18, 0, 18),
- "rbxassetid://1494176679", emptyHeart, 1)
- outline.ImageColor3 = Color3.new(0, 0, 0)
- local oldHP = humanoid.Health/humanoid.MaxHealth --SnapToGrid((humanoid.Health/humanoid.MaxHealth)*162, 8)
- humanoid.Changed:connect(function()
- local hp = humanoid.Health/humanoid.MaxHealth --SnapToGrid((humanoid.Health/humanoid.MaxHealth)*162, 8)
- if SnapToGrid(oldHP*162, 8) < SnapToGrid(hp*162, 8) then
- outline.ImageColor3 = Color3.new(1, 1, 1)
- wait(0.1)
- outline.ImageColor3 = Color3.new(0, 0, 0)
- wait(0.1)
- end
- if oldHP > hp then
- for i = 1, 2 do
- outline.ImageColor3 = Color3.new(1, 1, 1)
- wait(0.1)
- outline.ImageColor3 = Color3.new(0, 0, 0)
- wait(0.1)
- end
- end
- oldHP = hp
- end)
- coroutine.resume(coroutine.create(function()
- local yIncrease = 0
- local originalY = emptyHeart.Position.Y.Offset
- while wait() do
- if humanoid.Health/humanoid.MaxHealth <= 0.27 then
- if yIncrease <= 0 then
- yIncrease = math.random(1, 2)
- else
- yIncrease = yIncrease - 1
- end
- heartImg.Position = UDim2.new(0, heartImg.Position.X.Offset, 0, -yIncrease)
- emptyHeart.Position = UDim2.new(0, emptyHeart.Position.X.Offset, 0, -yIncrease)
- else
- if yIncrease >= 1 then
- yIncrease = yIncrease - 1
- heartImg.Position = UDim2.new(0, heartImg.Position.X.Offset, 0, -yIncrease)
- emptyHeart.Position = UDim2.new(0, emptyHeart.Position.X.Offset, 0, -yIncrease)
- end
- end
- end
- end))
- end
- humanoid.BreakJointsOnDeath = false
- humanoid.HipHeight = 0.3
- local rootJoint = Instance.new("Motor6D", torso)
- rootJoint.Name = "RootJoint"
- rootJoint.Part0 = humRootPart
- rootJoint.Part1 = torso
- rootJoint.C1 = CFrame.new(0, 0.05, 0)
- remoteevent = Instance.new("RemoteEvent",char)
- remoteevent.Name = "SteveFunction"
- local neck = torso:WaitForChild("Neck")
- neck.Name = "Neck"
- neck.Part0 = head
- neck.Part1 = torso
- remoteevent.OnServerEvent:Connect(function(plr,a,b)
- necka = plr.Character.Torso.Neck
- necka.C0 = a
- necka.C1 = b
- end)
- NLS([[
- -- NOTE (READ!!): This script doesn't work on voidacity's script builder
- -- since it crashes your game, but it's usable on other
- -- script builders like fancy dev's or nexure's.
- -- (it just doesn't work on voidacity only)
- -- Scroll down for changelog...
- -- ORIGINAL CREATOR: Depr1
- -- If this script isn't on pastebin or the user who uploaded this isn't called "Delros12"
- -- (and yes my pastebin account is Delros12) or the link is not https://pastebin.com/2NNDTLjL
- -- then this is not the original link of this script.
- -- The original link of the script gets edited constantly for updates, if you use the original
- -- link you will be able to enjoy the most recent updates of this script without changing to
- -- another link which contains updated script.
- -- Controls: Q to sneak, use the keypad numbers 1-9 to change blocks,
- -- choose a empty slot if you want to remove a block, E to open creative
- -- inventory, right-click to destroy a block in your toolbar in creative
- -- inventory, R to make camera face your character's front or back.
- -- You will become steve when you use this script, if you die after
- -- using this script, keep trying to use it or wait 60 seconds
- -- (it doesn't work at first but eventually it will)
- -- Enjoy! :)
- local updateHand = false
- workspace:WaitForChild("Camera"):ClearAllChildren()
- local RS = game:GetService("RunService").RenderStepped
- local targetName = game.Players.LocalPlayer.Name
- local player = owner
- function putTexture(part, frontF, backF, topF, bottomF, leftF, rightF, className)
- local faces = {"Front", "Back", "Top", "Bottom", "Left", "Right"}
- for i,f in pairs(faces) do
- local decal = Instance.new(className, part)
- if i == 1 then decal.Texture = frontF decal.Name = f end
- if i == 2 then decal.Texture = backF or frontF decal.Name = f end
- if i == 3 then decal.Texture = topF or frontF decal.Name = f end
- if i == 4 then decal.Texture = bottomF or frontF decal.Name = f end
- if i == 5 then decal.Texture = leftF or frontF decal.Name = f end
- if i == 6 then decal.Texture = rightF or frontF decal.Name = f end
- decal.Face = f
- end
- return part
- end
- function makeSquare(position, size, color, transparency, parent, zindex)
- local label = Instance.new("TextLabel", parent)
- label.Text = ""
- label.BorderSizePixel = 0
- label.BackgroundTransparency = transparency
- label.Position = position
- label.Size = size
- label.BackgroundColor3 = color
- if zindex == nil then label.ZIndex = 1 else label.ZIndex = zindex end
- return label
- end
- function makeImage(position, size, image, parent, zindex)
- local imglabel = Instance.new("ImageLabel", parent)
- imglabel.BorderSizePixel = 0
- imglabel.BackgroundTransparency = 1
- imglabel.Position = position
- imglabel.Size = size
- imglabel.Image = image
- if zindex == nil then imglabel.ZIndex = 1 else imglabel.ZIndex = zindex end
- return imglabel
- end
- function putInventorySlot(position, image, parent, zindex)
- local button = Instance.new("TextButton", parent)
- button.Position = position
- button.Size = UDim2.new(0, 36, 0, 36)
- button.BackgroundColor3 = Color3.new(139/255, 139/255, 139/255)
- button.Text = ""
- button.BorderSizePixel = 0
- button.ZIndex = zindex
- local imageLabel = Instance.new("ImageLabel", button)
- imageLabel.BackgroundTransparency = 0.9
- imageLabel.Position = UDim2.new(0, 2, 0, 2)
- imageLabel.Size = UDim2.new(0, 32, 0, 32)
- imageLabel.Image = image
- imageLabel.BorderSizePixel = 0
- imageLabel.ZIndex = zindex
- makeSquare(UDim2.new(0, 0, 0, 0), UDim2.new(0, 34, 0, 2),
- Color3.new(55/255, 55/255, 55/255), 0, button, zindex)
- makeSquare(UDim2.new(0, 0, 0, 0), UDim2.new(0, 2, 0, 34),
- Color3.new(55/255, 55/255, 55/255), 0, button, zindex)
- makeSquare(UDim2.new(0, 34, 0, 2), UDim2.new(0, 2, 0, 34),
- Color3.new(255/255, 255/255, 255/255), 0, button, zindex)
- makeSquare(UDim2.new(0, 2, 0, 34), UDim2.new(0, 34, 0, 2),
- Color3.new(255/255, 255/255, 255/255), 0, button, zindex)
- return button
- end
- function AngleDifference(Angle1, Angle2)
- local Difference = {X = 0, Y = 0, Z = 0}
- Difference.X = Angle2.X - Angle1.X
- if (Difference.X > 180) then
- Difference.X = Difference.X - 360
- elseif (Difference.X < -180) then
- Difference.X = Difference.X + 360
- end
- Difference.Y = Angle2.Y - Angle1.Y
- if (Difference.Y > 180) then
- Difference.Y = Difference.Y - 360
- elseif (Difference.Y < -180) then
- Difference.Y = Difference.Y + 360
- end
- Difference.Z = Angle2.Z - Angle1.Z
- if (Difference.Z > 180) then
- Difference.Z = Difference.Z - 360
- elseif (Difference.Z < -180) then
- Difference.Z = Difference.Z + 360
- end
- return Vector3.new(Difference.X, Difference.Y, Difference.Z)
- end
- local creativeInventory = {
- {
- name = "Dirt",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://152569532",
- backTex = "rbxassetid://152569532",
- topTex = "rbxassetid://152569532",
- bottomTex = "rbxassetid://152569532",
- leftTex = "rbxassetid://152569532",
- rightTex = "rbxassetid://152569532",
- displayTex = "",
- sound = "rbxassetid://1102186681",
- soundVol = 1.25,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Grass",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://96430337",
- backTex = "rbxassetid://96430337",
- topTex = "rbxassetid://96430265",
- bottomTex = "rbxassetid://179655033",
- leftTex = "rbxassetid://96430337",
- rightTex = "rbxassetid://96430337",
- displayTex = "",
- sound = "rbxassetid://1102186681",
- soundVol = 1.25,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Sand",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://347007448",
- backTex = "rbxassetid://347007448",
- topTex = "rbxassetid://347007448",
- bottomTex = "rbxassetid://347007448",
- leftTex = "rbxassetid://347007448",
- rightTex = "rbxassetid://347007448",
- displayTex = "",
- sound = "rbxassetid://1102186681",
- soundVol = 1.25,
- hasGravity = true,
- objectType = "Block"
- },
- {
- name = "Gravel",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://151701568",
- backTex = "rbxassetid://151701568",
- topTex = "rbxassetid://151701568",
- bottomTex = "rbxassetid://151701568",
- leftTex = "rbxassetid://151701568",
- rightTex = "rbxassetid://151701568",
- displayTex = "",
- sound = "rbxassetid://1102186681",
- soundVol = 1.25,
- hasGravity = true,
- objectType = "Block"
- },
- {
- name = "Stone",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://75880927",
- backTex = "rbxassetid://75880927",
- topTex = "rbxassetid://75880927",
- bottomTex = "rbxassetid://75880927",
- leftTex = "rbxassetid://75880927",
- rightTex = "rbxassetid://75880927",
- displayTex = "",
- sound = "rbxassetid://1016978163",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Diamond Ore",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://57928490",
- backTex = "rbxassetid://57928490",
- topTex = "rbxassetid://57928490",
- bottomTex = "rbxassetid://57928490",
- leftTex = "rbxassetid://57928490",
- rightTex = "rbxassetid://57928490",
- displayTex = "",
- sound = "rbxassetid://1016978163",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Diamond Block",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://56749955",
- backTex = "rbxassetid://56749955",
- topTex = "rbxassetid://56749955",
- bottomTex = "rbxassetid://56749955",
- leftTex = "rbxassetid://56749955",
- rightTex = "rbxassetid://56749955",
- displayTex = "",
- sound = "rbxassetid://1016978163",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Emerald Block",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://152410853",
- backTex = "rbxassetid://152410853",
- topTex = "rbxassetid://152410853",
- bottomTex = "rbxassetid://152410853",
- leftTex = "rbxassetid://152410853",
- rightTex = "rbxassetid://152410853",
- displayTex = "",
- sound = "rbxassetid://1016978163",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Emerald Ore",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://152410868",
- backTex = "rbxassetid://152410868",
- topTex = "rbxassetid://152410868",
- bottomTex = "rbxassetid://152410868",
- leftTex = "rbxassetid://152410868",
- rightTex = "rbxassetid://152410868",
- displayTex = "",
- sound = "rbxassetid://1016978163",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Obsidian",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://112560322",
- backTex = "rbxassetid://112560322",
- topTex = "rbxassetid://112560322",
- bottomTex = "rbxassetid://112560322",
- leftTex = "rbxassetid://112560322",
- rightTex = "rbxassetid://112560322",
- displayTex = "",
- sound = "rbxassetid://1016978163",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Gold Block",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://152572128",
- backTex = "rbxassetid://152572128",
- topTex = "rbxassetid://152572128",
- bottomTex = "rbxassetid://152572128",
- leftTex = "rbxassetid://152572128",
- rightTex = "rbxassetid://152572128",
- displayTex = "",
- sound = "rbxassetid://1016978163",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Gold Ore",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://152572121",
- backTex = "rbxassetid://152572121",
- topTex = "rbxassetid://152572121",
- bottomTex = "rbxassetid://152572121",
- leftTex = "rbxassetid://152572121",
- rightTex = "rbxassetid://152572121",
- displayTex = "",
- sound = "rbxassetid://1016978163",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Iron Block",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://152572134",
- backTex = "rbxassetid://152572134",
- topTex = "rbxassetid://152572134",
- bottomTex = "rbxassetid://152572134",
- leftTex = "rbxassetid://152572134",
- rightTex = "rbxassetid://152572134",
- displayTex = "",
- sound = "rbxassetid://1016978163",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Iron Ore",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://132879562",
- backTex = "rbxassetid://132879562",
- topTex = "rbxassetid://132879562",
- bottomTex = "rbxassetid://132879562",
- leftTex = "rbxassetid://132879562",
- rightTex = "rbxassetid://132879562",
- displayTex = "",
- sound = "rbxassetid://1016978163",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Redstone Block",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://136260219",
- backTex = "rbxassetid://136260219",
- topTex = "rbxassetid://136260219",
- bottomTex = "rbxassetid://136260219",
- leftTex = "rbxassetid://136260219",
- rightTex = "rbxassetid://136260219",
- sound = "rbxassetid://1016978163",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "TNT",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://48005067",
- backTex = "rbxassetid://48005067",
- topTex = "rbxassetid://48005073",
- bottomTex = "rbxassetid://48005064",
- leftTex = "rbxassetid://48005067",
- rightTex = "rbxassetid://48005067",
- displayTex = "",
- sound = "rbxassetid://1102186681",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Coal Block",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://152527418",
- backTex = "rbxassetid://152527418",
- topTex = "rbxassetid://152527418",
- bottomTex = "rbxassetid://152527418",
- leftTex = "rbxassetid://152527418",
- rightTex = "rbxassetid://152527418",
- displayTex = "",
- sound = "rbxassetid://1016978163",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Coal Ore",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://152572101",
- backTex = "rbxassetid://152572101",
- topTex = "rbxassetid://152572101",
- bottomTex = "rbxassetid://152572101",
- leftTex = "rbxassetid://152572101",
- rightTex = "rbxassetid://152572101",
- displayTex = "",
- sound = "rbxassetid://1016978163",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Bedrock",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://75881126",
- backTex = "rbxassetid://75881126",
- topTex = "rbxassetid://75881126",
- bottomTex = "rbxassetid://75881126",
- leftTex = "rbxassetid://75881126",
- rightTex = "rbxassetid://75881126",
- displayTex = "",
- sound = "rbxassetid://1016978163",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Cobblestone",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://152572105",
- backTex = "rbxassetid://152572105",
- topTex = "rbxassetid://152572105",
- bottomTex = "rbxassetid://152572105",
- leftTex = "rbxassetid://152572105",
- rightTex = "rbxassetid://152572105",
- displayTex = "",
- sound = "rbxassetid://1016978163",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Mossy Stone Brick",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://61826751",
- backTex = "rbxassetid://61826751",
- topTex = "rbxassetid://61826751",
- bottomTex = "rbxassetid://61826751",
- leftTex = "rbxassetid://61826751",
- rightTex = "rbxassetid://61826751",
- displayTex = "",
- sound = "rbxassetid://1016978163",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Cracked Stone Brick",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://151802087",
- backTex = "rbxassetid://151802087",
- topTex = "rbxassetid://151802087",
- bottomTex = "rbxassetid://151802087",
- leftTex = "rbxassetid://151802087",
- rightTex = "rbxassetid://151802087",
- displayTex = "",
- sound = "rbxassetid://1016978163",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Chiseled Stone Brick",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://151802074",
- backTex = "rbxassetid://151802074",
- topTex = "rbxassetid://151802074",
- bottomTex = "rbxassetid://151802074",
- leftTex = "rbxassetid://151802074",
- rightTex = "rbxassetid://151802074",
- displayTex = "",
- sound = "rbxassetid://1016978163",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Stone Brick",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://61826773",
- backTex = "rbxassetid://61826773",
- topTex = "rbxassetid://61826773",
- bottomTex = "rbxassetid://61826773",
- leftTex = "rbxassetid://61826773",
- rightTex = "rbxassetid://61826773",
- displayTex = "",
- sound = "rbxassetid://1016978163",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Nether Brick",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://151802104",
- backTex = "rbxassetid://151802104",
- topTex = "rbxassetid://151802104",
- bottomTex = "rbxassetid://151802104",
- leftTex = "rbxassetid://151802104",
- rightTex = "rbxassetid://151802104",
- displayTex = "",
- sound = "rbxassetid://1016978163",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Granite",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://151776467",
- backTex = "rbxassetid://151776467",
- topTex = "rbxassetid://151776467",
- bottomTex = "rbxassetid://151776467",
- leftTex = "rbxassetid://151776467",
- rightTex = "rbxassetid://151776467",
- displayTex = "",
- sound = "rbxassetid://1016978163",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Diorite",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://151776452",
- backTex = "rbxassetid://151776452",
- topTex = "rbxassetid://151776452",
- bottomTex = "rbxassetid://151776452",
- leftTex = "rbxassetid://151776452",
- rightTex = "rbxassetid://151776452",
- sound = "rbxassetid://1016978163",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Andesite",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://151776422",
- backTex = "rbxassetid://151776422",
- topTex = "rbxassetid://151776422",
- bottomTex = "rbxassetid://151776422",
- leftTex = "rbxassetid://151776422",
- rightTex = "rbxassetid://151776422",
- displayTex = "",
- sound = "rbxassetid://1016978163",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Polished Granite",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://151776506",
- backTex = "rbxassetid://151776506",
- topTex = "rbxassetid://151776506",
- bottomTex = "rbxassetid://151776506",
- leftTex = "rbxassetid://151776506",
- rightTex = "rbxassetid://151776506",
- displayTex = "",
- sound = "rbxassetid://1016978163",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Polished Diorite",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://151776533",
- backTex = "rbxassetid://151776533",
- topTex = "rbxassetid://151776533",
- bottomTex = "rbxassetid://151776533",
- leftTex = "rbxassetid://151776533",
- rightTex = "rbxassetid://151776533",
- displayTex = "",
- sound = "rbxassetid://1016978163",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Polished Andesite",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://151776506",
- backTex = "rbxassetid://151776506",
- topTex = "rbxassetid://151776506",
- bottomTex = "rbxassetid://151776506",
- leftTex = "rbxassetid://151776506",
- rightTex = "rbxassetid://151776506",
- displayTex = "",
- sound = "rbxassetid://1016978163",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Brick Block",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://59389191",
- backTex = "rbxassetid://59389191",
- topTex = "rbxassetid://59389191",
- bottomTex = "rbxassetid://59389191",
- leftTex = "rbxassetid://59389191",
- rightTex = "rbxassetid://59389191",
- displayTex = "",
- sound = "rbxassetid://1016978163",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Packed Ice",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://152528023",
- backTex = "rbxassetid://152528023",
- topTex = "rbxassetid://152528023",
- bottomTex = "rbxassetid://152528023",
- leftTex = "rbxassetid://152528023",
- rightTex = "rbxassetid://152528023",
- displayTex = "",
- sound = "rbxassetid://1016978163",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Ice Block",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 1;
- frontTex = "rbxassetid://118555586",
- backTex = "rbxassetid://118555586",
- topTex = "rbxassetid://118555586",
- bottomTex = "rbxassetid://118555586",
- leftTex = "rbxassetid://118555586",
- rightTex = "rbxassetid://118555586",
- displayTex = "",
- sound = "rbxassetid://1016978163",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Netherrack",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://151802119",
- backTex = "rbxassetid://151802119",
- topTex = "rbxassetid://151802119",
- bottomTex = "rbxassetid://151802119",
- leftTex = "rbxassetid://151802119",
- rightTex = "rbxassetid://151802119",
- displayTex = "",
- sound = "rbxassetid://1016978163",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "End Stone",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://151802091",
- backTex = "rbxassetid://151802091",
- topTex = "rbxassetid://151802091",
- bottomTex = "rbxassetid://151802091",
- leftTex = "rbxassetid://151802091",
- rightTex = "rbxassetid://151802091",
- displayTex = "",
- sound = "rbxassetid://1016978163",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Glass Block",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 1;
- frontTex = "rbxassetid://152239003",
- backTex = "rbxassetid://152239003",
- topTex = "rbxassetid://152239003",
- bottomTex = "rbxassetid://152239003",
- leftTex = "rbxassetid://152239003",
- rightTex = "rbxassetid://152239003",
- displayTex = "",
- sound = "rbxassetid://1016978163",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Glowstone",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://54790811",
- backTex = "rbxassetid://54790811",
- topTex = "rbxassetid://54790811",
- bottomTex = "rbxassetid://54790811",
- leftTex = "rbxassetid://54790811",
- rightTex = "rbxassetid://54790811",
- displayTex = "",
- sound = "rbxassetid://1016978163",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Bookshelf",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://118554092",
- backTex = "rbxassetid://118554092",
- topTex = "rbxassetid://346201871",
- bottomTex = "rbxassetid://346201871",
- leftTex = "rbxassetid://118554092",
- rightTex = "rbxassetid://118554092",
- displayTex = "",
- sound = "rbxassetid://507863457",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Oak Wood Planks",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://346201871",
- backTex = "rbxassetid://346201871",
- topTex = "rbxassetid://346201871",
- bottomTex = "rbxassetid://346201871",
- leftTex = "rbxassetid://346201871",
- rightTex = "rbxassetid://346201871",
- displayTex = "",
- sound = "rbxassetid://507863457",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Oak Log",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://71445924",
- backTex = "rbxassetid://71445924",
- topTex = "rbxassetid://152538557",
- bottomTex = "rbxassetid://152538557",
- leftTex = "rbxassetid://71445924",
- rightTex = "rbxassetid://71445924",
- displayTex = "",
- sound = "rbxassetid://507863457",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Oak Leaves",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 1;
- frontTex = "rbxassetid://151708391",
- backTex = "rbxassetid://151708391",
- topTex = "rbxassetid://151708391",
- bottomTex = "rbxassetid://151708391",
- leftTex = "rbxassetid://151708391",
- rightTex = "rbxassetid://151708391",
- displayTex = "",
- sound = "rbxassetid://507863457",
- -- couldn't find a leaves sound for this one, sorry lol
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- }
- }
- local toolBar = {
- {
- name = "Dirt Block",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://152569532",
- backTex = "rbxassetid://152569532",
- topTex = "rbxassetid://152569532",
- bottomTex = "rbxassetid://152569532",
- leftTex = "rbxassetid://152569532",
- rightTex = "rbxassetid://152569532",
- displayTex = "",
- sound = "rbxassetid://1102186681",
- soundVol = 1.25,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Grass Block",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://96430337",
- backTex = "rbxassetid://96430337",
- topTex = "rbxassetid://96430265",
- bottomTex = "rbxassetid://179655033",
- leftTex = "rbxassetid://96430337",
- rightTex = "rbxassetid://96430337",
- displayTex = "",
- sound = "rbxassetid://1102186681",
- soundVol = 1.25,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Stone",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://75880927",
- backTex = "rbxassetid://75880927",
- topTex = "rbxassetid://75880927",
- bottomTex = "rbxassetid://75880927",
- leftTex = "rbxassetid://75880927",
- rightTex = "rbxassetid://75880927",
- displayTex = "",
- sound = "rbxassetid://1016978163",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Diamond Ore",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://152572119",
- backTex = "rbxassetid://152572119",
- topTex = "rbxassetid://152572119",
- bottomTex = "rbxassetid://152572119",
- leftTex = "rbxassetid://152572119",
- rightTex = "rbxassetid://152572119",
- displayTex = "",
- sound = "rbxassetid://1016978163",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Diamond Block",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://56749955",
- backTex = "rbxassetid://56749955",
- topTex = "rbxassetid://56749955",
- bottomTex = "rbxassetid://56749955",
- leftTex = "rbxassetid://56749955",
- rightTex = "rbxassetid://56749955",
- displayTex = "",
- sound = "rbxassetid://1016978163",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Oak Wood Planks",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://346201871",
- backTex = "rbxassetid://346201871",
- topTex = "rbxassetid://346201871",
- bottomTex = "rbxassetid://346201871",
- leftTex = "rbxassetid://346201871",
- rightTex = "rbxassetid://346201871",
- displayTex = "",
- sound = "rbxassetid://507863457",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- },
- {
- name = "Oak Log",
- size = Vector3.new(2.6, 2.6, 2.6),
- transparency = 0;
- frontTex = "rbxassetid://71445924",
- backTex = "rbxassetid://71445924",
- topTex = "rbxassetid://152538557",
- bottomTex = "rbxassetid://152538557",
- leftTex = "rbxassetid://71445924",
- rightTex = "rbxassetid://71445924",
- displayTex = "",
- sound = "rbxassetid://507863457",
- soundVol = 2,
- hasGravity = false,
- objectType = "Block"
- }
- }
- local draggingBlock = nil
- function divide(x, d)
- if x ~= 0 and d ~= 0 then
- return x/d
- else
- return x
- end
- end -- so it doesn't divide by zero
- function getDistance(v1, v2)
- return math.abs((Vector3.new(math.abs(v2.X - v1.X), math.abs(v2.Y - v1.Y), math.abs(v2.Z - v1.Z))).Magnitude)
- end
- function SnapToGrid(x, gridX)
- local x = math.floor((x / gridX) + 0.5) * gridX
- return x
- end
- function round(x)
- if x%2 ~= 0.5 then
- return math.floor(x+0.5)
- end
- return x-0.5
- end
- function weldTo(part1, part2)
- local weld = Instance.new("Weld", part1)
- weld.Part0 = part1
- weld.Part1 = part2
- return weld
- end
- function getMagnitudeXZ(velocity)
- return math.sqrt(math.abs(velocity.X)^2 + math.abs(velocity.Z)^2)
- end
- function findHumanoid(inst)
- local find = inst
- local hum = nil
- repeat
- if find.Name == "Workspace" then return nil end
- find = find.Parent
- hum = find:FindFirstChild("Humanoid")
- until hum
- --if hum then print("found!!") else print("aw... not found") end
- --if hum.ClassName ~= "Humanoid" then hum = nil end
- return hum
- end
- function getSideByLocation(loc)
- local side = nil
- if loc.X < 0 then side = "Left" end
- if loc.X > 0 then side = "Right" end
- if loc.Y > 0 then side = "Top" end
- if loc.Y < 0 then side = "Bottom" end
- if loc.Z < 0 then side = "Front" end
- if loc.Z > 0 then side = "Back" end
- if (math.abs(loc.X) > 0 and math.abs(loc.Y) > 0) or
- (math.abs(loc.X) > 0 and math.abs(loc.Z) > 0) or
- (math.abs(loc.Y) > 0 and math.abs(loc.Z) > 0)
- then
- return nil
- end
- return side
- end
- function getSideByLocationRedstone(loc)
- local side = nil
- if loc.X < 0 then side = "Left" end
- if loc.X > 0 then side = "Right" end
- if loc.Y > 0 then side = "Top" end
- if loc.Y < 0 then side = "Bottom" end
- if loc.Z < 0 then side = "Front" end
- if loc.Z > 0 then side = "Back" end
- if (math.abs(loc.X) > 0 and math.abs(loc.Y) > 0) or
- (math.abs(loc.X) > 0 and math.abs(loc.Z) > 0) or
- (math.abs(loc.Y) > 0 and math.abs(loc.Z) > 0)
- then
- return nil
- end
- return side
- end
- function getBlockAtRegion(region)
- local blockFound = nil
- for _,part in pairs(game.Workspace:FindPartsInRegion3(region, nil, math.huge)) do
- local usePart = true
- if part.Name == "Debris" then usePart = false end
- if usePart == true then
- blockFound = part
- break
- end
- end
- return blockFound
- end
- function getRedstoneAtRegion(region)
- local blockFound = nil
- for _,part in pairs(game.Workspace:FindPartsInRegion3(region, nil, math.huge)) do
- if isRedstone(part) then
- blockFound = part
- break
- end
- end
- return blockFound
- end
- function isRedstone(block)
- local objType = block:FindFirstChild("ObjectType")
- if objType then
- if objType.Value == "Redstone Dust" then
- return true
- else
- return false
- end
- end
- end
- function updateRedstoneDust(dust, leftBlk, rightBlk, topBlk, bottomBlk, frontBlk, backBlk, recursion)
- local objType = nil
- if dust then
- objType = dust:FindFirstChild("ObjectType")
- end
- local redstoneDust = "rbxassetid://151911305"
- local redstoneLine = "rbxassetid://151907047"
- local redstoneCorner = "rbxassetid://151907106"
- local redstoneT = "rbxassetid://151907156"
- local redstoneCross = "rbxassetid://151906997"
- local Rotation = 0
- local theresRedstoneAtLeft = false
- local theresRedstoneAtRight = false
- local theresRedstoneAtFront = false
- local theresRedstoneAtBack = false
- if leftBlk then theresRedstoneAtLeft = isRedstone(leftBlk) end
- if rightBlk then theresRedstoneAtRight = isRedstone(rightBlk) end
- if frontBlk then theresRedstoneAtFront = isRedstone(frontBlk) end
- if backBlk then theresRedstoneAtBack = isRedstone(backBlk) end
- if objType then
- if objType.Value == "Redstone Dust" then
- local topDecal = dust:FindFirstChild("Top")
- if topDecal then
- if theresRedstoneAtBack == false and theresRedstoneAtFront == false and
- theresRedstoneAtLeft == false and theresRedstoneAtRight == false then
- topDecal.Texture = redstoneDust
- Rotation = 0
- end
- if theresRedstoneAtLeft == true or theresRedstoneAtRight == true then
- topDecal.Texture = redstoneLine
- Rotation = 0
- end
- if theresRedstoneAtFront == true or theresRedstoneAtBack == true then
- topDecal.Texture = redstoneLine
- Rotation = 90
- end
- if theresRedstoneAtLeft == true and theresRedstoneAtBack == true then
- topDecal.Texture = redstoneCorner
- Rotation = 0
- end
- if theresRedstoneAtBack == true and theresRedstoneAtRight == true then
- topDecal.Texture = redstoneCorner
- Rotation = 90
- end
- if theresRedstoneAtRight == true and theresRedstoneAtFront == true then
- topDecal.Texture = redstoneCorner
- Rotation = 180
- end
- if theresRedstoneAtFront == true and theresRedstoneAtLeft == true then
- topDecal.Texture = redstoneCorner
- Rotation = -90
- end
- if theresRedstoneAtBack == true and theresRedstoneAtLeft == true
- and theresRedstoneAtFront == true then
- topDecal.Texture = redstoneT
- Rotation = -90
- end
- if theresRedstoneAtLeft == true and theresRedstoneAtFront == true
- and theresRedstoneAtRight == true then
- topDecal.Texture = redstoneT
- Rotation = -180
- end
- if theresRedstoneAtFront == true and theresRedstoneAtRight == true
- and theresRedstoneAtBack == true then
- topDecal.Texture = redstoneT
- Rotation = 90
- end
- if theresRedstoneAtRight == true and theresRedstoneAtBack == true
- and theresRedstoneAtLeft == true then
- topDecal.Texture = redstoneT
- Rotation = 0
- end
- if theresRedstoneAtLeft == true and theresRedstoneAtRight == true and
- theresRedstoneAtFront == true and theresRedstoneAtBack == true then
- topDecal.Texture = redstoneCross
- Rotation = 0
- end
- end
- else
- error("Not redstone dust.")
- end
- end
- if recursion == true then
- local function updateTex(blockTarget)
- local leftSide = nil
- local rightSide = nil
- local frontSide = nil
- local backSide = nil
- local Point1 = blockTarget.CFrame.p - Vector3.new(2.6, 0.1, 2.6)
- local Point2 = blockTarget.CFrame.p + Vector3.new(2.6, 0.1, 2.6)
- local Region = Region3.new(Point1, Point2)
- for _,part in pairs(game.Workspace:FindPartsInRegion3(
- Region,
- nil,
- math.huge
- )) do
- local objType = part:FindFirstChild("ObjectType")
- if isRedstone(part) then
- local side = getSideByLocationRedstone(blockTarget.CFrame.p - part.CFrame.p)
- if side == "Left" then
- leftSide = part
- elseif side == "Right" then
- rightSide = part
- elseif side == "Front" then
- frontSide = part
- elseif side == "Back" then
- backSide = part
- elseif side == "Left Top" then
- leftSide = part
- elseif side == "Right Top" then
- rightSide = part
- elseif side == "Front Top" then
- frontSide = part
- elseif side == "Back Top" then
- backSide = part
- elseif side == "Left Bottom" then
- leftSide = part
- elseif side == "Right Bottom" then
- rightSide = part
- elseif side == "Front Bottom" then
- frontSide = part
- elseif side == "Back Bottom" then
- backSide = part
- end
- end
- end
- updateRedstoneDust(blockTarget, leftSide, rightSide, nil, nil, frontSide, backSide, false)
- end
- if leftBlk and theresRedstoneAtLeft then updateTex(leftBlk) end
- if rightBlk and theresRedstoneAtRight then updateTex(rightBlk) end
- if frontBlk and theresRedstoneAtFront then updateTex(frontBlk) end
- if backBlk and theresRedstoneAtBack then updateTex(backBlk) end
- end
- if dust then dust.CFrame = CFrame.new(dust.CFrame.p.X, dust.CFrame.p.Y, dust.CFrame.p.Z) * CFrame.Angles(0, math.rad(Rotation), 0) end
- end
- if player then
- local char = player.Character
- if char then
- for _,cM in pairs(char:GetChildren()) do
- if cM.ClassName == "CharacterMesh" then cM:Destroy() end
- end
- --[]
- local humRootPart = char:WaitForChild("HumanoidRootPart")
- local head = char:WaitForChild("Head")
- local torso = char:WaitForChild("Torso")
- local lArm = char:WaitForChild("Left Arm")
- local rArm = char:WaitForChild("Right Arm")
- local lLeg = char:WaitForChild("Left Leg")
- local rLeg = char:WaitForChild("Right Leg")
- local humanoid = char:WaitForChild("Humanoid")
- local camera = workspace.CurrentCamera
- local camPart = Instance.new("Part", camera)
- camPart.Name = "CamPart Local"
- camPart.Size = Vector3.new(0, 0, 0)
- camPart.CFrame = camera.CFrame
- camPart.CanCollide = false
- camPart.Anchored = true
- camPart.Transparency = 1
- local cameraHand = Instance.new("Part", camera)
- cameraHand.Size = Vector3.new(0.65, 1.95, 0.65)
- cameraHand.CanCollide = false
- cameraHand.Anchored = true
- cameraHand.Name = "CameraHand"
- putTexture(cameraHand, "rbxassetid://38934560", "rbxassetid://38934581",
- "rbxassetid://38934613", "rbxassetid://38934568",
- "rbxassetid://38934601", "rbxassetid://38934591", "Decal")
- local cameraHandItem = Instance.new("Part", camera)
- cameraHandItem.Name = "CameraHandItem"
- cameraHandItem.Size = Vector3.new(1.1, 1.1, 1.1)
- cameraHandItem.Anchored = true
- cameraHandItem.CanCollide = false
- cameraHandItem.Transparency = 1
- -- welding doesn't really work.
- --local cameraHandWeld = Instance.new("Motor6D", camPart)
- --cameraHandWeld.Part0 = camPart
- --cameraHandWeld.Part1 = cameraHand
- --cameraHandWeld.C0 = CFrame.new(5, 0, 0)
- wait(0.25)
- -- local billNameTag = Instance.new("BillboardGui", char)
- -- billNameTag.Size = UDim2.new(1, 0, 1, 0)
- -- billNameTag.Adornee = head
- -- billNameTag.PlayerToHideFrom = player
- --
- -- local textLabel = Instance.new("TextLabel", billNameTag)
- -- textLabel.Font = "Arcade"
- -- --textLabel.Size = UDim2.new(1, 0, 1, 0)
- -- textLabel.TextScaled = true
- -- --textLabel.TextSize = 100
- -- textLabel.Text = targetName
- -- textLabel.Size = UDim2.new(textLabel.TextBounds.X/100, 0, 0.75, 0)
- -- textLabel.BorderSizePixel = 0
- -- textLabel.BackgroundColor3 = Color3.new(0, 0, 0)
- -- textLabel.TextColor3 = Color3.new(1, 1, 1)
- -- textLabel.BackgroundTransparency = 0.5
- --
- -- if textLabel.Text == "Depr1" then
- -- textLabel.TextColor3 = Color3.new(1, 0.75, 0)
- -- end
- --
- -- billNameTag.SizeOffset = Vector2.new(-textLabel.TextBounds.X/200 + 0.5, 0)
- -- billNameTag.StudsOffset = Vector3.new(0, 1.5, 0)
- humanoid.Parent = char
- local ticks = 0
- local times = 0
- local walkAnim = 0
- local increaseWalkAnim = 1
- local idleAnimRotX = 0
- local idleAnimRotZ = 0
- local sneaking = 0
- --local RS = game:GetService("RunService").RenderStepped
- local Mouse = player:GetMouse()
- local oldHP = humanoid.Health
- local damageTime = 0
- local punchRotX = 0
- local punchRotY = 0
- local punchRotZ = 0
- local punchRotXcam = 0
- local punchRotYcam = 0
- local punchRotZcam = 0
- local punchSpeed = 0
- local punching = 0
- local selectedBlock = 8
- local punchEnded = 1
- local itemOnHand = nil
- local selectBox = Instance.new("SelectionBox", camera)
- selectBox.Transparency = 0.5
- selectBox.Color3 = Color3.new(0, 0, 0)
- selectBox.LineThickness = 0
- local sound = Instance.new("Sound", char)
- sound.Name = "Hurt"
- sound.Volume = 10
- sound.SoundId = "rbxassetid://535690488"
- local facesToResize = {"Front", "Back", "Left", "Right", "Bottom", "Top"}
- punchneeded = false
- local camCurrentZoom = (camera.CFrame.p - head.Position).magnitude
- Mouse.Button1Down:connect(function()
- punchneeded = true
- end)
- Mouse.Button1Up:connect(function()
- punchneeded = false
- end)
- Mouse.KeyDown:connect(function(key)
- if key == "b" then
- if punchEnded == 1 then punching = 1 end
- end
- end)
- local changedItem = false
- local hasItemOnHand = 0
- local hi = 0
- -- selection thingy
- --
- handitemthingy = char.HandItem
- local oldItemOnHand = itemOnHand
- function updateItemOnHand()
- for _,d in pairs(cameraHandItem:GetChildren()) do
- d:Destroy()
- end
- if handitemthingy ~= nil then
- putTexture(cameraHandItem, handitemthingy.Front, handitemthingy.Back,
- handitemthingy, handitemthingy.Bottom,
- handitemthingy.Left, handitemthingy.Right, "Texture")
- for _,f in pairs(facesToResize) do
- cameraHandItem:WaitForChild(f).StudsPerTileU = 1.1
- cameraHandItem:WaitForChild(f).StudsPerTileV = 1.1
- end
- cameraHand.Transparency = 1
- for _,f in pairs(facesToResize) do
- cameraHand:WaitForChild(f).Transparency = 1
- cameraHand:WaitForChild(f).Transparency = 1
- end
- else
- cameraHand.Transparency = 0
- for _,f in pairs(facesToResize) do
- cameraHand:WaitForChild(f).Transparency = 0
- cameraHand:WaitForChild(f).Transparency = 0
- end
- end
- if oldItemOnHand ~= itemOnHand then
- changedItem = true
- end
- end
- local pressedWTimes = 0
- local sprintingNum = 0
- local sprinting = false
- Mouse.KeyDown:connect(function(key)
- if sprinting == false then sprintingNum = 0 else sprintingNum = 1 end
- if (key == "w" and sprinting == false and sneaking == 0) then
- if pressedWTimes >= 1 or key == Enum.KeyCode.LeftControl then
- sprinting = true
- --humanoid.WalkSpeed = humanoid.WalkSpeed * 1.5
- pressedWTimes = 0
- coroutine.resume(coroutine.create(function()
- for i = 1, 24 do
- camera.FieldOfView = camera.FieldOfView + ((24-i)/10)
- RS:wait()
- end
- end))
- end
- pressedWTimes = pressedWTimes + 1
- coroutine.resume(coroutine.create(function()
- for i = 1, 9 do
- if sprinting == true then break end
- wait()
- end
- pressedWTimes = 0
- end))
- end
- if key == "e" then
- if selectedBlock == 8 then
- selectedBlock = -1
- end
- selectedBlock = selectedBlock + 1
- oldItemOnHand = itemOnHand
- itemOnHand = toolBar[selectedBlock + 2]
- coroutine.resume(coroutine.create(function()
- for _,d in pairs(cameraHandItem:GetChildren()) do
- d:Destroy()
- end
- if itemOnHand ~= nil then
- putTexture(cameraHandItem, itemOnHand.frontTex, itemOnHand.backTex,
- itemOnHand.topTex, itemOnHand.bottomTex,
- itemOnHand.leftTex, itemOnHand.rightTex, "Texture")
- for _,f in pairs(facesToResize) do
- cameraHandItem:WaitForChild(f).StudsPerTileU = 1.1
- cameraHandItem:WaitForChild(f).StudsPerTileV = 1.1
- end
- cameraHand.Transparency = 1
- for _,f in pairs(facesToResize) do
- cameraHand:WaitForChild(f).Transparency = 1
- cameraHand:WaitForChild(f).Transparency = 1
- end
- else
- cameraHand.Transparency = 0
- for _,f in pairs(facesToResize) do
- cameraHand:WaitForChild(f).Transparency = 0
- cameraHand:WaitForChild(f).Transparency = 0
- end
- end
- if oldItemOnHand ~= itemOnHand then
- changedItem = true
- end
- end))
- if hasItemOnHand == 0 and itemOnHand then hi = 1 end
- if hasItemOnHand == 1 and itemOnHand == nil then hi = 1 end
- selectLabel.Position = UDim2.new(0.5, -160 + ((selectedBlock)*40), 1, -105)
- end
- end)
- Mouse.KeyUp:connect(function(key)
- if sprinting == false then sprintingNum = 0 else sprintingNum = 1 end
- if (key == "w" and sprinting == true and sneaking == 0) then
- sprinting = false
- --humanoid.WalkSpeed = humanoid.WalkSpeed / 1.5
- coroutine.resume(coroutine.create(function()
- for i = 1, 24 do
- camera.FieldOfView = camera.FieldOfView - ((24-i)/10)
- RS:wait()
- end
- end))
- end
- end)
- firstperson = false
- Mouse.KeyUp:connect(function(key)
- if key == "k" then
- if firstperson == true then
- firstperson = false
- else
- firstperson = true
- end
- end
- end)
- local interrump = false
- game:GetService('RunService'):BindToRenderStep('Camera', Enum.RenderPriority.Camera.Value, function()
- if humanoid.Health < oldHP then
- interrump = true
- RS:wait()
- interrump = false
- for i = 1, 15 do
- if interrump == true then interrump = false break end
- camera.CFrame = camera.CFrame * CFrame.Angles(0, 0, -math.rad(15-i))
- RS:wait()
- end
- end
- end)
- Mouse.TargetFilter = camera
- local dead = false
- local humOffset = CFrame.new(0, 0, 0)
- local camHandY = 0
- local camHandZ = 0
- local cameraHandCFrame = CFrame.new(1.15, -1.35, -2) * CFrame.fromEulerAnglesXYZ(math.rad(90), math.rad(55), math.rad(20))
- --cameraHandWeld = Instance.new("Weld",head)
- --cameraHandWeld.Part0 = head
- --cameraHandWeld.Part1 = cameraHand
- --cameraHandWeld.C0 = CFrame.new(1.15, -1.35, -2) * CFrame.fromEulerAnglesXYZ(math.rad(90), math.rad(55), math.rad(20))
- local bodyRot = CFrame.new(0, 0, 0)
- --local lastCamRot = camPart.Orientation
- while RS:wait() do
- if firstperson == true then
- player.CameraMode = Enum.CameraMode.LockFirstPerson
- else
- player.CameraMode = Enum.CameraMode.Classic
- end
- if punchneeded == true then
- if punchEnded == 1 then punching = 1 end
- end
- --cameraHandCFrame = CFrame.new(1.15, -1.35, -2) * CFrame.fromEulerAnglesXYZ(math.rad(90), math.rad(55), math.rad(20))
- cameraHand.CFrame = camPart.CFrame * cameraHandCFrame
- cameraHandItem.CFrame = cameraHand.CFrame * CFrame.new(0, -0.5, 0) * CFrame.Angles(math.rad(-210), math.rad(-40), math.rad(-100)) * CFrame.new(0, -0.35, 0)
- camCurrentZoom = ((CFrame.new(0, -1*sneaking, 0) * camera.CFrame).p - head.Position).magnitude
- if itemOnHand ~= nil then
- hasItemOnHand = 1
- else
- hasItemOnHand = 0
- end
- if humanoid.Health < oldHP then
- damageTime = 60
- --sound:Play()
- end
- oldHP = humanoid.Health
- if damageTime > 0 and humanoid.Health > 0 then
- for _,p in pairs(char:GetChildren()) do
- if p.Name ~= "HumanoidRootPart" and p.ClassName == "Part" then
- if p.Name == "DamagePart" then
- p.Transparency = 0.5
- end
- end
- end
- damageTime = damageTime - 2
- if damageTime <= 0 then
- for _,p in pairs(char:GetChildren()) do
- if p.Name ~= "HumanoidRootPart" and p.ClassName == "Part" then
- if p.Name == "DamagePart" then
- p.Transparency = 1
- end
- end
- end
- end
- end
- camPart.CFrame = camera.CFrame
- if getMagnitudeXZ(torso.Velocity) > 1 then
- if walkAnim >= 1 then
- increaseWalkAnim = -1
- elseif walkAnim <= -1 then
- increaseWalkAnim = 1
- end
- walkAnim = walkAnim + (increaseWalkAnim/(10+(sneaking*20))) * ((5 + getMagnitudeXZ(torso.Velocity))/20)
- else
- walkAnim = 0
- end
- --lH.C0 = CFrame.new(0, 0.975, 0) * CFrame.Angles(-math.rad(sneaking*45), 0, 0)
- --rH.C0 = CFrame.new(0, 0.975, 0) * CFrame.Angles(math.rad(sneaking*45), 0, 0)
- --
- --rootJoint.C0 = CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0)
- --print(math.abs(head.Orientation.Y) - math.abs(humRootPart.Orientation.Y))
- --if (head.Orientation.Y * 2) - (head.Orientation.Y + torso.Orientation.Y) > 45 then
- --humRootPart.CFrame = humRootPart.CFrame * CFrame.Angles(0, math.rad(-45 + head.Orientation.Y), 0)
- --print("-45")
- --end
- --if (head.Orientation.Y * 2) - (head.Orientation.Y + torso.Orientation.Y) < -45 then
- --humRootPart.CFrame = humRootPart.CFrame * CFrame.Angles(0, math.rad(45 + head.Orientation.Y), 0)
- --print("45")
- --end
- if changedItem then
- changedItem = false
- coroutine.resume(coroutine.create(function()
- for i = 1, 8 do
- camHandY = camHandY - 0.2
- RS:wait()
- end
- for i = 1, 8 do
- camHandY = camHandY + 0.2
- RS:wait()
- end
- end))
- end
- --move these arms
- if Mouse.Target and getDistance(head.CFrame.p, Mouse.Hit.p) <= 10.4 then
- if Mouse.Target.Parent:FindFirstChild("Humanoid") == nil and Mouse.Target.Parent ~= camera then
- selectBox.Adornee = Mouse.Target
- else
- selectBox.Adornee = nil
- end
- else
- selectBox.Adornee = nil
- end
- --local neckYRot = math.rad(camPart.Orientation.Y - torso.Orientation.Y)
- --neck.C1 = CFrame.new(0, 0.975, 0) * CFrame.fromEulerAnglesXYZ(math.rad(sneaking*45), neckYRot, 0)
- --neck.C0 = CFrame.new(0, -0.65, 0) * CFrame.Angles(-math.rad(camPart.Orientation.X - torso.Orientation.X - (sneaking*45)), 0, 0)
- --print(AngleDifference(camPart.Orientation, torso.Orientation).Y)
- local negate = 1
- if torso.Velocity.Y < 0 then
- negate = -1
- end
- --local vel = math.log(math.abs(torso.Velocity.Y))*negate
- --if vel == math.huge or vel == -math.huge then vel = 0.1 end
- --local vel = torso.Velocity.Y^0.6
- local BobbingY = walkAnim*2
- if BobbingY >= 1 then BobbingY = 1 BobbingY = -BobbingY end
- --local rotationSpeed = AngleDifference(camPart.Orientation, lastCamRot)
- local BobbingX = -0.5 + walkAnim
- --cameraHandCFrame = cameraHandCFrame:lerp(CFrame.new(1.15*1.3 + (walkAnim/2 - (walkAnim/4)), -1.35*1.3 + camHandY + (-BobbingY/8) + 0, -0.45 + -camHandZ + ((camera.FieldOfView/45)-1.6)*1.3) * CFrame.Angles(math.rad(punchRotXcam), math.rad(punchRotYcam), math.rad(punchRotZcam)) * CFrame.new(0, 0, -1.75) * CFrame.fromEulerAnglesXYZ(math.rad(85), math.rad(55), math.rad(22.5)), 0.25)
- cameraHandCFrame = cameraHandCFrame:lerp( CFrame.new(1.15*1.3 + (BobbingX/3.5), -1.35*1.3 + camHandY + ((0.4-BobbingY)/7) + 0, -0.45 + -camHandZ + ((camera.FieldOfView/45)-1.6)*1.3) * CFrame.Angles(math.rad(punchRotXcam), math.rad(punchRotYcam), math.rad(punchRotZcam)) * CFrame.new(0, 0, -1.75) * CFrame.fromEulerAnglesXYZ(math.rad(85), math.rad(55), math.rad(22.5)), 0.25)
- humOffset = humOffset:lerp(CFrame.new(walkAnim/4 - (walkAnim/8), BobbingY/13, 0), 0.25)
- humanoid.CameraOffset = Vector3.new(humOffset.X, humOffset.Y, 0)
- if player.CameraMode == Enum.CameraMode.Classic then
- cameraHand.Transparency = 1
- for _,t in pairs(cameraHand:GetChildren()) do
- if t.Transparency == 0 then
- t.Transparency = 1
- end
- end
- for _,t in pairs(cameraHandItem:GetChildren()) do
- if t.Transparency == 0 then
- t.Transparency = 1
- end
- end
- else
- changedPerspective = 0
- cameraHand.Transparency = hasItemOnHand
- for _,t in pairs(cameraHand:GetChildren()) do
- if t.Transparency == 1 then
- t.Transparency = hasItemOnHand
- end
- end
- for _,t in pairs(cameraHandItem:GetChildren()) do
- if t.Transparency == 1 then
- t.Transparency = 0
- end
- end
- end
- if updateHand == true then
- updateHand = false
- updateItemOnHand()
- end
- if punching == 1 and punchEnded == 1 then
- punching = 0
- --print("steve uses punch!!")
- local coPunchCam = coroutine.wrap(function()
- local mult = 2.25
- punchRotXcam = 40/2*mult
- punchRotYcam = 25/2*mult
- camHandZ = 2.5
- wait(0.075/4)
- punchRotXcam = 50/2*mult
- punchRotYcam = 25*mult
- punchRotZcam = -10*mult
- camHandZ = 1
- wait(0.075/4)
- punchRotYcam = 50/1.5*mult
- punchRotXcam = -10*mult
- --wait(0.075/2)
- --punchRotYcam = 50
- --punchRotXcam = -10
- wait(0.02)
- punchRotXcam = -20*mult
- wait(0.055)
- camHandZ = 0
- punchRotXcam = 0
- punchRotYcam = 0
- punchRotZcam = 0
- end)
- local coPunch = coroutine.wrap(function()
- punchEnded = 0
- punchSpeed = 1
- punchRotX = -60
- punchRotY = -8
- punchRotZ = -35
- wait(0.075/1.3)
- punchSpeed = 1
- punchRotX = -75
- punchRotY = 8
- punchRotZ = 40
- wait(0.075/1.3)
- punchSpeed = 1
- punchRotX = -20
- punchRotZ = 40
- wait(0.075/1.3)
- punchSpeed = 3.5
- punchRotX = 0
- punchRotY = 0
- punchRotZ = 0
- punchRotXcam = 0
- punchRotYcam = 0
- punchRotZcam = 0
- punchEnded = 1
- wait(0.06/1.3)
- punchSpeed = 0
- end)
- coPunch()
- coPunchCam()
- end
- if ticks > 20 then
- ticks = 0
- if times == 0 then
- times = times + 1
- idleAnimRotX = -1
- idleAnimRotZ = 0
- elseif times == 1 then
- times = times + 1
- idleAnimRotX = -0.75
- idleAnimRotZ = -0.75
- elseif times == 2 then
- times = times + 1
- idleAnimRotX = 0
- idleAnimRotZ = -1
- elseif times == 3 then
- times = times + 1
- idleAnimRotX = 0.75
- idleAnimRotZ = -0.75
- --idleAnimRotX = 0.75
- --idleAnimRotZ = -0
- elseif times == 4 then
- times = times + 1
- idleAnimRotX = 1
- idleAnimRotZ = 0
- --idleAnimRotX = 1
- --idleAnimRotZ = 0
- elseif times == 5 then
- times = times + 1
- idleAnimRotX = 0.75
- idleAnimRotZ = 0.75
- elseif times == 6 then
- times = times + 1
- idleAnimRotX = 0
- idleAnimRotZ = 1
- elseif times == 7 then
- times = 0
- idleAnimRotX = -0.75
- idleAnimRotZ = 0.75
- end
- end
- if hi == 1 then hi = 0 end
- end
- end
- end
- ]],char)
- NLS([[
- local sneaking = 0
- local ticks = 0
- local RS = game:GetService("RunService").RenderStepped
- local player = owner
- local bodyRot = CFrame.new(0, 0, 0)
- local mouse = player:GetMouse()
- keyq = false
- mouse.KeyDown:Connect(function(key)
- if key == "q" then
- sneaking = 1
- keyq = true
- end
- end)
- mouse.KeyUp:Connect(function(key)
- if key == "q" then
- sneaking = 0
- keyq = false
- end
- end)
- char = player.Character
- local head = char:WaitForChild("Head")
- local remoteevent = char:WaitForChild("SteveFunction")
- remoteevent.Name = "SteveEvent"
- local torso = char:WaitForChild("Torso")
- local humanoid = char:WaitForChild("Humanoid")
- humanoid.AutoRotate = false
- neck = torso:WaitForChild("Neck")
- local humRootPart = char:WaitForChild("HumanoidRootPart")
- camera = workspace.CurrentCamera
- local camPart = Instance.new("Part", char)
- camPart.Size = Vector3.new(0, 0, 0)
- camPart.CFrame = camera.CFrame
- camPart.CanCollide = false
- camPart.Anchored = true
- camPart.Transparency = 1
- local lastCamRot = camPart.Orientation
- function AngleDifference(Angle1, Angle2)
- local Difference = {X = 0, Y = 0, Z = 0}
- Difference.X = Angle2.X - Angle1.X
- if (Difference.X > 180) then
- Difference.X = Difference.X - 360
- elseif (Difference.X < -180) then
- Difference.X = Difference.X + 360
- end
- Difference.Y = Angle2.Y - Angle1.Y
- if (Difference.Y > 180) then
- Difference.Y = Difference.Y - 360
- elseif (Difference.Y < -180) then
- Difference.Y = Difference.Y + 360
- end
- Difference.Z = Angle2.Z - Angle1.Z
- if (Difference.Z > 180) then
- Difference.Z = Difference.Z - 360
- elseif (Difference.Z < -180) then
- Difference.Z = Difference.Z + 360
- end
- return Vector3.new(Difference.X, Difference.Y, Difference.Z)
- end
- game:GetService("RunService").RenderStepped:Connect(function()
- if char:FindFirstChild("MobileCrouching") and keyq == false then
- sneaking = 1
- elseif char:FindFirstChild("MobileCrouching") == nil and keyq == false then
- sneaking = 0
- end
- local remoteevent = char:WaitForChild("SteveEvent")
- camPart.CFrame = camera.CFrame
- local neckYRot = math.rad(camPart.Orientation.Y - torso.Orientation.Y)
- local rotX = math.deg(math.atan2(humanoid.MoveDirection.Z, humanoid.MoveDirection.X)) + 90
- if humanoid.MoveDirection ~= Vector3.new(0, 0, 0) then
- --print(rotX)
- bodyRot = bodyRot:lerp(CFrame.Angles(0, -math.rad(rotX), 0), 0.125)
- humRootPart.CFrame = CFrame.new(humRootPart.CFrame.p.X, humRootPart.CFrame.p.Y, humRootPart.CFrame.p.Z) * bodyRot
- end
- local neckYRot = math.rad(camPart.Orientation.Y - torso.Orientation.Y)
- neck.C1 = CFrame.new(0, 0.975, 0) * CFrame.fromEulerAnglesXYZ(math.rad(sneaking*45), neckYRot, 0)
- neck.C0 = CFrame.new(0, -0.65, 0) * CFrame.Angles(-math.rad(camPart.Orientation.X - torso.Orientation.X - (sneaking*45)), 0, 0)
- local oldTorsoOrientation = torso.Orientation
- if AngleDifference(camPart.Orientation, torso.Orientation).Y > 45 then
- humRootPart.CFrame = CFrame.new(humRootPart.CFrame.p.X, humRootPart.CFrame.p.Y, humRootPart.CFrame.p.Z) * CFrame.Angles(0, math.rad(head.Orientation.Y + 45), 0)
- bodyRot = CFrame.Angles(0, math.rad(head.Orientation.Y + 45), 0)
- --print("-45")
- elseif AngleDifference(camPart.Orientation, torso.Orientation).Y < -45 then
- humRootPart.CFrame = CFrame.new(humRootPart.CFrame.p.X, humRootPart.CFrame.p.Y, humRootPart.CFrame.p.Z) * CFrame.Angles(0, math.rad(head.Orientation.Y - 45), 0)
- bodyRot = CFrame.Angles(0, math.rad(head.Orientation.Y - 45), 0)
- --print("45")
- end
- lastCamRot = camPart.Orientation
- neck.C1 = neck.C1 * CFrame.fromEulerAnglesXYZ(0, -math.rad(AngleDifference(oldTorsoOrientation, torso.Orientation).Y), 0)
- ticks = ticks + 1
- if owner.Character:WaitForChild("SteveEvent") then
- owner.Character.SteveEvent:FireServer (neck.C0,neck.C1)
- end
- end)
- ]], char)
- local lH = Instance.new("Motor", torso)
- lH.Name = "Left Hip"
- lH.Part0 = lLeg
- lH.Part1 = torso
- lH.C0 = CFrame.new(0, 0.975, 0)
- lH.C1 = CFrame.new(0.325, -0.975, 0) * CFrame.Angles(0, 0, 0)
- local rH = Instance.new("Motor", torso)
- rH.Name = "Right Hip"
- rH.Part0 = rLeg
- rH.Part1 = torso
- rH.C0 = CFrame.new(0, 0.975, 0)
- rH.C1 = CFrame.new(-0.325, -0.975, 0) * CFrame.Angles(0, -math.rad(180), 0)
- local ticks = 0
- local times = 0
- local walkAnim = 0
- local increaseWalkAnim = 1
- local idleAnimRotX = 0
- local idleAnimRotZ = 0
- local sneaking = 0
- Mouse.KeyDown:Connect(function(key)
- if key == "h" then
- if shieldenabled == false then
- shieldenabled = true
- else
- shieldenabled = false
- end
- end
- end)
- function crack(part, face)
- mas = part
- SurfaceGui0 = Instance.new("SurfaceGui")
- Frame1 = Instance.new("Frame")
- Frame2 = Instance.new("Frame")
- Frame3 = Instance.new("Frame")
- Frame4 = Instance.new("Frame")
- Frame5 = Instance.new("Frame")
- Frame6 = Instance.new("Frame")
- Frame7 = Instance.new("Frame")
- Frame8 = Instance.new("Frame")
- Frame9 = Instance.new("Frame")
- Frame10 = Instance.new("Frame")
- Frame11 = Instance.new("Frame")
- Frame12 = Instance.new("Frame")
- Frame13 = Instance.new("Frame")
- Frame14 = Instance.new("Frame")
- Frame15 = Instance.new("Frame")
- Frame16 = Instance.new("Frame")
- Frame17 = Instance.new("Frame")
- Frame18 = Instance.new("Frame")
- Frame19 = Instance.new("Frame")
- Frame20 = Instance.new("Frame")
- Frame21 = Instance.new("Frame")
- Frame22 = Instance.new("Frame")
- Frame23 = Instance.new("Frame")
- Frame24 = Instance.new("Frame")
- Frame25 = Instance.new("Frame")
- Frame26 = Instance.new("Frame")
- Frame27 = Instance.new("Frame")
- Frame28 = Instance.new("Frame")
- Frame29 = Instance.new("Frame")
- Frame30 = Instance.new("Frame")
- Frame31 = Instance.new("Frame")
- Frame32 = Instance.new("Frame")
- Frame33 = Instance.new("Frame")
- Frame34 = Instance.new("Frame")
- Frame35 = Instance.new("Frame")
- Frame36 = Instance.new("Frame")
- Frame37 = Instance.new("Frame")
- Frame38 = Instance.new("Frame")
- Frame39 = Instance.new("Frame")
- Frame40 = Instance.new("Frame")
- Frame41 = Instance.new("Frame")
- Frame42 = Instance.new("Frame")
- Frame43 = Instance.new("Frame")
- Frame44 = Instance.new("Frame")
- Frame45 = Instance.new("Frame")
- Frame46 = Instance.new("Frame")
- Frame47 = Instance.new("Frame")
- Frame48 = Instance.new("Frame")
- Frame49 = Instance.new("Frame")
- Frame50 = Instance.new("Frame")
- Frame51 = Instance.new("Frame")
- Frame52 = Instance.new("Frame")
- Frame53 = Instance.new("Frame")
- Frame54 = Instance.new("Frame")
- Frame55 = Instance.new("Frame")
- Frame56 = Instance.new("Frame")
- Frame57 = Instance.new("Frame")
- Frame58 = Instance.new("Frame")
- Frame59 = Instance.new("Frame")
- Frame60 = Instance.new("Frame")
- Frame61 = Instance.new("Frame")
- Frame62 = Instance.new("Frame")
- Frame63 = Instance.new("Frame")
- SurfaceGui0.Name = "BreakSG"
- SurfaceGui0.Parent = mas
- SurfaceGui0.LightInfluence = 1
- SurfaceGui0.Face = face
- SurfaceGui0.ClipsDescendants = true
- SurfaceGui0.CanvasSize = Vector2.new(16, 16)
- SurfaceGui0.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
- SurfaceGui0.Adornee = nil
- SurfaceGui0.AlwaysOnTop = false
- Frame1.Name = "Stage1"
- Frame1.Parent = SurfaceGui0
- Frame1.Size = UDim2.new(1, 0, 1, 0)
- Frame1.BackgroundColor = BrickColor.new("Institutional white")
- Frame1.BackgroundColor3 = Color3.new(1, 1, 1)
- Frame1.BackgroundTransparency = 1
- Frame1.BorderSizePixel = 0
- Frame1.ZIndex = 2
- Frame2.Name = "DarkP"
- Frame2.Parent = Frame1
- Frame2.Position = UDim2.new(0, 8, 0, 8)
- Frame2.Size = UDim2.new(0, 1, 0, 2)
- Frame2.BackgroundColor = BrickColor.new("Really black")
- Frame2.BackgroundColor3 = Color3.new(0, 0, 0)
- Frame2.BackgroundTransparency = 0.2392156869173
- Frame2.BorderSizePixel = 0
- Frame3.Name = "LightP"
- Frame3.Parent = Frame1
- Frame3.Position = UDim2.new(0, 8, 0, 10)
- Frame3.Size = UDim2.new(0, 1, 0, 1)
- Frame3.BackgroundColor = BrickColor.new("Really black")
- Frame3.BackgroundColor3 = Color3.new(0, 0, 0)
- Frame3.BackgroundTransparency = 0.60784316062927
- Frame3.BorderSizePixel = 0
- Frame4.Name = "DarkP"
- Frame4.Parent = Frame1
- Frame4.Position = UDim2.new(0, 6, 0, 5)
- Frame4.Size = UDim2.new(0, 1, 0, 2)
- Frame4.BackgroundColor = BrickColor.new("Really black")
- Frame4.BackgroundColor3 = Color3.new(0, 0, 0)
- Frame4.BackgroundTransparency = 0.2392156869173
- Frame4.BorderSizePixel = 0
- Frame5.Name = "LightP"
- Frame5.Parent = Frame1
- Frame5.Position = UDim2.new(0, 6, 0, 7)
- Frame5.Size = UDim2.new(0, 1, 0, 1)
- Frame5.BackgroundColor = BrickColor.new("Really black")
- Frame5.BackgroundColor3 = Color3.new(0, 0, 0)
- Frame5.BackgroundTransparency = 0.60784316062927
- Frame5.BorderSizePixel = 0
- Frame6.Name = "LightP"
- Frame6.Parent = Frame1
- Frame6.Position = UDim2.new(0, 9, 0, 8)
- Frame6.Size = UDim2.new(0, 1, 0, 1)
- Frame6.BackgroundColor = BrickColor.new("Really black")
- Frame6.BackgroundColor3 = Color3.new(0, 0, 0)
- Frame6.BackgroundTransparency = 0.60784316062927
- Frame6.BorderSizePixel = 0
- Frame7.Name = "DarkP"
- Frame7.Parent = Frame1
- Frame7.Position = UDim2.new(0, 9, 0, 7)
- Frame7.Size = UDim2.new(0, 1, 0, 1)
- Frame7.BackgroundColor = BrickColor.new("Really black")
- Frame7.BackgroundColor3 = Color3.new(0, 0, 0)
- Frame7.BackgroundTransparency = 0.2392156869173
- Frame7.BorderSizePixel = 0
- Frame8.Name = "Stage2"
- Frame8.Parent = SurfaceGui0
- Frame8.Size = UDim2.new(1, 0, 1, 0)
- Frame8.BackgroundColor = BrickColor.new("Institutional white")
- Frame8.BackgroundColor3 = Color3.new(1, 1, 1)
- Frame8.BackgroundTransparency = 1
- Frame8.BorderSizePixel = 0
- Frame8.ZIndex = 3
- Frame9.Name = "DarkP"
- Frame9.Parent = Frame8
- Frame9.Position = UDim2.new(0, 8, 0, 8)
- Frame9.Size = UDim2.new(0, 1, 0, 3)
- Frame9.BackgroundColor = BrickColor.new("Really black")
- Frame9.BackgroundColor3 = Color3.new(0, 0, 0)
- Frame9.BackgroundTransparency = 0.2392156869173
- Frame9.BorderSizePixel = 0
- Frame10.Name = "LightP"
- Frame10.Parent = Frame8
- Frame10.Position = UDim2.new(0, 8, 0, 11)
- Frame10.Size = UDim2.new(0, 1, 0, 1)
- Frame10.BackgroundColor = BrickColor.new("Really black")
- Frame10.BackgroundColor3 = Color3.new(0, 0, 0)
- Frame10.BackgroundTransparency = 0.60784316062927
- Frame10.BorderSizePixel = 0
- Frame11.Name = "LightP"
- Frame11.Parent = Frame8
- Frame11.Position = UDim2.new(0, 7, 0, 12)
- Frame11.Size = UDim2.new(0, 1, 0, 1)
- Frame11.BackgroundColor = BrickColor.new("Really black")
- Frame11.BackgroundColor3 = Color3.new(0, 0, 0)
- Frame11.BackgroundTransparency = 0.60784316062927
- Frame11.BorderSizePixel = 0
- Frame12.Name = "DarkP"
- Frame12.Parent = Frame8
- Frame12.Position = UDim2.new(0, 7, 0, 11)
- Frame12.Size = UDim2.new(0, 1, 0, 1)
- Frame12.BackgroundColor = BrickColor.new("Really black")
- Frame12.BackgroundColor3 = Color3.new(0, 0, 0)
- Frame12.BackgroundTransparency = 0.2392156869173
- Frame12.BorderSizePixel = 0
- Frame13.Name = "DarkP"
- Frame13.Parent = Frame8
- Frame13.Position = UDim2.new(0, 6, 0, 4)
- Frame13.Size = UDim2.new(0, 1, 0, 3)
- Frame13.BackgroundColor = BrickColor.new("Really black")
- Frame13.BackgroundColor3 = Color3.new(0, 0, 0)
- Frame13.BackgroundTransparency = 0.2392156869173
- Frame13.BorderSizePixel = 0
- Frame14.Name = "DarkP"
- Frame14.Parent = Frame8
- Frame14.Position = UDim2.new(0, 10, 0, 6)
- Frame14.Size = UDim2.new(0, 2, 0, 1)
- Frame14.BackgroundColor = BrickColor.new("Really black")
- Frame14.BackgroundColor3 = Color3.new(0, 0, 0)
- Frame14.BackgroundTransparency = 0.2392156869173
- Frame14.BorderSizePixel = 0
- Frame15.Name = "LightP"
- Frame15.Parent = Frame8
- Frame15.Position = UDim2.new(0, 10, 0, 7)
- Frame15.Size = UDim2.new(0, 2, 0, 1)
- Frame15.BackgroundColor = BrickColor.new("Really black")
- Frame15.BackgroundColor3 = Color3.new(0, 0, 0)
- Frame15.BackgroundTransparency = 0.60784316062927
- Frame15.BorderSizePixel = 0
- Frame16.Name = "Stage3"
- Frame16.Parent = SurfaceGui0
- Frame16.Size = UDim2.new(1, 0, 1, 0)
- Frame16.BackgroundColor = BrickColor.new("Institutional white")
- Frame16.BackgroundColor3 = Color3.new(1, 1, 1)
- Frame16.BackgroundTransparency = 1
- Frame16.BorderSizePixel = 0
- Frame16.ZIndex = 4
- Frame17.Name = "LightP"
- Frame17.Parent = Frame16
- Frame17.Position = UDim2.new(0, 5, 0, 7)
- Frame17.Size = UDim2.new(0, 1, 0, 1)
- Frame17.BackgroundColor = BrickColor.new("Really black")
- Frame17.BackgroundColor3 = Color3.new(0, 0, 0)
- Frame17.BackgroundTransparency = 0.60784316062927
- Frame17.BorderSizePixel = 0
- Frame18.Name = "DarkP"
- Frame18.Parent = Frame16
- Frame18.Position = UDim2.new(0, 5, 0, 6)
- Frame18.Size = UDim2.new(0, 1, 0, 1)
- Frame18.BackgroundColor = BrickColor.new("Really black")
- Frame18.BackgroundColor3 = Color3.new(0, 0, 0)
- Frame18.BackgroundTransparency = 0.2392156869173
- Frame18.BorderSizePixel = 0
- Frame19.Name = "LightP"
- Frame19.Parent = Frame16
- Frame19.Position = UDim2.new(0, 7, 0, 4)
- Frame19.Size = UDim2.new(0, 1, 0, 1)
- Frame19.BackgroundColor = BrickColor.new("Really black")
- Frame19.BackgroundColor3 = Color3.new(0, 0, 0)
- Frame19.BackgroundTransparency = 0.60784316062927
- Frame19.BorderSizePixel = 0
- Frame20.Name = "DarkP"
- Frame20.Parent = Frame16
- Frame20.Position = UDim2.new(0, 7, 0, 3)
- Frame20.Size = UDim2.new(0, 1, 0, 1)
- Frame20.BackgroundColor = BrickColor.new("Really black")
- Frame20.BackgroundColor3 = Color3.new(0, 0, 0)
- Frame20.BackgroundTransparency = 0.2392156869173
- Frame20.BorderSizePixel = 0
- Frame21.Name = "DarkP"
- Frame21.Parent = Frame16
- Frame21.Position = UDim2.new(0, 9, 0, 5)
- Frame21.Size = UDim2.new(0, 1, 0, 1)
- Frame21.BackgroundColor = BrickColor.new("Really black")
- Frame21.BackgroundColor3 = Color3.new(0, 0, 0)
- Frame21.BackgroundTransparency = 0.2392156869173
- Frame21.BorderSizePixel = 0
- Frame22.Name = "LightP"
- Frame22.Parent = Frame16
- Frame22.Position = UDim2.new(0, 9, 0, 6)
- Frame22.Size = UDim2.new(0, 1, 0, 1)
- Frame22.BackgroundColor = BrickColor.new("Really black")
- Frame22.BackgroundColor3 = Color3.new(0, 0, 0)
- Frame22.BackgroundTransparency = 0.60784316062927
- Frame22.BorderSizePixel = 0
- Frame23.Name = "LightP"
- Frame23.Parent = Frame16
- Frame23.Position = UDim2.new(0, 12, 0, 6)
- Frame23.Size = UDim2.new(0, 1, 0, 1)
- Frame23.BackgroundColor = BrickColor.new("Really black")
- Frame23.BackgroundColor3 = Color3.new(0, 0, 0)
- Frame23.BackgroundTransparency = 0.60784316062927
- Frame23.BorderSizePixel = 0
- Frame24.Name = "DarkP"
- Frame24.Parent = Frame16
- Frame24.Position = UDim2.new(0, 12, 0, 5)
- Frame24.Size = UDim2.new(0, 1, 0, 1)
- Frame24.BackgroundColor = BrickColor.new("Really black")
- Frame24.BackgroundColor3 = Color3.new(0, 0, 0)
- Frame24.BackgroundTransparency = 0.2392156869173
- Frame24.BorderSizePixel = 0
- Frame25.Name = "LightP"
- Frame25.Parent = Frame16
- Frame25.Position = UDim2.new(0, 6, 0, 12)
- Frame25.Size = UDim2.new(0, 1, 0, 1)
- Frame25.BackgroundColor = BrickColor.new("Really black")
- Frame25.BackgroundColor3 = Color3.new(0, 0, 0)
- Frame25.BackgroundTransparency = 0.60784316062927
- Frame25.BorderSizePixel = 0
- Frame26.Name = "DarkP"
- Frame26.Parent = Frame16
- Frame26.Position = UDim2.new(0, 6, 0, 11)
- Frame26.Size = UDim2.new(0, 1, 0, 1)
- Frame26.BackgroundColor = BrickColor.new("Really black")
- Frame26.BackgroundColor3 = Color3.new(0, 0, 0)
- Frame26.BackgroundTransparency = 0.2392156869173
- Frame26.BorderSizePixel = 0
- Frame27.Name = "Stage4"
- Frame27.Parent = SurfaceGui0
- Frame27.Size = UDim2.new(1, 0, 1, 0)
- Frame27.BackgroundColor = BrickColor.new("Institutional white")
- Frame27.BackgroundColor3 = Color3.new(1, 1, 1)
- Frame27.BackgroundTransparency = 1
- Frame27.BorderSizePixel = 0
- Frame27.ZIndex = 5
- Frame28.Name = "LightP"
- Frame28.Parent = Frame27
- Frame28.Position = UDim2.new(0, 4, 0, 7)
- Frame28.Size = UDim2.new(0, 1, 0, 1)
- Frame28.BackgroundColor = BrickColor.new("Really black")
- Frame28.BackgroundColor3 = Color3.new(0, 0, 0)
- Frame28.BackgroundTransparency = 0.60784316062927
- Frame28.BorderSizePixel = 0
- Frame29.Name = "DarkP"
- Frame29.Parent = Frame27
- Frame29.Position = UDim2.new(0, 4, 0, 6)
- Frame29.Size = UDim2.new(0, 1, 0, 1)
- Frame29.BackgroundColor = BrickColor.new("Really black")
- Frame29.BackgroundColor3 = Color3.new(0, 0, 0)
- Frame29.BackgroundTransparency = 0.2392156869173
- Frame29.BorderSizePixel = 0
- Frame30.Name = "LightP"
- Frame30.Parent = Frame27
- Frame30.Position = UDim2.new(0, 8, 0, 3)
- Frame30.Size = UDim2.new(0, 1, 0, 1)
- Frame30.BackgroundColor = BrickColor.new("Really black")
- Frame30.BackgroundColor3 = Color3.new(0, 0, 0)
- Frame30.BackgroundTransparency = 0.60784316062927
- Frame30.BorderSizePixel = 0
- Frame31.Name = "DarkP"
- Frame31.Parent = Frame27
- Frame31.Position = UDim2.new(0, 8, 0, 2)
- Frame31.Size = UDim2.new(0, 1, 0, 1)
- Frame31.BackgroundColor = BrickColor.new("Really black")
- Frame31.BackgroundColor3 = Color3.new(0, 0, 0)
- Frame31.BackgroundTransparency = 0.2392156869173
- Frame31.BorderSizePixel = 0
- Frame32.Name = "DarkP"
- Frame32.Parent = Frame27
- Frame32.Position = UDim2.new(0, 9, 0, 4)
- Frame32.Size = UDim2.new(0, 1, 0, 1)
- Frame32.BackgroundColor = BrickColor.new("Really black")
- Frame32.BackgroundColor3 = Color3.new(0, 0, 0)
- Frame32.BackgroundTransparency = 0.2392156869173
- Frame32.BorderSizePixel = 0
- Frame33.Name = "LightP"
- Frame33.Parent = Frame27
- Frame33.Position = UDim2.new(0, 12, 0, 6)
- Frame33.Size = UDim2.new(0, 1, 0, 1)
- Frame33.BackgroundColor = BrickColor.new("Really black")
- Frame33.BackgroundColor3 = Color3.new(0, 0, 0)
- Frame33.BackgroundTransparency = 0.60784316062927
- Frame33.BorderSizePixel = 0
- Frame34.Name = "DarkP"
- Frame34.Parent = Frame27
- Frame34.Position = UDim2.new(0, 12, 0, 5)
- Frame34.Size = UDim2.new(0, 1, 0, 1)
- Frame34.BackgroundColor = BrickColor.new("Really black")
- Frame34.BackgroundColor3 = Color3.new(0, 0, 0)
- Frame34.BackgroundTransparency = 0.2392156869173
- Frame34.BorderSizePixel = 0
- Frame35.Name = "LightP"
- Frame35.Parent = Frame27
- Frame35.Position = UDim2.new(0, 5, 0, 12)
- Frame35.Size = UDim2.new(0, 1, 0, 1)
- Frame35.BackgroundColor = BrickColor.new("Really black")
- Frame35.BackgroundColor3 = Color3.new(0, 0, 0)
- Frame35.BackgroundTransparency = 0.60784316062927
- Frame35.BorderSizePixel = 0
- Frame36.Name = "DarkP"
- Frame36.Parent = Frame27
- Frame36.Position = UDim2.new(0, 5, 0, 11)
- Frame36.Size = UDim2.new(0, 1, 0, 1)
- Frame36.BackgroundColor = BrickColor.new("Really black")
- Frame36.BackgroundColor3 = Color3.new(0, 0, 0)
- Frame36.BackgroundTransparency = 0.2392156869173
- Frame36.BorderSizePixel = 0
- Frame37.Name = "DarkP"
- Frame37.Parent = Frame27
- Frame37.Position = UDim2.new(0, 8, 0, 12)
- Frame37.Size = UDim2.new(0, 1, 0, 1)
- Frame37.BackgroundColor = BrickColor.new("Really black")
- Frame37.BackgroundColor3 = Color3.new(0, 0, 0)
- Frame37.BackgroundTransparency = 0.2392156869173
- Frame37.BorderSizePixel = 0
- Frame38.Name = "LightP"
- Frame38.Parent = Frame27
- Frame38.Position = UDim2.new(0, 8, 0, 13)
- Frame38.Size = UDim2.new(0, 1, 0, 1)
- Frame38.BackgroundColor = BrickColor.new("Really black")
- Frame38.BackgroundColor3 = Color3.new(0, 0, 0)
- Frame38.BackgroundTransparency = 0.60784316062927
- Frame38.BorderSizePixel = 0
- Frame39.Name = "LightP"
- Frame39.Parent = Frame27
- Frame39.Position = UDim2.new(0, 13, 0, 5)
- Frame39.Size = UDim2.new(0, 1, 0, 1)
- Frame39.BackgroundColor = BrickColor.new("Really black")
- Frame39.BackgroundColor3 = Color3.new(0, 0, 0)
- Frame39.BackgroundTransparency = 0.60784316062927
- Frame39.BorderSizePixel = 0
- Frame40.Name = "DarkP"
- Frame40.Parent = Frame27
- Frame40.Position = UDim2.new(0, 13, 0, 4)
- Frame40.Size = UDim2.new(0, 1, 0, 1)
- Frame40.BackgroundColor = BrickColor.new("Really black")
- Frame40.BackgroundColor3 = Color3.new(0, 0, 0)
- Frame40.BackgroundTransparency = 0.2392156869173
- Frame40.BorderSizePixel = 0
- Frame41.Name = "DarkP"
- Frame41.Parent = Frame27
- Frame41.Position = UDim2.new(0, 3, 0, 7)
- Frame41.Size = UDim2.new(0, 1, 0, 1)
- Frame41.BackgroundColor = BrickColor.new("Really black")
- Frame41.BackgroundColor3 = Color3.new(0, 0, 0)
- Frame41.BackgroundTransparency = 0.2392156869173
- Frame41.BorderSizePixel = 0
- Frame42.Name = "LightP"
- Frame42.Parent = Frame27
- Frame42.Position = UDim2.new(0, 3, 0, 8)
- Frame42.Size = UDim2.new(0, 1, 0, 1)
- Frame42.BackgroundColor = BrickColor.new("Really black")
- Frame42.BackgroundColor3 = Color3.new(0, 0, 0)
- Frame42.BackgroundTransparency = 0.60784316062927
- Frame42.BorderSizePixel = 0
- Frame43.Name = "Stage5"
- Frame43.Parent = SurfaceGui0
- Frame43.Visible = false
- Frame43.Size = UDim2.new(1, 0, 1, 0)
- Frame43.BackgroundColor = BrickColor.new("Institutional white")
- Frame43.BackgroundColor3 = Color3.new(1, 1, 1)
- Frame43.BackgroundTransparency = 1
- Frame43.BorderSizePixel = 0
- Frame43.ZIndex = 6
- Frame44.Name = "DarkP"
- Frame44.Parent = Frame43
- Frame44.Position = UDim2.new(0, 4, 0, 5)
- Frame44.Size = UDim2.new(0, 1, 0, 1)
- Frame44.BackgroundColor = BrickColor.new("Really black")
- Frame44.BackgroundColor3 = Color3.new(0, 0, 0)
- Frame44.BackgroundTransparency = 0.2392156869173
- Frame44.BorderSizePixel = 0
- Frame45.Name = "LightP"
- Frame45.Parent = Frame43
- Frame45.Position = UDim2.new(0, 9, 0, 3)
- Frame45.Size = UDim2.new(0, 1, 0, 1)
- Frame45.BackgroundColor = BrickColor.new("Really black")
- Frame45.BackgroundColor3 = Color3.new(0, 0, 0)
- Frame45.BackgroundTransparency = 0.60784316062927
- Frame45.BorderSizePixel = 0
- Frame46.Name = "DarkP"
- Frame46.Parent = Frame43
- Frame46.Position = UDim2.new(0, 9, 0, 2)
- Frame46.Size = UDim2.new(0, 1, 0, 1)
- Frame46.BackgroundColor = BrickColor.new("Really black")
- Frame46.BackgroundColor3 = Color3.new(0, 0, 0)
- Frame46.BackgroundTransparency = 0.2392156869173
- Frame46.BorderSizePixel = 0
- Frame47.Name = "LightP"
- Frame47.Parent = Frame43
- Frame47.Position = UDim2.new(0, 5, 0, 12)
- Frame47.Size = UDim2.new(0, 1, 0, 1)
- Frame47.BackgroundColor = BrickColor.new("Really black")
- Frame47.BackgroundColor3 = Color3.new(0, 0, 0)
- Frame47.BackgroundTransparency = 0.60784316062927
- Frame47.BorderSizePixel = 0
- Frame48.Name = "DarkP"
- Frame48.Parent = Frame43
- Frame48.Position = UDim2.new(0, 4, 0, 12)
- Frame48.Size = UDim2.new(0, 1, 0, 1)
- Frame48.BackgroundColor = BrickColor.new("Really black")
- Frame48.BackgroundColor3 = Color3.new(0, 0, 0)
- Frame48.BackgroundTransparency = 0.2392156869173
- Frame48.BorderSizePixel = 0
- Frame49.Name = "DarkP"
- Frame49.Parent = Frame43
- Frame49.Position = UDim2.new(0, 9, 0, 13)
- Frame49.Size = UDim2.new(0, 1, 0, 1)
- Frame49.BackgroundColor = BrickColor.new("Really black")
- Frame49.BackgroundColor3 = Color3.new(0, 0, 0)
- Frame49.BackgroundTransparency = 0.2392156869173
- Frame49.BorderSizePixel = 0
- Frame50.Name = "LightP"
- Frame50.Parent = Frame43
- Frame50.Position = UDim2.new(0, 9, 0, 14)
- Frame50.Size = UDim2.new(0, 1, 0, 1)
- Frame50.BackgroundColor = BrickColor.new("Really black")
- Frame50.BackgroundColor3 = Color3.new(0, 0, 0)
- Frame50.BackgroundTransparency = 0.60784316062927
- Frame50.BorderSizePixel = 0
- Frame51.Name = "LightP"
- Frame51.Parent = Frame43
- Frame51.Position = UDim2.new(0, 14, 0, 5)
- Frame51.Size = UDim2.new(0, 1, 0, 1)
- Frame51.BackgroundColor = BrickColor.new("Really black")
- Frame51.BackgroundColor3 = Color3.new(0, 0, 0)
- Frame51.BackgroundTransparency = 0.60784316062927
- Frame51.BorderSizePixel = 0
- Frame52.Name = "DarkP"
- Frame52.Parent = Frame43
- Frame52.Position = UDim2.new(0, 14, 0, 4)
- Frame52.Size = UDim2.new(0, 1, 0, 1)
- Frame52.BackgroundColor = BrickColor.new("Really black")
- Frame52.BackgroundColor3 = Color3.new(0, 0, 0)
- Frame52.BackgroundTransparency = 0.2392156869173
- Frame52.BorderSizePixel = 0
- Frame53.Name = "LightP"
- Frame53.Parent = Frame43
- Frame53.Position = UDim2.new(0, 4, 0, 13)
- Frame53.Size = UDim2.new(0, 1, 0, 1)
- Frame53.BackgroundColor = BrickColor.new("Really black")
- Frame53.BackgroundColor3 = Color3.new(0, 0, 0)
- Frame53.BackgroundTransparency = 0.60784316062927
- Frame53.BorderSizePixel = 0
- Frame54.Name = "DarkP"
- Frame54.Parent = Frame43
- Frame54.Position = UDim2.new(0, 5, 0, 10)
- Frame54.Size = UDim2.new(0, 1, 0, 1)
- Frame54.BackgroundColor = BrickColor.new("Really black")
- Frame54.BackgroundColor3 = Color3.new(0, 0, 0)
- Frame54.BackgroundTransparency = 0.2392156869173
- Frame54.BorderSizePixel = 0
- Frame55.Name = "DarkP"
- Frame55.Parent = Frame43
- Frame55.Position = UDim2.new(0, 2, 0, 8)
- Frame55.Size = UDim2.new(0, 1, 0, 1)
- Frame55.BackgroundColor = BrickColor.new("Really black")
- Frame55.BackgroundColor3 = Color3.new(0, 0, 0)
- Frame55.BackgroundTransparency = 0.2392156869173
- Frame55.BorderSizePixel = 0
- Frame56.Name = "LightP"
- Frame56.Parent = Frame43
- Frame56.Position = UDim2.new(0, 2, 0, 9)
- Frame56.Size = UDim2.new(0, 1, 0, 1)
- Frame56.BackgroundColor = BrickColor.new("Really black")
- Frame56.BackgroundColor3 = Color3.new(0, 0, 0)
- Frame56.BackgroundTransparency = 0.60784316062927
- Frame56.BorderSizePixel = 0
- Frame57.Name = "DarkP"
- Frame57.Parent = Frame43
- Frame57.Position = UDim2.new(0, 6, 0, 2)
- Frame57.Size = UDim2.new(0, 1, 0, 1)
- Frame57.BackgroundColor = BrickColor.new("Really black")
- Frame57.BackgroundColor3 = Color3.new(0, 0, 0)
- Frame57.BackgroundTransparency = 0.2392156869173
- Frame57.BorderSizePixel = 0
- Frame58.Name = "LightP"
- Frame58.Parent = Frame43
- Frame58.Position = UDim2.new(0, 6, 0, 3)
- Frame58.Size = UDim2.new(0, 1, 0, 1)
- Frame58.BackgroundColor = BrickColor.new("Really black")
- Frame58.BackgroundColor3 = Color3.new(0, 0, 0)
- Frame58.BackgroundTransparency = 0.60784316062927
- Frame58.BorderSizePixel = 0
- Frame59.Name = "Stage0"
- Frame59.Parent = SurfaceGui0
- Frame59.Size = UDim2.new(1, 0, 1, 0)
- Frame59.BackgroundColor = BrickColor.new("Institutional white")
- Frame59.BackgroundColor3 = Color3.new(1, 1, 1)
- Frame59.BackgroundTransparency = 1
- Frame59.BorderSizePixel = 0
- Frame60.Name = "DarkP"
- Frame60.Parent = Frame59
- Frame60.Position = UDim2.new(0, 7, 0, 7)
- Frame60.Size = UDim2.new(0, 1, 0, 1)
- Frame60.BackgroundColor = BrickColor.new("Really black")
- Frame60.BackgroundColor3 = Color3.new(0, 0, 0)
- Frame60.BackgroundTransparency = 0.2392156869173
- Frame60.BorderSizePixel = 0
- Frame61.Name = "DarkP"
- Frame61.Parent = Frame59
- Frame61.Position = UDim2.new(0, 8, 0, 8)
- Frame61.Size = UDim2.new(0, 1, 0, 1)
- Frame61.BackgroundColor = BrickColor.new("Really black")
- Frame61.BackgroundColor3 = Color3.new(0, 0, 0)
- Frame61.BackgroundTransparency = 0.2392156869173
- Frame61.BorderSizePixel = 0
- Frame62.Name = "LightP"
- Frame62.Parent = Frame59
- Frame62.Position = UDim2.new(0, 8, 0, 9)
- Frame62.Size = UDim2.new(0, 1, 0, 1)
- Frame62.BackgroundColor = BrickColor.new("Really black")
- Frame62.BackgroundColor3 = Color3.new(0, 0, 0)
- Frame62.BackgroundTransparency = 0.60784316062927
- Frame62.BorderSizePixel = 0
- Frame63.Name = "LightP"
- Frame63.Parent = Frame59
- Frame63.Position = UDim2.new(0, 7, 0, 8)
- Frame63.Size = UDim2.new(0, 1, 0, 1)
- Frame63.BackgroundColor = BrickColor.new("Really black")
- Frame63.BackgroundColor3 = Color3.new(0, 0, 0)
- Frame63.BackgroundTransparency = 0.60784316062927
- Frame63.BorderSizePixel = 0
- end
- local oldHP = humanoid.Health
- local damageTime = 0
- neededtopunch = false
- punchdelay = false
- local punchRotX = 0
- local punchRotY = 0
- local punchRotZ = 0
- local punchSpeed = 0
- local punching = 0
- local selectedBlock = 0
- local punchEnded = 1
- local itemOnHand = nil
- local selectBox = Instance.new("SelectionBox", char)
- selectBox.Adornee = nil
- selectBox.Transparency = 0.5
- selectBox.Color3 = Color3.new(0, 0, 0)
- selectBox.LineThickness = 0
- local handItem = Instance.new("Part", char)
- handItem.Name = "HandItem"
- handItem.Size = Vector3.new(0.52, 0.52, 0.52)
- handItem.Transparency = 1
- handItem.CanCollide = false
- local handItemWeld = Instance.new("Weld", char)
- handItemWeld.Part0 = handItem
- handItemWeld.Part1 = lArm
- handItemWeld.C1 = CFrame.new(0, -0.9, -0.6) * CFrame.Angles(math.rad(-10), math.rad(45), 0)
- local sound = Instance.new("Sound", char)
- sound.Name = "Hurt"
- sound.Volume = 10
- sound.SoundId = "rbxassetid://3362346832"
- if humanoid.Health < oldHP then
- damageTime = 60
- sound:Play()
- end
- reallyispunching = false
- breakingblock = false
- local breaker = nil
- local facesToResize = {"Front", "Back", "Left", "Right", "Bottom", "Top"}
- Mouse.Button1Down:connect(function()
- neededtopunch = true
- reallyispunching = true
- if Mouse.Target and reallyispunching == true then
- if getDistance(head.CFrame.p, Mouse.Hit.p) <= 10.4 then
- if Mouse.Target.Name ~= "Baseplate" and Mouse.Target.Name ~= "Debris" and Mouse.Target.Name ~= "Base" then
- local humanoid = Mouse.Target.Parent:FindFirstChildOfClass("Humanoid")
- if humanoid then
- if diamondswordtoggled == false then
- humanoid.Health = humanoid.Health - 10
- else
- humanoid.Health = humanoid.Health - 35
- end
- local parts = Mouse.Target.Parent:GetChildren()
- party = Instance.new("Part")
- party.Anchored = true
- party.CFrame = humanoid.Parent.HumanoidRootPart.CFrame * CFrame.new(0,0,0)
- party.CFrame = party.CFrame * CFrame.new(0,0,-2)
- bodyvel = Instance.new("BodyPosition",humanoid.Parent.HumanoidRootPart)
- bodyvel.Position = party.Position
- coroutine.resume(coroutine.create(function()
- wait(0.3)
- bodyvel:Destroy()
- end))
- for _,p in pairs(parts) do
- if p.ClassName == "Part" then
- p.Velocity = char.Head.CFrame.LookVector * 20 * p.Mass
- --p.Velocity = Vector3.new(p.Velocity.X + (head.CFrame.lookVector.X * 18), p.Velocity.Y + (head.CFrame.lookVector.Y * 18) + 8, p.Velocity.Z + (head.CFrame.lookVector.Z * 18))
- end
- end
- return
- end
- local blkTar = Mouse.Target
- if blkTar and blkTar.Name ~= "TNTBlock" then
- breakingblock = true
- if not workspace:FindFirstChild("BlockCrack") then
- blkTarCrack = Instance.new("Part",workspace)
- blkTarCrack.Name = "BlockCrack"
- blkTarCrack.Transparency = 1
- blkTarCrack.CanCollide = false
- blkTarCrack.Size = blkTar.Size + Vector3.new(0.005,0.005,0.005)
- local blkTarCrackWeld = Instance.new("Weld",blkTarCrack)
- blkTarCrackWeld.Part0 = blkTar
- blkTarCrackWeld.Part1 = blkTarCrack
- end
- coroutine.resume(coroutine.create(function()
- while wait() do
- if breakingblock == false then
- blkTarCrack:Destroy()
- end
- end
- end))
- crack(blkTar,"Front")
- crack(blkTar,"Back")
- crack(blkTar,"Top")
- crack(blkTar,"Bottom")
- crack(blkTar,"Left")
- crack(blkTar,"Right")
- if breakingblock == false then
- --blkTarCrack:Destroy()
- end
- for i,v in pairs(breaker:GetChildren()) do
- if v.Name == "BreakSG" then
- for i,frame in pairs(v:GetChildren()) do
- if v.ClassName == "Frame" then
- if v.Name ~= "Stage0" then
- v.Visible = false
- else
- v.Visible = true
- end
- end
- end
- end
- end
- wait(0.7)
- for i,v in pairs(breaker:GetChildren()) do
- if v.Name == "BreakSG" then
- for i,frame in pairs(v:GetChildren()) do
- if v.ClassName == "Frame" then
- if v.Name ~= "Stage1" then
- v.Visible = false
- else
- v.Visible = true
- end
- end
- end
- end
- end
- wait(0.7)
- for i,v in pairs(breaker:GetChildren()) do
- if v.Name == "BreakSG" then
- for i,frame in pairs(v:GetChildren()) do
- if v.ClassName == "Frame" then
- if v.Name ~= "Stage2" then
- v.Visible = false
- else
- v.Visible = true
- end
- end
- end
- end
- end
- wait(0.7)
- for i,v in pairs(breaker:GetChildren()) do
- if v.Name == "BreakSG" then
- for i,frame in pairs(v:GetChildren()) do
- if v.ClassName == "Frame" then
- if v.Name ~= "Stage3" then
- v.Visible = false
- else
- v.Visible = true
- end
- end
- end
- end
- end
- wait(0.7)
- for i,v in pairs(breaker:GetChildren()) do
- if v.Name == "BreakSG" then
- for i,frame in pairs(v:GetChildren()) do
- if v.ClassName == "Frame" then
- if v.Name ~= "Stage4" then
- v.Visible = false
- else
- v.Visible = true
- end
- end
- end
- end
- end
- wait(0.7)
- for i,v in pairs(breaker:GetChildren()) do
- if v.Name == "BreakSG" then
- for i,frame in pairs(v:GetChildren()) do
- if v.ClassName == "Frame" then
- if v.Name ~= "Stage5" then
- v.Visible = false
- else
- v.Visible = true
- end
- end
- end
- end
- end
- if breakingblock == true and blkTarCrack then
- wait(0.7)
- blkTar:Destroy()
- blkTarCrack.Parent = nil
- for i,v in pairs(blkTarCrack:GetChildren()) do
- v:Destroy()
- end
- for i = 1, 9 do
- local part = Instance.new("Part", workspace)
- part.Size = Vector3.new(0, 0, 0)
- part.Transparency = 1
- part.CanCollide = false
- part.Velocity = Vector3.new(math.random(-5, 5), 5, math.random(-5, 5))
- part.Name = "Debris"
- part.CFrame =
- Mouse.Target.CFrame *
- CFrame.new(math.random(-blkTar.Size.X/2, blkTar.Size.X/2), math.random(-blkTar.Size.Y/2, blkTar.Size.Y/2), math.random(-blkTar.Size.Z/2, blkTar.Size.Z/2))
- part.CustomPhysicalProperties = PhysicalProperties.new(0, 0.2, 0, 100, 100)
- local billboard = Instance.new("BillboardGui", part)
- billboard.Size = UDim2.new(1.2, 0, 1.2, 0)
- local clipDescendant = Instance.new("TextLabel", billboard)
- clipDescendant.Size = UDim2.new(0.5, 0, 0.5, 0)
- clipDescendant.BackgroundTransparency = 1
- clipDescendant.Text = ""
- clipDescendant.ClipsDescendants = true
- local img = Instance.new("ImageLabel", clipDescendant)
- img.Size = UDim2.new(2, 0, 2, 0)
- img.BackgroundTransparency = 1
- img.Position = UDim2.new(math.random(-70, 70)/100, 0, math.random(-70, 70)/100, 0)
- local tex = blkTar:FindFirstChild("Front")
- if tex then
- img.Image = tex.Texture
- else
- img.Image = "rbxassetid://744949545"
- end
- if img.Image == "rbxassetid://744949545" then
- img.ImageColor3 = blkTar.Color
- end
- part.Touched:connect(function(prt)
- if prt ~= blkTar then
- part.CanCollide = true
- end
- end)
- coroutine.resume(coroutine.create(function()
- wait(math.random(50, 65)/100)
- part:Destroy()
- end))
- --part.Anchored = false
- end
- end
- while wait() do
- if breakingblock == false then
- blkTarCrack:Destroy()
- end
- end
- end
- local humanoid = Mouse.Target.Parent:FindFirstChild("Humanoid")
- if humanoid then
- humanoid.Health = humanoid.Health - damage
- --humanoid.Health:TakeDamage(10)
- local parts = Mouse.Target.Parent:GetChildren()
- for _,p in pairs(parts) do
- if p.ClassName == "Part" then
- p.Velocity = Vector3.new(p.Velocity.X + (head.CFrame.lookVector.X * 18), p.Velocity.Y + (head.CFrame.lookVector.Y * 18) + 8, p.Velocity.Z + (head.CFrame.lookVector.Z * 18))
- end
- end
- return
- end
- local x = Mouse.Target.CFrame.p.X
- local y = Mouse.Target.CFrame.p.Y
- local z = Mouse.Target.CFrame.p.Z
- if Mouse.TargetSurface.Name == "Right" then x = x + 2.6 end
- if Mouse.TargetSurface.Name == "Left" then x = x - 2.6 end
- if Mouse.TargetSurface.Name == "Top" then y = y + 2.6 end
- if Mouse.TargetSurface.Name == "Bottom" then y = y - 2.6 end
- if Mouse.TargetSurface.Name == "Back" then z = z + 2.6 end
- if Mouse.TargetSurface.Name == "Front" then z = z - 2.6 end
- if Mouse.Target.Size.X > 2.6 or Mouse.Target.Size.Y > 2.6 or Mouse.Target.Size.Z > 2.6 then
- x = Mouse.Hit.p.X
- y = Mouse.Hit.p.Y
- z = Mouse.Hit.p.Z
- end
- -- local x = round(math.abs(mouseX)/2.6)*2.6
- -- local y = round(math.abs(mouseY)/2.6)*2.6
- -- local z = round(math.abs(mouseZ)/2.6)*2.6
- -- if Mouse.Hit.p.X < 0 then x = x * -1 end
- -- if Mouse.Hit.p.Y < 0 then y = y * -1 end
- -- if Mouse.Hit.p.Z < 0 then z = z * -1 end
- end
- end
- end
- end)
- Mouse.Button1Up:connect(function()
- reallyispunching = false
- breakingblock = false
- neededtopunch = false
- end)
- signcooldown = false
- function placeSign()
- if signcooldown == false then
- signcooldown = true
- if char:FindFirstChild("SignRemote") then
- char:FindFirstChild("SignRemote"):Destroy()
- end
- signremote = Instance.new("RemoteEvent",char)
- signremote.Name = "SignRemote"
- NLS([[
- thesignguiisthere = true
- local signgui = Instance.new("ScreenGui",game.Players.LocalPlayer.PlayerGui)
- local Frame = Instance.new("Frame",signgui)
- local closebutton = Instance.new("TextButton",Frame)
- local signguitext = Instance.new("TextBox",Frame)
- Frame.BackgroundTransparency = 1
- Frame.Size = UDim2.new(1, 0,1, 0)
- Frame.Position = UDim2.new(0, 0,0, 0)
- signguitext.PlaceholderText = "Text Here for sign"
- signguitext.ClearTextOnFocus = false
- signguitext.Font = "Arcade"
- signguitext.Position = UDim2.new(0, 50,0, -1)
- signguitext.Size = UDim2.new(1, 0,0.50, 0)
- signguitext.TextColor3 = Color3.fromRGB(255, 255, 255)
- signguitext.TextStrokeColor3 = Color3.fromRGB(0, 0, 0)
- signguitext.TextStrokeTransparency = 1
- signguitext.BackgroundTransparency = 0.5
- signguitext.TextSize = 100
- signguitext.Text = ""
- signguitext.TextWrapped = true
- signguitext.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
- signguitext.Changed:Connect(function(property)
- if property == "Text" then
- game.Players.LocalPlayer.Character.SignRemote:FireServer(signguitext.Text)
- end
- end)
- closebutton.Text = "close sign gui"
- closebutton.Font = "Arcade"
- closebutton.Position = UDim2.new(0, 1,0, 1)
- closebutton.Size = UDim2.new(0.10, 0,0.10, 0)
- closebutton.TextColor3 = Color3.fromRGB(255, 255, 255)
- closebutton.TextStrokeColor3 = Color3.fromRGB(0, 0, 0)
- closebutton.TextStrokeTransparency = 1
- closebutton.BackgroundTransparency = 0
- closebutton.TextScaled = true
- closebutton.BackgroundColor3 = Color3.fromRGB(255, 148, 148)
- closebutton.MouseButton1Click:Connect(function()
- signgui:Destroy()
- thesignguiisthere = false
- end)
- ]],char)
- local signmodel = Instance.new("Model",workspace:WaitForChild("Signs"))
- local Signpart1 = Instance.new("Part", signmodel)
- putTexture(Signpart1, "rbxassetid://3258599312", "rbxassetid://3258599312",
- "rbxassetid://3258599312","rbxassetid://3258599312",
- "rbxassetid://3258599312","rbxassetid://3258599312", "Texture")
- Signpart1.Anchored = true
- Signpart1.Size = Vector3.new(0.332, 1.83, 0.332)
- local Signpart2 = Instance.new("Part", signmodel)
- putTexture(Signpart2, "rbxassetid://152572161", "rbxassetid://152572161",
- "rbxassetid://152572161","rbxassetid://152572161",
- "rbxassetid://152572161","rbxassetid://152572161", "Texture")
- Signpart2.Anchored = false
- local signtext = Instance.new("SurfaceGui",Signpart2)
- local signtext2 = Instance.new("TextLabel",signtext)
- signtext.Face = "Back"
- Signpart2.Size = Vector3.new(2.988, 1.996, 0.332)
- signtext2.Size = UDim2.new(1,0,1,0)
- signtext2.BackgroundTransparency = 1
- signtext2.TextSize = 100
- signtext2.Font = "Arcade"
- signtext2.Text = ""
- signtext2.TextYAlignment = Enum.TextYAlignment.Top
- signtext2.TextWrapped = true
- signremote.OnServerEvent:Connect(function(player,text)
- signtext2.Text = text
- end)
- signremote.OnServerEvent:Connect(function(b1)
- signtext2.Text = b1
- end)
- Signpart1.CFrame = torso.CFrame * CFrame.new(0,-torso.Size.Y,-3)
- for _,f in pairs(facesToResize) do
- Signpart1:WaitForChild(f).StudsPerTileU = 2.6
- Signpart1:WaitForChild(f).StudsPerTileV = 2.6
- end
- for _,f in pairs(facesToResize) do
- Signpart2:WaitForChild(f).StudsPerTileU = 2.6
- Signpart2:WaitForChild(f).StudsPerTileV = 2.6
- end
- wait(0.00)
- Signpart1.Anchored = true
- Signpart1.CFrame = CFrame.new(SnapToGrid(Signpart1.CFrame.X, 2.6), SnapToGrid(Signpart1.CFrame.Y, 2.6), SnapToGrid(Signpart1.CFrame.Z, 2.6))
- Signpart1.Orientation = Vector3.new(0,torso.Orientation.Y,0)
- signweld = Instance.new("Weld",Signpart1)
- signweld.Part0 = Signpart1
- signweld.Part1 = Signpart2
- signweld.C0 = CFrame.new(0, 1.91, 0)
- Signpart1.CFrame = Signpart1.CFrame * CFrame.new(0,0.915,0)
- coroutine.resume(coroutine.create(function()
- wait()
- signcooldown = false
- end))
- end
- end
- function placeBlock(block, cFPos)
- local blockPlaced = Instance.new("Part", workspace)
- if block.name ~= "TNT" then
- blockPlaced.Material = "Granite"
- else
- blockPlaced.Material = "SmoothPlastic"
- end
- blockPlaced.Anchored = false
- blockPlaced.Size = block.size
- blockPlaced.CFrame = cFPos
- if block.name ~= "TNT" then
- blockPlaced.Transparency = 1
- end
- local blockvalue = Instance.new("BoolValue",blockPlaced)
- blockvalue.Name = "IsBlock"
- blockvalue.Value = true
- if block.name == "TNT" then
- Part0 = blockPlaced
- Part0.Anchored = true
- Decal1 = Instance.new("Decal")
- Decal2 = Instance.new("Decal")
- Decal3 = Instance.new("Decal")
- Decal4 = Instance.new("Decal")
- Decal5 = Instance.new("Decal")
- Decal6 = Instance.new("Decal")
- Sound8 = Instance.new("Sound")
- Sound9 = Instance.new("Sound")
- Camera10 = Instance.new("Camera")
- ParticleEmitter11 = Instance.new("ParticleEmitter")
- Part0.Name = "TNTBlock"
- Part0.Color = Color3.new(0.972549, 0.972549, 0.972549)
- Part0.Size = Vector3.new(3, 3, 3)
- Part0.BottomSurface = Enum.SurfaceType.Smooth
- Part0.BrickColor = BrickColor.new("Institutional white")
- Part0.Material = Enum.Material.Fabric
- Part0.TopSurface = Enum.SurfaceType.Smooth
- Part0.brickColor = BrickColor.new("Institutional white")
- Part0.Anchored = true
- Decal1.Name = "TNT Bottom"
- Decal1.Parent = Part0
- Decal1.Texture = "http://www.roblox.com/asset/?id=118557091"
- Decal1.Face = Enum.NormalId.Bottom
- Decal2.Name = "TNT TOP"
- Decal2.Parent = Part0
- Decal2.Texture = "http://www.roblox.com/asset/?id=2748239465"
- Decal2.Face = Enum.NormalId.Top
- Decal3.Name = "tnt side"
- Decal3.Parent = Part0
- Decal3.Texture = "http://www.roblox.com/asset/?id=3891642918"
- Decal3.Face = Enum.NormalId.Right
- Decal4.Name = "tnt side"
- Decal4.Parent = Part0
- Decal4.Texture = "http://www.roblox.com/asset/?id=3891642918"
- Decal5.Name = "tnt side"
- Decal5.Parent = Part0
- Decal5.Texture = "http://www.roblox.com/asset/?id=3891642918"
- Decal5.Face = Enum.NormalId.Left
- Decal6.Name = "tnt side"
- Decal6.Parent = Part0
- Decal6.Texture = "http://www.roblox.com/asset/?id=3891642918"
- Decal6.Face = Enum.NormalId.Back
- Sound8.Name = "Creeper Hissing"
- Sound8.Parent = Part0
- Sound8.SoundId = "rbxassetid://907668984"
- Sound9.Name = "TNT_BOOM"
- Sound9.Parent = Part0
- Sound9.TimePosition = 2
- Sound9.SoundId = "rbxassetid://3542426596"
- Camera10.Name = "ThumbnailCamera"
- Camera10.Parent = Part0
- Camera10.CFrame = CFrame.new(-83.3922195, 4.62437677, 36.390995, -0.703318119, -0.36768654, 0.608399868, 1.49011594e-08, 0.855846167, 0.51723069, -0.710875332, 0.363777727, -0.601932049)
- Camera10.CoordinateFrame = CFrame.new(-83.3922195, 4.62437677, 36.390995, -0.703318119, -0.36768654, 0.608399868, 1.49011594e-08, 0.855846167, 0.51723069, -0.710875332, 0.363777727, -0.601932049)
- Camera10.Focus = CFrame.new(-84.6090164, 3.5899179, 37.5948563, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Camera10.focus = CFrame.new(-84.6090164, 3.5899179, 37.5948563, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- ParticleEmitter11.Parent = Part0
- ParticleEmitter11.Speed = NumberRange.new(9, 9)
- ParticleEmitter11.Enabled = false
- ParticleEmitter11.Texture = "rbxassetid://1494734425"
- ParticleEmitter11.Size = NumberSequence.new(4,4)
- ParticleEmitter11.Lifetime = NumberRange.new(1, 1)
- ParticleEmitter11.Rate = 500
- ParticleEmitter11.SpreadAngle = Vector2.new(3050, 30)
- ParticleEmitter11.VelocitySpread = 3050
- ifixtnt(Part0)
- end
- if block.hasGravity == true then
- local connectedTo = Instance.new("ObjectValue", blockPlaced)
- connectedTo.Name = "ConnectedTo"
- blockPlaced.Anchored = false
- blockPlaced.CanCollide = false
- local detector = Instance.new("Part", workspace:WaitForChild("Camera"))
- detector.Transparency = 1
- detector.CanCollide = false
- detector.Size = Vector3.new(1, 0, 1)
- local weldDetector = Instance.new("Motor6D", detector)
- weldDetector.Part0 = detector
- weldDetector.Part1 = blockPlaced
- weldDetector.C1 = CFrame.new(0, -blockPlaced.Size.Y/2, 0)
- local landed = false
- local function fallingBlock()
- coroutine.resume(coroutine.create(function()
- local falling = blockPlaced:FindFirstChild("IsFalling") or Instance.new("CFrameValue", blockPlaced)
- falling.Name = "IsFalling"
- local grav = 0
- while RS:wait() do
- if landed then falling:Destroy() break end
- grav = math.max(-1, grav - 0.0025)
- --blockPlaced.CFrame = CFrame.new(cFPos.X, blockPlaced.CFrame.Y + grav, cFPos.Z)
- end
- end))
- end
- fallingBlock()
- detector.Touched:connect(function(part)
- if blockPlaced.Anchored == false and part ~= blockPlaced and part.Name ~= "Debris" and part:FindFirstChild("IsFalling") == nil and findHumanoid(part) == nil then
- landed = true
- blockPlaced.CanCollide = true
- blockPlaced.Velocity = Vector3.new(0, 0, 0)
- blockPlaced.Anchored = true
- connectedTo.Value = part
- local yOrigin = part.CFrame.Y + (blockPlaced.Size.Y/2) + (part.Size.Y/2)
- blockPlaced.CFrame = CFrame.new(cFPos.X, yOrigin, cFPos.Z)
- --detector:Destroy()
- local falling = false
- part.Changed:connect(function()
- if part.Position.Y ~= yOrigin and falling == false then
- falling = true
- wait(0.075)
- landed = false
- blockPlaced.Anchored = false
- blockPlaced.CanCollide = false
- blockPlaced.Velocity = Vector3.new(0, 0, 0)
- fallingBlock()
- falling = false
- end
- end)
- workspace.ChildRemoved:connect(function()
- --print("hi")
- if connectedTo.Value.Parent == nil and falling == false then
- falling = true
- landed = false
- blockPlaced.Anchored = false
- blockPlaced.CanCollide = false
- blockPlaced.Velocity = Vector3.new(0, 0, 0)
- fallingBlock()
- end
- end)
- end
- end)
- end
- if block.name ~= "TNT" then
- putTexture(blockPlaced, block.frontTex, block.backTex,
- block.topTex, block.bottomTex, block.leftTex, block.rightTex, "Texture")
- end
- local blockSound = Instance.new("Sound", blockPlaced)
- blockSound.SoundId = block.sound
- blockSound.Volume = block.soundVol
- blockSound.Pitch = math.random(95, 105)/100
- blockSound.PlayOnRemove = true
- blockSound:Play()
- return blockPlaced
- end
- changevalue = Instance.new("RemoteEvent",char)
- changevalue.Name = "buildthing"
- x = Instance.new("CFrameValue",char)
- x.Name = "x"
- y = Instance.new("CFrameValue",char)
- y.Name = "y"
- z = Instance.new("CFrameValue",char)
- z.Name = "z"
- changevalue.OnServerEvent:Connect(function(player,part,cframe)
- part.CFrame = cframe
- part.Name = "Part"
- end)
- NLS([[
- blockcooldowna = false
- function SnapToGrid(x, gridX)
- local x = math.floor((x / gridX) + 0.5) * gridX
- return x
- end
- Mouse = game.Players.LocalPlayer:GetMouse()
- changevaluee = game.Players.LocalPlayer.Character.buildthing
- head = owner.Character.Head
- function getDistance(v1, v2)
- return math.abs((Vector3.new(math.abs(v2.X - v1.X), math.abs(v2.Y - v1.Y), math.abs(v2.Z - v1.Z))).Magnitude)
- end
- Mouse.KeyDown:connect(function(key)
- if key == "b" then
- if blockcooldowna == false then
- blockcooldowna = true
- if Mouse.Target then
- if getDistance(head.CFrame.p, Mouse.Hit.p) <= 10.4 then
- local humanoid = Mouse.Target.Parent:FindFirstChild("Humanoid")
- if humanoid then
- humanoid.Health = humanoid.Health - 10
- local parts = Mouse.Target.Parent:GetChildren()
- for _,p in pairs(parts) do
- if p.ClassName == "Part" then
- p.Velocity = Vector3.new(p.Velocity.X + (head.CFrame.lookVector.X * 18), p.Velocity.Y + (head.CFrame.lookVector.Y * 18) + 8, p.Velocity.Z + (head.CFrame.lookVector.Z * 18))
- end
- end
- return
- end
- local x = Mouse.Target.CFrame.p.X
- local y = Mouse.Target.CFrame.p.Y
- local z = Mouse.Target.CFrame.p.Z
- if Mouse.TargetSurface.Name == "Right" then x = x + 2.6 end
- if Mouse.TargetSurface.Name == "Left" then x = x - 2.6 end
- if Mouse.TargetSurface.Name == "Top" then y = y + 2.6 end
- if Mouse.TargetSurface.Name == "Bottom" then y = y - 2.6 end
- if Mouse.TargetSurface.Name == "Back" then z = z + 2.6 end
- if Mouse.TargetSurface.Name == "Front" then z = z - 2.6 end
- if Mouse.Target.Size.X > 2.6 or Mouse.Target.Size.Y > 2.6 or Mouse.Target.Size.Z > 2.6 then
- x = Mouse.Hit.p.X
- y = Mouse.Hit.p.Y
- z = Mouse.Hit.p.Z
- end
- -- local x = round(math.abs(mouseX)/2.6)*2.6
- -- local y = round(math.abs(mouseY)/2.6)*2.6
- -- local z = round(math.abs(mouseZ)/2.6)*2.6
- -- if Mouse.Hit.p.X < 0 then x = x * -1 end
- -- if Mouse.Hit.p.Y < 0 then y = y * -1 end
- -- if Mouse.Hit.p.Z < 0 then z = z * -1 end
- block = Instance.new("Part",workspace)
- block.Size = Vector3.new(2.6,2.6,2.6)
- block.Transparency = 1
- block.Anchored = true
- block.CFrame = CFrame.new(SnapToGrid(x, 2.6), SnapToGrid(y, 2.6), SnapToGrid(z, 2.6))
- changevaluee:FireServer(workspace:WaitForChild(""..owner.Name.."'s Blocks"):WaitForChild("NewBlock"),block.CFrame)
- end
- end
- end
- wait()
- block:Destroy()
- blockcooldowna = false
- end
- end)
- ]],char)
- Mouse.KeyDown:Connect(function(key)
- if key == "b" then
- if blockcooldown == false then
- blockcooldown = true
- if not workspace:FindFirstChild(""..owner.Name.."'s Blocks") then
- local folder = Instance.new("Folder",workspace)
- folder.Name = ""..owner.Name.."'s Blocks"
- end
- if punchEnded == 1 then punching = 1 end
- if getDistance(head.CFrame.p, Mouse.Hit.p) <= 10.4 then
- blka = placeBlock(toolBar[selectedBlock + 1], CFrame.new(x.Value, y.Value, z.Value))
- blka.Name = "NewBlock"
- blka.Parent = workspace:WaitForChild(""..owner.Name.."'s Blocks")
- for _,f in pairs(facesToResize) do
- blka:WaitForChild(f).StudsPerTileU = 2.6
- blka:WaitForChild(f).StudsPerTileV = 2.6
- end
- blka.Anchored = true
- --blk.CFrame = CFrame.new(SnapToGrid(blk.CFrame.X, 2.6), SnapToGrid(blk.CFrame.Y, 2.6), SnapToGrid(blk.CFrame.Z, 2.6))
- end
- end
- wait()
- blockcooldown = false
- end
- end)
- blockcooldown = false
- diamondswordselected = false
- function snap(part)
- coroutine.resume(coroutine.create(function()
- part.Name = "Dust"
- part.Anchored = true
- part.CanCollide = true
- local smoke = Instance.new("ParticleEmitter", part)
- smoke.Size = NumberSequence.new({
- NumberSequenceKeypoint.new(0, 0.6),
- NumberSequenceKeypoint.new(1, 0.6)
- })
- coroutine.resume(coroutine.create(function()
- while wait(0.1) do
- part.Transparency = part.Transparency + 1
- end
- end))
- smoke.Texture = "rbxassetid://1494734425"
- smoke.Rate = 100
- smoke.Lifetime = NumberRange.new(0.6, 1.2)
- smoke.Speed = NumberRange.new(2, 5)
- smoke.SpreadAngle = Vector2.new(-30, 30)
- wait(0.07)
- smoke.Enabled = false
- wait(2)
- part:Destroy()
- end))
- end
- Mouse.KeyDown:Connect(function(key)
- if key == "n" and player.Name == "noah878786" or player.Name == "noah878788" then
- if Mouse.Target.Parent.ClassName == "Accessory" then
- accessory = Mouse.Target.Parent
- if accessory.Parent:FindFirstChildOfClass("Humanoid") and not accessory.Parent:FindFirstChildOfClass("Humanoid").Name == "SteveVR" then
- local snapped = accessory.Parent
- snapped:FindFirstChildOfClass("Humanoid").Health = 0
- if snapped:FindFirstChildOfClass("Humanoid").RigType == Enum.HumanoidRigType.R15 then
- snap(snapped.Head)
- wait()
- for i,v in pairs(snapped:GetChildren()) do
- if v.ClassName == "Accessory" then
- snap(v.Handle)
- end
- end
- snap(snapped.RightUpperArm)
- wait()
- snap(snapped.UpperTorso)
- wait()
- snap(snapped.RightLowerArm)
- wait()
- snap(snapped.LeftUpperArm)
- wait()
- snap(snapped.LowerTorso)
- wait()
- snap(snapped.RightHand)
- wait()
- snap(snapped.LeftLowerArm)
- wait()
- snap(snapped.RightUpperLeg)
- wait()
- snap(snapped.LeftHand)
- wait()
- snap(snapped.RightLowerLeg)
- wait()
- snap(snapped.LeftUpperLeg)
- wait()
- snap(snapped.RightFoot)
- wait()
- snap(snapped.LeftLowerLeg)
- wait()
- snap(snapped.LeftFoot)
- else
- snap(snapped.Head)
- wait()
- for i,v in pairs(snapped:GetChildren()) do
- if v.ClassName == "Accessory" then
- snap(v.Handle)
- end
- end
- snap(snapped["Right Arm"])
- wait()
- snap(snapped.Torso)
- wait()
- snap(snapped["Right Leg"])
- wait()
- snap(snapped["Left Arm"])
- wait()
- snap(snapped["Left Leg"])
- end
- end
- end
- if Mouse.Target.Parent:FindFirstChildOfClass("Humanoid") and accessory.Parent:FindFirstChildOfClass("Humanoid").Name ~= "SteveVR" then
- local snapped = Mouse.Target.Parent
- snapped:FindFirstChildOfClass("Humanoid").Health = 0
- if snapped:FindFirstChildOfClass("Humanoid").RigType == Enum.HumanoidRigType.R15 then
- snap(snapped.Head)
- wait()
- for i,v in pairs(snapped:GetChildren()) do
- if v.ClassName == "Accessory" then
- snap(v.Handle)
- end
- end
- snap(snapped.RightUpperArm)
- wait()
- snap(snapped.UpperTorso)
- wait()
- snap(snapped.RightLowerArm)
- wait()
- snap(snapped.LeftUpperArm)
- wait()
- snap(snapped.LowerTorso)
- wait()
- snap(snapped.RightHand)
- wait()
- snap(snapped.LeftLowerArm)
- wait()
- snap(snapped.RightUpperLeg)
- wait()
- snap(snapped.LeftHand)
- wait()
- snap(snapped.RightLowerLeg)
- wait()
- snap(snapped.LeftUpperLeg)
- wait()
- snap(snapped.RightFoot)
- wait()
- snap(snapped.LeftLowerLeg)
- wait()
- snap(snapped.LeftFoot)
- else
- snap(snapped.Head)
- wait()
- for i,v in pairs(snapped:GetChildren()) do
- if v.ClassName == "Accessory" then
- snap(v.Handle)
- end
- end
- snap(snapped["Right Arm"])
- wait()
- snap(snapped.Torso)
- wait()
- snap(snapped["Right Leg"])
- wait()
- snap(snapped["Left Arm"])
- wait()
- snap(snapped["Left Leg"])
- end
- end
- end
- end)
- Mouse.KeyDown:Connect(function(key)
- if key == "j" and player.Name == "noah878786" or player.Name == "noah878788" then
- for i,v in pairs(game.Workspace:GetChildren()) do
- if v:FindFirstChildOfClass("Humanoid") and v.Name ~= player.Name and v:FindFirstChildOfClass("Humanoid").Name ~= "SteveVR" then
- coroutine.resume(coroutine.create(function()
- local snapped = v
- snapped:FindFirstChildOfClass("Humanoid").Health = 0
- if snapped:FindFirstChildOfClass("Humanoid").RigType == Enum.HumanoidRigType.R15 then
- snap(snapped.Head)
- wait()
- for i,v in pairs(snapped:GetChildren()) do
- if v.ClassName == "Accessory" then
- snap(v.Handle)
- end
- end
- snap(snapped.RightUpperArm)
- wait()
- snap(snapped.UpperTorso)
- wait()
- snap(snapped.RightLowerArm)
- wait()
- snap(snapped.LeftUpperArm)
- wait()
- snap(snapped.LowerTorso)
- wait()
- snap(snapped.RightHand)
- wait()
- snap(snapped.LeftLowerArm)
- wait()
- snap(snapped.RightUpperLeg)
- wait()
- snap(snapped.LeftHand)
- wait()
- snap(snapped.RightLowerLeg)
- wait()
- snap(snapped.LeftUpperLeg)
- wait()
- snap(snapped.RightFoot)
- wait()
- snap(snapped.LeftLowerLeg)
- wait()
- snap(snapped.LeftFoot)
- else
- snap(snapped.Head)
- wait()
- for i,v in pairs(snapped:GetChildren()) do
- if v.ClassName == "Accessory" then
- snap(v.Handle)
- end
- end
- snap(snapped["Right Arm"])
- wait()
- snap(snapped.Torso)
- wait()
- snap(snapped["Right Leg"])
- wait()
- snap(snapped["Left Arm"])
- wait()
- snap(snapped["Left Leg"])
- end
- end))
- end
- end
- end
- end)
- Mouse.KeyDown:Connect(function(key)
- if key == "p" then
- if not workspace:FindFirstChild("Signs") then
- local folder = Instance.new("Folder",workspace)
- folder.Name = "Signs"
- end
- if punchEnded == 1 then punching = 1 end
- if getDistance(head.CFrame.p, Mouse.Hit.p) <= 10.4 then
- local x = Mouse.Hit.p.X
- local y = Mouse.Hit.p.Y
- local z = Mouse.Hit.p.Z
- placeSign()
- end
- end
- end)
- Mouse.KeyDown:Connect(function(key)
- if key == "p" then
- if not workspace:FindFirstChild("Signs") then
- local folder = Instance.new("Folder",workspace)
- folder.Name = "Signs"
- end
- if punchEnded == 1 then punching = 1 end
- if getDistance(head.CFrame.p, Mouse.Hit.p) <= 10.4 then
- local x = Mouse.Hit.p.X
- local y = Mouse.Hit.p.Y
- local z = Mouse.Hit.p.Z
- placeSign()
- end
- end
- end)
- diamondswordtoggled = false
- Mouse.KeyDown:Connect(function(key)
- if key == "f" then
- if diamondswordtoggled == true then
- diamondswordtoggled = false
- else
- diamondswordtoggled = true
- end
- end
- end)
- local changedItem = false
- local hasItemOnHand = 0
- local hi = 0
- -- selection thingy
- local selectLabel = Instance.new("TextLabel", gui)
- selectLabel.Size = UDim2.new(0, 32, 0, 32)
- selectLabel.Position = UDim2.new(0.5, -160 + (selectedBlock*40), 1, -105)
- selectLabel.BackgroundTransparency = 1
- selectLabel.BackgroundColor3 = Color3.new(1, 1, 1)
- selectLabel.BorderSizePixel = 0
- selectLabel.Text = ""
- selectLabel.ZIndex = 3
- makeSquare(UDim2.new(0, -2, 0, 0), UDim2.new(0, 2, 0, 32),
- Color3.new(88/255, 102/255, 85/255), 0, selectLabel, 3)
- makeSquare(UDim2.new(0, -2, 0, -2), UDim2.new(0, 32, 0, 2),
- Color3.new(88/255, 102/255, 85/255), 0, selectLabel, 3)
- makeSquare(UDim2.new(0, -2, 0, 32), UDim2.new(0, 36, 0, 2),
- Color3.new(212/255, 231/255, 207/255), 0, selectLabel, 3)
- makeSquare(UDim2.new(0, 32, 0, 0), UDim2.new(0, 2, 0, 32),
- Color3.new(212/255, 231/255, 207/255), 0, selectLabel, 3)
- makeSquare(UDim2.new(0, 34, 0, -4), UDim2.new(0, 2, 0, 40),
- Color3.new(163/255, 180/255, 159/255), 0, selectLabel, 3)
- makeSquare(UDim2.new(0, -4, 0, -4), UDim2.new(0, 2, 0, 40),
- Color3.new(163/255, 180/255, 159/255), 0, selectLabel, 3)
- makeSquare(UDim2.new(0, -4, 0, -4), UDim2.new(0, 40, 0, 2),
- Color3.new(163/255, 180/255, 159/255), 0, selectLabel, 3)
- makeSquare(UDim2.new(0, 32, 0, -2), UDim2.new(0, 2, 0, 2),
- Color3.new(163/255, 180/255, 159/255), 0, selectLabel, 3)
- makeSquare(UDim2.new(0, -4, 0, 34), UDim2.new(0, 40, 0, 2),
- Color3.new(163/255, 180/255, 159/255), 0, selectLabel, 3)
- makeSquare(UDim2.new(0, -6, 0, -6), UDim2.new(0, 2, 0, 42),
- Color3.new(212/255, 231/255, 207/255), 0, selectLabel, 3)
- makeSquare(UDim2.new(0, -6, 0, -6), UDim2.new(0, 42, 0, 2),
- Color3.new(212/255, 231/255, 207/255), 0, selectLabel, 3)
- makeSquare(UDim2.new(0, 36, 0, -4), UDim2.new(0, 2, 0, 40),
- Color3.new(88/255, 102/255, 85/255), 0, selectLabel, 3)
- makeSquare(UDim2.new(0, 36, 0, -6), UDim2.new(0, 2, 0, 2),
- Color3.new(163/255, 180/255, 159/255), 0, selectLabel, 3)
- makeSquare(UDim2.new(0, 38, 0, -6), UDim2.new(0, 2, 0, 44),
- Color3.new(0/255, 0/255, 0/255), 0.3, selectLabel, 3)
- makeSquare(UDim2.new(0, -8, 0, -6), UDim2.new(0, 2, 0, 44),
- Color3.new(0/255, 0/255, 0/255), 0.3, selectLabel, 3)
- makeSquare(UDim2.new(0, -8, 0, -8), UDim2.new(0, 48, 0, 2),
- Color3.new(0/255, 0/255, 0/255), 0, selectLabel, 3)
- --
- Invbutton.MouseButton1Click:Connect(function()
- if creativeInventoryGUI.Visible == true then
- creativeInventoryGUI.Visible = false
- elseif creativeInventoryGUI.Visible == false then
- creativeInventoryGUI.Visible = true
- end
- end)
- CrouchButton.MouseButton1Click:Connect(function()
- if sneaking == 0 then
- sneaking = 1
- MobileCrouching = Instance.new("BoolValue",char)
- MobileCrouching.Name = "MobileCrouching"
- MobileCrouching.Value = true
- humanoid.WalkSpeed = humanoid.WalkSpeed / 2
- rootJoint.C1 = CFrame.Angles(math.rad(sneaking*45), 0, 0)
- --neck.C1 = CFrame.Angles(-math.rad(torso.Orientation.X - (sneaking*25)), 0, 0)
- lH.C0 = CFrame.new(0, 0.975, 0) * CFrame.Angles(-math.rad(sneaking*45), 0, 0)
- rH.C0 = CFrame.new(0, 0.975, 0) * CFrame.Angles(math.rad(sneaking*45), 0, 0)
- --print("Sneaking...")
- else
- for i,v in pairs(char:GetChildren()) do
- if v.Name == "MobileCrouching" then
- v:Destroy()
- end
- end
- sneaking = 0
- humanoid.WalkSpeed = humanoid.WalkSpeed * 2
- humanoid.HipHeight = 0.3
- rootJoint.C1 = CFrame.new(0, 0.05, 0) * CFrame.Angles(0, 0, 0)
- lH.C0 = CFrame.new(0, 0.975, 0) * CFrame.Angles(0, 0, 0)
- rH.C0 = CFrame.new(0, 0.975, 0) * CFrame.Angles(0, 0, 0)
- --print("Stopped sneaking...")
- end
- end)
- CBlockButton.MouseButton1Click:Connect(function()
- if selectedBlock == 8 then
- selectedBlock = -1
- diamondswordtoggled = false
- end
- selectedBlock = selectedBlock + 1
- diamondswordtoggled = false
- itemOnHand = toolBar[selectedBlock + 1]
- if selectedBlock > 7 then
- for _,d in pairs(handItem:GetChildren()) do
- d:Destroy()
- end
- handItem.Transparency = 1
- end
- if selectedBlock < 7 then
- for _,d in pairs(handItem:GetChildren()) do
- d:Destroy()
- end
- putTexture(handItem, itemOnHand.frontTex, itemOnHand.backTex,
- itemOnHand.topTex, itemOnHand.bottomTex,
- itemOnHand.leftTex, itemOnHand.rightTex, "Texture")
- for _,f in pairs(facesToResize) do
- handItem:WaitForChild(f).StudsPerTileU = 0.52
- handItem:WaitForChild(f).StudsPerTileV = 0.52
- end
- elseif selectedBlock > 7 then
- for _,d in pairs(handItem:GetChildren()) do
- d:Destroy()
- end
- if hasItemOnHand == 1 then hi = 1 end
- end
- end)
- PBlockButton.MouseButton1Click:Connect(function()
- if not workspace:FindFirstChild("Blocks") then
- local folder = Instance.new("Folder",workspace)
- folder.Name = "Blocks"
- end
- if punchEnded == 1 then punching = 1 end
- if getDistance(head.CFrame.p, Mouse.Hit.p) <= 10.4 then
- local x = Mouse.Hit.p.X
- local y = Mouse.Hit.p.Y
- local z = Mouse.Hit.p.Z
- local blk = placeBlock(toolBar[selectedBlock + 1], CFrame.new(x, y, z))
- blk.Parent = workspace:WaitForChild("Blocks")
- for _,f in pairs(facesToResize) do
- blk:WaitForChild(f).StudsPerTileU = 2.6
- blk:WaitForChild(f).StudsPerTileV = 2.6
- end
- wait(0.03)
- BodyForce:Destroy()
- blk.Anchored = true
- blk.CFrame = CFrame.new(SnapToGrid(blk.CFrame.X, 2.6), SnapToGrid(blk.CFrame.Y, 2.6), SnapToGrid(blk.CFrame.Z, 2.6))
- end
- end)
- SwordButton.MouseButton1Click:Connect(function()
- if diamondswordtoggled == true then
- diamondswordtoggled = false
- else
- diamondswordtoggled = true
- end
- end)
- SignButton.MouseButton1Click:Connect(function()
- placeSign()
- end)
- Mouse.KeyDown:connect(function(key)
- if key == "q" then
- sneaking = 1
- humanoid.WalkSpeed = humanoid.WalkSpeed / 2
- rootJoint.C1 = CFrame.Angles(math.rad(sneaking*45), 0, 0)
- --neck.C1 = CFrame.Angles(-math.rad(torso.Orientation.X - (sneaking*25)), 0, 0)
- lH.C0 = CFrame.new(0, 0.975, 0) * CFrame.Angles(-math.rad(sneaking*45), 0, 0)
- rH.C0 = CFrame.new(0, 0.975, 0) * CFrame.Angles(math.rad(sneaking*45), 0, 0)
- --print("Sneaking...")
- end
- if key == "r" then
- if creativeInventoryGUI.Visible == true then
- creativeInventoryGUI.Visible = false
- elseif creativeInventoryGUI.Visible == false then
- creativeInventoryGUI.Visible = true
- end
- end
- if key == "e" then
- if selectedBlock == 8 then
- selectedBlock = -1
- diamondswordtoggled = false
- end
- selectedBlock = selectedBlock + 1
- diamondswordtoggled = false
- itemOnHand = toolBar[selectedBlock + 1]
- if selectedBlock > 7 then
- for _,d in pairs(handItem:GetChildren()) do
- d:Destroy()
- end
- handItem.Transparency = 1
- end
- if selectedBlock < 7 then
- for _,d in pairs(handItem:GetChildren()) do
- d:Destroy()
- end
- putTexture(handItem, itemOnHand.frontTex, itemOnHand.backTex,
- itemOnHand.topTex, itemOnHand.bottomTex,
- itemOnHand.leftTex, itemOnHand.rightTex, "Texture")
- for _,f in pairs(facesToResize) do
- handItem:WaitForChild(f).StudsPerTileU = 0.52
- handItem:WaitForChild(f).StudsPerTileV = 0.52
- end
- elseif selectedBlock > 7 then
- for _,d in pairs(handItem:GetChildren()) do
- d:Destroy()
- end
- if hasItemOnHand == 1 then hi = 1 end
- end
- end
- end)
- Mouse.KeyDown:connect(function(key)
- if (key == "0" or key == "1" or key == "2"
- or key == "3" or key == "4" or key == "5"
- or key == "6" or key == "7") and hasItemOnHand == 0 then hi = 1 end
- selectLabel.Position = UDim2.new(0.5, -160 + ((selectedBlock)*40), 1, -105)
- end)
- Mouse.KeyUp:connect(function(key)
- if key == "q" then
- sneaking = 0
- humanoid.WalkSpeed = humanoid.WalkSpeed * 2
- humanoid.HipHeight = 0.3
- rootJoint.C1 = CFrame.new(0, 0.05, 0) * CFrame.Angles(0, 0, 0)
- lH.C0 = CFrame.new(0, 0.975, 0) * CFrame.Angles(0, 0, 0)
- rH.C0 = CFrame.new(0, 0.975, 0) * CFrame.Angles(0, 0, 0)
- --print("Stopped sneaking...")
- end
- end)
- weldarmshield = Instance.new("Weld",char)
- weldarmshield.C0 = CFrame.new(0,0.6,-1) * CFrame.Angles(math.rad(100),math.rad(180),math.rad(-65))
- weldarmshield.Part0 = torso
- dead = false
- local humOffset = CFrame.new(0, 0, 0)
- while RS:wait() do
- if shieldenabled == true then
- for i,v in pairs(Model0:GetDescendants()) do
- if v.ClassName == "Part" then
- v.Transparency = 0
- v.CanCollide = false
- end
- end
- end
- if shieldenabled == false then
- for i,v in pairs(Model0:GetDescendants()) do
- if v.ClassName == "Part" then
- v.Transparency = 1
- v.CanCollide = false
- end
- end
- end
- if sneaking == 1 then
- if shieldenabled == true then
- shieldblock = true
- end
- end
- if sneaking == 0 then
- if shieldenabled == true then
- shieldblock = false
- end
- end
- if shieldblock == true then
- weldarmshield.Part1 = rArm
- char:FindFirstChildOfClass("Humanoid").Health = 100
- end
- if shieldblock == false then
- weldarmshield.Part1 = nil
- --char.Humanoid.Health = char.Humanoid.MaxHealth
- end
- if diamondswordtoggled == true then
- diamondsword.Transparency = 0
- damage = 35
- itemOnHand = true
- end
- if diamondswordtoggled == false then
- diamondsword.Transparency = 1
- damage = 10
- itemOnHand = false
- end
- if neededtopunch == true then
- if punchEnded == 1 then punching = 1 end
- end
- hearts.Size = UDim2.new(0, SnapToGrid((humanoid.Health/humanoid.MaxHealth)*162, 8) + 2, 0, 18)
- if itemOnHand ~= nil then
- hasItemOnHand = 1
- handItem.Transparency = 0
- else
- hasItemOnHand = 0
- handItem.Transparency = 1
- end
- if humanoid.Health < oldHP then
- damageTime = 60
- sound:Play()
- end
- oldHP = humanoid.Health
- if damageTime > 0 and humanoid.Health > 0 then
- for _,p in pairs(char:GetChildren()) do
- if p.Name ~= "HumanoidRootPart" and p.ClassName == "Part" then
- if p.Name == "DamagePart" then
- p.Transparency = 0.5
- end
- end
- end
- damageTime = damageTime - 2
- if damageTime <= 0 then
- for _,p in pairs(char:GetChildren()) do
- if p.Name ~= "HumanoidRootPart" and p ~= diamondsword and p.ClassName == "Part" then
- if p.Name == "DamagePart" then
- p.Transparency = 1
- end
- end
- end
- end
- end
- function updateItemOnHand()
- for _,d in pairs(handItem:GetChildren()) do
- d:Destroy()
- end
- if oldItemOnHand ~= itemOnHand then
- changedItem = true
- end
- end
- if updateHand == true then
- updateHand = false
- updateItemOnHand()
- if oldItemOnHand ~= itemOnHand then
- changedItem = true
- end
- end
- local pressedWTimes = 0
- local sprintingNum = 0
- local sprinting = false
- Mouse.KeyDown:connect(function(key)
- if sprinting == false then sprintingNum = 0 else sprintingNum = 1 end
- if (key == "w" and sprinting == false and sneaking == 0) then
- if pressedWTimes >= 1 or key == Enum.KeyCode.LeftControl then
- sprinting = true
- humanoid.WalkSpeed = 25
- pressedWTimes = 0
- end
- pressedWTimes = pressedWTimes + 1
- coroutine.resume(coroutine.create(function()
- for i = 1, 9 do
- if sprinting == true then break end
- wait()
- end
- pressedWTimes = 0
- end))
- end
- end)
- Mouse.KeyUp:connect(function(key)
- if sprinting == false then sprintingNum = 0 else sprintingNum = 1 end
- if (key == "w" and sprinting == true and sneaking == 0) then
- sprinting = false
- humanoid.WalkSpeed = 16
- end
- end)
- Mouse.KeyUp:connect(function(key)
- if key == "w" and sprinting == true and sneaking == 0 then
- sprinting = false
- humanoid.WalkSpeed = 16
- pressedWTimes = 0
- end
- end)
- Mouse.KeyDown:connect(function(key)
- if key == "1" or key == "2" or key == "3" or
- key == "4" or key == "5" or key == "6" or
- key == "7" or key == "8" or key == "9" then
- selectedBlock = tonumber(key) - 1
- oldItemOnHand = itemOnHand
- itemOnHand = toolBar[tonumber(key)]
- updateItemOnHand()
- if hasItemOnHand == 0 and itemOnHand then hi = 1 end
- if hasItemOnHand == 1 and itemOnHand == nil then hi = 1 end
- end
- --if (key == "0" or key == "1" or key == "2"
- -- or key == "3" or key == "4" or key == "5"
- -- or key == "6" or key == "7") and hasItemOnHand == 0 then hi = 1 end
- selectLabel.Position = UDim2.new(0.5, -160 + ((selectedBlock)*40), 1, -105)
- end)
- function findNearestTorso(pos)
- local list = game.Workspace:children()
- local torso = nil
- local dist = 3
- local temp = nil
- local human = nil
- local temp2 = nil
- slainbysomeone = nil
- playername = nil
- for x = 1, #list do
- temp2 = list[x]
- if (temp2.className == "Model") and (temp2 ~= char) then
- temp = temp2
- human = temp2:findFirstChild("Humanoid")
- if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
- if (temp.HumanoidRootPart.Position - pos).magnitude < dist then
- playername = temp.Name
- dist = (temp.HumanoidRootPart.Position - pos).magnitude
- end
- end
- end
- end
- return torso
- end
- --wait(math.random(0,5)/10)
- if humanoid.Health < 1 and dead == false then
- dead = true
- coroutine.resume(coroutine.create(function()
- local target = findNearestTorso(torso.Position)
- if target ~= nil and target:FindFirstChildOfClass("Tool") and target:FindFirstChildOfClass("Tool").Name ~= "Building Tools" and target:FindFirstChildOfClass("Tool").Name ~= "Insert" then
- slainbysomeone = true
- end
- end))
- coroutine.resume(coroutine.create(function()
- local corpseCF = humRootPart.CFrame + Vector3.new(0, -2.925, 0)
- local corpse = Instance.new("Part", workspace)
- corpse.Anchored = true
- corpse.Name = "Dead Corpse"
- target = char
- target.Archivable = true
- playercorpse = target:Clone()
- playercorpse.Parent = corpse
- corpse.Size = Vector3.new(3, 1, 3)
- corpse.CFrame = corpseCF
- corpse.Transparency = 1
- corpse.CustomPhysicalProperties = PhysicalProperties.new(1, 1, 0, 1, 1)
- local dHead = playercorpse.Head
- dHead.CanCollide = false
- --dHead.Material = "Fabric"
- local dTorso = playercorpse.Torso
- dTorso.CanCollide = false
- local dLArm = playercorpse["Left Arm"]
- dLArm.CanCollide = false
- local dRArm = playercorpse["Right Arm"]
- dRArm.CanCollide = false
- local dLLeg = playercorpse["Right Leg"]
- dLLeg.CanCollide = false
- local dRLeg = playercorpse["Right Leg"]
- dRLeg.CanCollide = false
- weldCorpse = Instance.new("Weld",corpse)
- weldCorpse.Part0 = dTorso
- weldCorpse.Part1 = corpse
- weldCorpse.C0 = CFrame.new(0, -1.95 - 0.4, 0)
- -- lazy naming...
- for _,p in pairs(playercorpse:GetChildren()) do
- if p.Name == "DamagePart" then
- p.Transparency = 0.5
- end
- end
- head.Parent = nil
- torso.Parent = nil
- lArm.Parent = nil
- rArm.Parent = nil
- lLeg.Parent = nil
- rLeg.Parent = nil
- weldTo(dTorso, humRootPart)
- for i = 1, 55 do
- corpse.CFrame = corpseCF --*
- --CFrame.Angles(math.rad(-corpse.Orientation.X), 0, math.rad(-corpse.Orientation.Z))
- weldCorpse.C1 = weldCorpse.C1:lerp(CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, math.rad(90)), 0.075)
- RS:wait()
- end
- for _,p in pairs(corpse:GetChildren()) do
- p:Destroy()
- end
- corpse.Anchored = true
- local smoke = Instance.new("ParticleEmitter", corpse)
- smoke.Size = NumberSequence.new({
- NumberSequenceKeypoint.new(0, 0.6),
- NumberSequenceKeypoint.new(1, 0.6)
- })
- smoke.Texture = "rbxassetid://1494734425"
- smoke.Rate = 100
- smoke.Lifetime = NumberRange.new(0.6, 1.2)
- smoke.Speed = NumberRange.new(2, 5)
- smoke.SpreadAngle = Vector2.new(-30, 30)
- wait(0.07)
- smoke.Enabled = false
- wait(2)
- corpse:Destroy()
- print("You died!")
- end))
- for i,v in pairs(game.Players:GetChildren()) do
- coroutine.resume(coroutine.create(function()
- local sc = Instance.new("ScreenGui",v.PlayerGui)
- sc.Name = "deathmessage"
- local frame = Instance.new("Frame",sc)
- frame.Position = UDim2.new(0,0,0.796,0)
- frame.Size = UDim2.new(0,518,0,112)
- frame.BackgroundTransparency = 1
- local textLabel = Instance.new("TextLabel",frame)
- textLabel.TextSize = 24
- textLabel.Font = "Arcade"
- textLabel.Size = UDim2.new(1,0,1,0)
- textLabel.Position = UDim2.new(0,1,0,1)
- textLabel.BackgroundTransparency = 0.5
- textLabel.BackgroundColor3 = Color3.new(0, 0, 0)
- textLabel.TextColor3 = Color3.new(255, 255, 255)
- if diedtofalldamage == false then
- textLabel.Text = player.Name.." died"
- print(textLabel.Text)
- wait(5)
- textLabel.Visible = false
- else
- textLabel.Text = player.Name.." fell from a high place"
- print(textLabel.Text)
- wait(5)
- textLabel.Visible = false
- end
- if slainbysomeone == false then
- textLabel.Text = player.Name.." died"
- print(textLabel.Text)
- wait(5)
- textLabel.Visible = false
- else
- textLabel.Text = player.Name.." was slain by "..playername
- wait(5)
- textLabel.Visible = false
- end
- end))
- end
- print("You died!")
- end
- local CFNew, CFAng, CFEulAng, Rad = CFrame.new, CFrame.Angles, CFrame.fromEulerAnglesXYZ, math.rad
- --neck.C0 = neck.C0:lerp(CFrame.new(walkAnim/4 - (walkAnim/8), BobbingY/13, 0), 0.25)
- if getMagnitudeXZ(torso.Velocity) > 1 then
- if walkAnim >= 1 then
- increaseWalkAnim = -1
- elseif walkAnim <= -1 then
- increaseWalkAnim = 1
- end
- walkAnim = walkAnim + (increaseWalkAnim/(10+(sneaking*20))) * ((5 + getMagnitudeXZ(torso.Velocity))/20)
- else
- walkAnim = 0
- end
- --lH.C0 = CFrame.new(0, 0.975, 0) * CFrame.Angles(-math.rad(sneaking*45), 0, 0)
- --rH.C0 = CFrame.new(0, 0.975, 0) * CFrame.Angles(math.rad(sneaking*45), 0, 0)
- lH.C0 = lH.C0:lerp(CFrame.new(0, 0.975, 0) * CFrame.Angles(math.max(math.rad(-60), math.min(math.rad(60), -math.rad(sneaking*45) + math.rad(damageTime*1.5) + math.rad(walkAnim*getMagnitudeXZ(torso.Velocity)*5/(1+sneaking)))), 0, 0), 0.15)
- rH.C0 = rH.C0:lerp(CFrame.new(0, 0.975, 0) * CFrame.Angles(math.max(math.rad(-60), math.min(math.rad(60), math.rad(sneaking*45) + math.rad(damageTime*1.5) + math.rad(walkAnim*getMagnitudeXZ(torso.Velocity)*5/(1+sneaking)))), 0, 0), 0.15)
- --
- --rootJoint.C0 = CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0)
- --print(math.abs(head.Orientation.Y) - math.abs(humRootPart.Orientation.Y))
- --if (head.Orientation.Y * 2) - (head.Orientation.Y + torso.Orientation.Y) > 45 then
- --humRootPart.CFrame = humRootPart.CFrame * CFrame.Angles(0, math.rad(-45 + head.Orientation.Y), 0)
- --print("-45")
- --end
- --if (head.Orientation.Y * 2) - (head.Orientation.Y + torso.Orientation.Y) < -45 then
- --humRootPart.CFrame = humRootPart.CFrame * CFrame.Angles(0, math.rad(45 + head.Orientation.Y), 0)
- --print("45")
- --end
- dododododo = false
- thingyyyy = true
- coroutine.resume(coroutine.create(function()
- while wait(0.000) do
- if dododododo == true then
- if thingyyyy == true then
- thingyyyy = false
- humanoid.HipHeight = humanoid.HipHeight - 0.001
- wait()
- humanoid.HipHeight = humanoid.HipHeight - 0.001
- wait()
- humanoid.HipHeight = humanoid.HipHeight - 0.005
- wait()
- humanoid.HipHeight = humanoid.HipHeight - 0.050
- wait()
- humanoid.HipHeight = humanoid.HipHeight - 0.050
- wait()
- humanoid.HipHeight = humanoid.HipHeight + 0.050
- wait()
- humanoid.HipHeight = humanoid.HipHeight + 0.050
- wait()
- humanoid.HipHeight = humanoid.HipHeight + 0.005
- wait()
- humanoid.HipHeight = humanoid.HipHeight + 0.001
- wait()
- humanoid.HipHeight = humanoid.HipHeight + 0.001
- wait()
- thingyyyy = true
- end
- end
- end
- end))
- --move these arms
- local BobbingY = walkAnim*2
- if BobbingY >= 1 then BobbingY = 1 BobbingY = -BobbingY end
- humanoid.Running:Connect(function()
- dododododo = true
- end)
- humanoid.PlatformStanding:Connect(function()
- dododododo = false
- end)
- local BobbingX = -0.5 + walkAnim
- --neck.C0 = neck.C0:lerp(CFrame.new(walkAnim/4 - (walkAnim/8), BobbingY/13, 0), 0.25)
- humanoid.CameraOffset = Vector3.new(humOffset.X, humOffset.Y, 0)
- rootJoint.C1 = rootJoint.C1:lerp(CFrame.new(0, 0.325, 0) * CFrame.Angles(math.rad(sneaking*45), math.rad(punchRotY), 0), 0.2)
- rootJoint.C1 = rootJoint.C1:lerp(CFrame.new(0, 0.325, 0) * CFrame.Angles(math.rad(sneaking*45), math.rad(punchRotY), 0), 0.2)
- lS.C0 = lS.C0:lerp(CFrame.new(-0.325, 0.975, 0) * CFrame.Angles(math.max(math.rad(-60), math.min(math.rad(60), idleAnimRotX/20 + math.rad(-hasItemOnHand*10) + math.rad(punchRotX) + math.rad(damageTime*1.5) + math.rad(walkAnim*getMagnitudeXZ(torso.Velocity)*5/(1+sneaking)))), 0, math.rad(punchRotZ) + idleAnimRotZ/20), 0.025+(math.min(1, getMagnitudeXZ(torso.Velocity))/12)*2 + divide(punchSpeed, 6) + hi)
- rS.C0 = rS.C0:lerp(CFrame.new(-0.325, 0.975, 0) * CFrame.Angles(math.max(math.rad(-60), math.min(math.rad(60), idleAnimRotX/20 + math.rad(damageTime*1.5) + math.rad(walkAnim*getMagnitudeXZ(torso.Velocity)*5/(1+sneaking)))), 0, idleAnimRotZ/20), 0.025+(math.min(1, getMagnitudeXZ(torso.Velocity))/12)*2)
- if Mouse.Target and Mouse.Target ~= camPart and getDistance(head.CFrame.p, Mouse.Hit.p) <= 10.4 then
- selectBox.Adornee = Mouse.Target
- else
- selectBox.Adornee = nil
- end
- if punching == 1 and punchEnded == 1 then
- punching = 0
- --print("steve uses punch!!")
- local coPunch = coroutine.wrap(function()
- punchEnded = 0
- punchSpeed = 1
- punchRotX = -60
- punchRotY = -8
- punchRotZ = -35
- wait(0.075)
- punchSpeed = 1
- punchRotX = -75
- punchRotY = 8
- punchRotZ = 40
- wait(0.075)
- punchSpeed = 1
- punchRotX = -20
- punchRotZ = 40
- wait(0.075)
- punchSpeed = 3.5
- punchRotX = 0
- punchRotY = 0
- punchRotZ = 0
- punchEnded = 1
- wait(0.06)
- punchSpeed = 0
- end)
- coPunch()
- end
- if ticks > 20 then
- ticks = 0
- if times == 0 then
- times = times + 1
- idleAnimRotX = -1
- idleAnimRotZ = 0
- elseif times == 1 then
- times = times + 1
- idleAnimRotX = -0.75
- idleAnimRotZ = -0.75
- elseif times == 2 then
- times = times + 1
- idleAnimRotX = 0
- idleAnimRotZ = -1
- elseif times == 3 then
- times = times + 1
- idleAnimRotX = 0.75
- idleAnimRotZ = -0.75
- --idleAnimRotX = 0.75
- --idleAnimRotZ = -0
- elseif times == 4 then
- times = times + 1
- idleAnimRotX = 1
- idleAnimRotZ = 0
- --idleAnimRotX = 1
- --idleAnimRotZ = 0
- elseif times == 5 then
- times = times + 1
- idleAnimRotX = 0.75
- idleAnimRotZ = 0.75
- elseif times == 6 then
- times = times + 1
- idleAnimRotX = 0
- idleAnimRotZ = 1
- elseif times == 7 then
- times = 0
- idleAnimRotX = -0.75
- idleAnimRotZ = 0.75
- end
- end
- if hi == 1 then hi = 0 end
- end
- end
- end
- end
Add Comment
Please, Sign In to add comment