Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --cl_init.lua (clientside)
- stalling = { "ahright.wav", "difficult.wav", "itsallhere.wav", "rightok.wav" }
- know = { "iknow.wav", "iknowjustwhattodo.wav" }
- houses = { "gryffindor.wav", "hufflepuff.wav", "ravenclaw.wav", "slytherin.wav" }
- function Stalling()
- net.Recieve("HatTalking")
- local ply = net.ReadEntity()
- surface.PlaySound(table.Random(stalling))
- timer.Simple(6, Know)
- end
- function Know()
- surface.PlaySound(table.Random(know))
- timer.Simple(3, House)
- end
- function House(ply)
- whichhouse = math.Random(1,4)
- if whichhouse == 1 then
- surface.PlaySound(houses[1])
- ply:SetNWString("House", "Gryffindor")
- chat.AddText( Color( 100, 100, 255 ), "You are now apart of the", Color( 100, 255, 100 ), "Gryffindor house." )
- net.Start("HouseGryff")
- net.SendToServer()
- end
- if whichhouse == 2 then
- surface.PlaySound(houses[2])
- ply:SetNWString("House", "Hufflepuff")
- chat.AddText( Color( 100, 100, 255 ), "You are now apart of the", Color( 100, 255, 100 ), "Hufflepuff" )
- net.Start("HouseHuffle")
- net.SendToServer()
- end
- if whichhouse == 3 then
- surface.PlaySound(houses[3])
- ply:SetNWString("House", "Ravenclaw")
- chat.AddText( Color( 100, 100, 255 ), "You are now apart of the", Color( 100, 255, 100 ), "Ravenclaw" )
- net.Start("HouseRaven")
- net.SendToServer()
- end
- if whichhouse == 4 then
- surface.PlaySound(houses[4])
- ply:SetNWString("House", "Slytherin")
- chat.AddText( Color( 100, 100, 255 ), "You are now apart of the", Color( 100, 255, 100 ), "Slytherin" )
- net.Start("HouseSlyth")
- net.SendToServer()
- end
- end
Add Comment
Please, Sign In to add comment